lkml.org 
[lkml]   [1998]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.027 / U:1.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site