bug-coreutils
[Top][All Lists]
Advanced

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

Re: Could we have a flag to tell us which directories were actually remo


From: Reuben Thomas
Subject: Re: Could we have a flag to tell us which directories were actually removed?
Date: Thu, 16 Aug 2007 11:12:46 +0100 (BST)

On Thu, 16 Aug 2007, Jim Meyering wrote:

Andreas Schwab <address@hidden> wrote:
Reuben Thomas <address@hidden> writes:

In this case, I don't see a good way of getting the same information. The
best way I could come up with that was short enough for command-line use
was use find to find directories with only 2 symlinks to them, but of
course that only works on some filing systems.

$ find -type d -empty

Note that if you simply want to remove all empty directories
(including e.g., those rendered empty by removing leaf dirs),
you should also use -depth and -delete:

 find . -depth -type d -empty -delete

Thanks both of you, that's great.

--
http://rrt.sc3d.org/
Kleineken: refreshes the dimensions other beers cannot reach




reply via email to

[Prev in Thread] Current Thread [Next in Thread]