Created
October 10, 2019 04:46
-
-
Save 9to6/dae2bf86be63f2873b98a58e0a7ca3c3 to your computer and use it in GitHub Desktop.
The command to remove old directories exclude last two
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
ls -ld */ | grep "$DIRECTORY_NAME" |head -n -2 | awk '{print $9}' |xargs rm -rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment