At 08 July, 2003 Rex Walters wrote:
> > the line 
> > 
> >  ebegin "Cleaning /var/lock, /var/run"
> >       ( find /var/lock -type f -print0 | xargs -0 rm -f -- 1>&2 )
> > 
> > can be changed to:
> > 
> >  ebegin "Cleaning /var/lock, /var/run"
> >       ( find /var/lock -type f -exec rm -f {} \; )
> 
> This definitely fixes the error but I'm curious why the first version
> doesn't work?  Seems like a bug in gnu find or xargs to me -- the fix is
> really more of a workaround.
> 
> The first version attempts to be more efficient (the latter forks a
> separate "rm" process for every file found).
> 
> Can anybody explain what the problem is with the first version?  When I
> try to run it manually (rather than as part of the runlevels boot
> process) it seems to work fine.

The problem is probably that, when the command is run at boot,
(find /var/lock -type f -print0) returns a very long list of files,
which is too long for xargs to deal with properly.

-- 
Andrew Farmer
[EMAIL PROTECTED]

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to