laziness, impatience, and hubris | |
PerlMonks |
Re: Clean Up Empty Directoriesby Tux (Canon) |
on Feb 17, 2018 at 10:18 UTC ( [id://1209381]=note: print w/replies, xml ) | Need Help?? |
Used and tested on HP-UX, AIX, and Linux. Don't know if it works on Windows. The find/exec has the problem that it needs to be run many times to cope with deep empty trees, and I had trees of 20+ levels on systems with 4Tb. It is no fun to run that many times. Another advantage of above script is that it first reports. Actually removing is an option. No warnings File::Find, because I don't care if folders are removed while running or symbolic links still exist or NFS (if a user chooses to do so) falls inactive. Enjoy, Have FUN! H.Merijn
In Section
Cool Uses for Perl
|
|