[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: find did not work



Koef wrote:
> On Thu, Oct 28, 2004 at 10:01:11AM -0400, Lennart Sorensen wrote:
> 
> > On Tue, Oct 26, 2004 at 12:33:49AM +0200, corerix wrote:
> 
> > > find debian -type d | xargs rmdir -p --ignore-fail-on-non-empty
> > > rmdir: zu wenige Argumente
> >
> > What does that mean ^ ?
> > 
> > based on an educated guess of what it means, I think it's a problem with
> > rmdir saying "Too many arguments",
> 
> In fact, it says "too few arguments" :-)
> So it seems his "debian" directory has no subdirectories at all.

If that is the case, and certainly possible, then run xargs with the
-r option.  I almost always use -print0 and -r0 together.

  find debian -type d -print0 | xargs -r0 rmdir -p --ignore-fail-on-non-empty

Bob



Reply to: