Created
December 22, 2011 12:27
-
-
Save tuxdna/1510138 to your computer and use it in GitHub Desktop.
Find empty directories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d | ruby -ne 'chomp! ; puts $_ if Dir.entries($_).delete_if {|f| %w{. ..}.include?(f) }.length == 0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment