[Top][All Lists]
[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: |
Eric Blake |
Subject: |
Re: Could we have a flag to tell us which directories were actually removed? |
Date: |
Thu, 16 Aug 2007 22:04:42 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Reuben Thomas on 8/16/2007 4:12 AM:
>> 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
Furthermore, you can combine this with -print to get a list of which
directories were successfully deleted.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGxR5a84KuGfSFAYARAvo5AJ9NhS8zKU1O8RWUXsg3nOO2w28ebACdEdAy
LqEH9XMlx/l7e35bFNdCauc=
=rFHK
-----END PGP SIGNATURE-----
Re: Could we have a flag to tell us which directories were actually removed?, Bob Proulx, 2007/08/15