Last active
May 27, 2022 03:22
-
-
Save cheshirecode/64c94dd6e399b78bd2f6021135566551 to your computer and use it in GitHub Desktop.
find and return only sub-directory names
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
#!/usr/bin/env sh | |
# find and return only sub-directory names | |
find . -maxdepth 1 -type d -not -path '.' -printf "%f\n" | |
# fast deletion 11 | |
mkdir empty_dir | |
rsync -a --delete empty_dir/ yourdirectory/ | |
# fast deletion -2 | |
cd DIR # a must-do | |
perl -e 'for(<*>){((stat)[9]<(unlink))}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment