Created
May 23, 2017 06:08
-
-
Save khoatran/a665a2c86d226b7ad86cd0fb2a642312 to your computer and use it in GitHub Desktop.
Delete all files and folder except one
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
shopt -s extglob | |
rm -rf !(file-or-folder-name-to-keep) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment