[Gllug] CORRECTION: Gnome3 on Fedora 16 (Again)
nix at esperi.org.uk
Wed Apr 18 14:08:37 UTC 2012
On 18 Apr 2012, John Edwards stated:
> On Wed, Apr 18, 2012 at 02:12:52PM +0100, Nix wrote:
>> On 18 Apr 2012, John Edwards spake thusly:
>>> This might be speeded up by piping the list of files to xargs with
>>> something like:
>>> find / -gid 501 -print0 | xargs -r0 chgrp 1001
>>> But I sometimes meet problems with files with special characters in
>>> them when doing this, usually created by Windows clients via Samba.
>> *That* should only happen if chgrp is buggy. What characters were these?
>> What version of coreutils? (Maybe we can whip up a testcase...)
> Sorry it was several years ago, so I should have used the past tense.
> The details are long gone from my memory and the server in question
> has probably gone to Silicon Heaven by now (along with it's files).
That's what I thought, but it was worth a try!
> I'm also slightly nervous about piping data to things like chown and
> chmod (and rm!) without checking the data myself. The xargs man page
> does now say that for -0 the "quotes and backslash are not special
> (every character is taken literally)" so I hope it is now safe.
It's been safe for ages: this is why -0 was implemented. Before that,
sure, linefeeds were risky, but not e.g. other shell metacharacters (the
shell never gets to look at that datastream, and the commands get
exec()ed directly by xargs without getting the shell involved either).
NULL && (void)
Gllug mailing list - Gllug at gllug.org.uk
More information about the GLLUG