Created
June 11, 2012 20:12
-
-
Save rbrooks/2912371 to your computer and use it in GitHub Desktop.
Delete all but certain directories in current directory.
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
# Do the Find first, as a trial run. | |
find . -type d \( ! -iname "7604e960-3fc9-012f-2342-52540002105a" ! -iname "760660a0-3fc9-012f-2342-52540002105a" ! -iname "cac012a0-46b5-012f-1584-52540002105a" ! -iname "981fc740-8bf0-012f-2d2b-52540002105a" ! -iname "e268a4d0-95f6-012f-c815-52540002105a" \) | |
# Then do the actual delete. | |
find . -type d \( ! -iname "7604e960-3fc9-012f-2342-52540002105a" ! -iname "760660a0-3fc9-012f-2342-52540002105a" ! -iname "cac012a0-46b5-012f-1584-52540002105a" ! -iname "981fc740-8bf0-012f-2d2b-52540002105a" ! -iname "e268a4d0-95f6-012f-c815-52540002105a" ! -iname "a6e42e40-66fc-012f-f998-525400977599" \) -execdir rm -rfv {} + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment