Created
June 5, 2013 15:53
-
-
Save paulboardman/5714993 to your computer and use it in GitHub Desktop.
find command for finding and removing empty directories/files whilst ignoring certain dirs (in this case the knime tree).
This file contains 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
# first print out the files/dirs | |
find . -path "*/knime/*" -prune -or -empty -print | |
# if you're happy with the list then we can get rid of them | |
find . -path "*/knime/*" -prune -or -empty -print | xargs rm -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment