11/12 Unix / shell question. I need to find *ALL* the files in a system
which is owned by a particular user ID (i.e. my OWN user ID),
how to do that? I managed to find my own user ID by look at the
/etc/passwd file (it is not shadowed), but I am not sure how to
use "find" command to do what I want.
(for those who are curious... my account at other places got
screwed big time when the system admin decided to reassign
user IDs on the existing accounts. I end up having a lot of
files couting against my quota than I actually owns... need
to help the system admin to solve my problem!! :( )
\_ find / -local -mount -user $user
Or something close to that. Note the -local and the -mount
are supposed to stop you from getting automounted file
systems. (Automounting all the file systems available
from remote machines will piss off your sysadmin and take
longer.) This command worth what you paid for it. -ax
\_ WTF? Why did the so called sysadmin change UIDs? As a sysadmin
I object to you calling this person by the same title.
\_ This can be done cleverly, elegantly, and cleanly, but
obviously this person's sysadmin was incompetent. rsync
is a wonderful tool.
\_ It can be but there are few reasons to do so. Someone this
stupid won't have a reason to change UIDs.
\_ Most obvious case, someone makes the decision to go
to centralized password administration. the point
still stands, though, that to screw this up is a sign
of incompetence.
\_ Maybe the "stupid" sysadmin is taking over this
user's sorry-ass company and integrating it into
their current UID scheme and so what, the sysadmin
couldn't find every single file owned by this UID
on some lab/desktop machine, like you *could* or even
*would* considering the time-effort tradeoffs
Just speaking in general and obviously not for this
specific user, but the followups were just too
much broad clueless generalization.
\_ it's very easy to do this sort of resyncing if you
have half a clue. the failure to catch all ownerships
falls squarely on the sysadmin, dude. --sysadmin who
has had to do this recently (and flawlessly). |