RabbieBurns Posted February 9, 2009 Posted February 9, 2009 I'm looking for a script that will recursively search and delete any empty folders. Preferably bash or perl. I might be able to do it myself in bash, but Im not sure how to check for the empty folder?
jamesb Posted February 9, 2009 Posted February 9, 2009 Not really my area, having only limited experience of Linux (though I do use it as my home operating system) but this post might help you with the bash script. UNIX BASH scripting: How to check folder size in linux - Linux Newbie
CyberNerd Posted February 9, 2009 Posted February 9, 2009 bit of a bodge, rmdir should error if the dir isn't empty find . -type d -exec rmdir {} \; 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now