lkml.org 
[lkml]   [1998]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: OFFTOPIC: Re: hardlinks.... sucks... ;-(
On Thu, Jan 08, 1998 at 09:01:25PM +0000, Jamie Lokier wrote:

> 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.

You still have trouble with the filename ``_'' which is magic for GNU
xargs, so add the option -e. Actually that eof string feature is
pretty annoying, imho it should be off by default.

Ralf

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