cancel
Showing results for 
Search instead for 
Did you mean: 
Trevor
Commander Commander
Commander
  • 43 Views

Remove Empty Directories

I want to remove all directories (and subdirectories) that are empty - in the current directory.
One command I know that will accomplish this is:

         $  find . -type d -empty -exec rmdir -v {} \; 2>/dev/null

 

Is there any other single command - NOT script, or chaining of commands
via pipes -  that that can accomplish this?

If there isn't any other single command to accomplish this, I'll entertain other
methods.  However, I'm primarily interested in 'siingle' commands!!!!

 

Trevor "Red Hat Evangelist" Chandler
Labels (3)
0 Kudos
0 Replies
Join the discussion
You must log in to join this conversation.