Messages in this thread | | | Date | Thu, 8 Jan 1998 21:01:25 +0000 | From | Jamie Lokier <> | Subject | Re: OFFTOPIC: Re: hardlinks.... sucks... ;-( |
| |
On Wed, Jan 07, 1998, Andreas Kostyrka wrote: > One can use also: > find / -user 1234 -print0 | xargs -0 chown 4321 > (That should solve the problem with spaces, etc.)
But not the problem with files staring with `-'. This instead, maybe:
find / -user 1234 -print0 | xargs -0r chown 4321 --
It still has the race condition, of course. If I really had to do this, I'd use find piped into a Perl script using readdir/open/fstat/fchown. Even this can be made to chown files outside the user's directory (but still owned by the user) though.
-- Jamie Lokier
| |