D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] Find (and remove) empty directories

 

I seem to recall there was a series of discussions on using Find to
discover (and delete) empty directories. From memory there was a one line
command that would do it.
    
    Using tar to back up new files from a certain date from the wife's
    hard-drive. I now have to unpack the tar file and delete empty
    directories.

I tried searching this morning but could not find any. 

Before I started experimenting Google has the following commands

    find -depth -type d -empty -exec rmdir {} \;
    find -type d -empty -delete

    http://duramecho.com/ComputerPrograms/DeleteEmptyDirectories/index.html

Any help much appreciated


-- 
Henry
Photocopies or faxes of my signature are not binding. 
This email has been signed with an electronic signature in accordance with 
subsection 7(3) of the Electronic Communications Act 2000.
Digital Key Signature: GPG RSA 0xFB447AA1 or 0x3184D537
Smime Fingerprint 98:24:AE:F7:D1:D6:E5:A0:F0:55:2F:40:42:5F:46:24:F9:52:f4:30
Wed Apr 20 12:35:55 BST 2011

Attachment: signature.asc
Description: Digital signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq