Created
August 16, 2010 11:14
-
-
Save IanVaughan/526799 to your computer and use it in GitHub Desktop.
This will tar all the subfolders within the PWD, uncomment the rm at your peril!
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
#!/bin/bash | |
# This will tar all the subfolders within the PWD, uncomment the rm at your peril! | |
DIRS=`ls -d */` | |
for DIR in ${DIRS}; do | |
TAR_PATH=${DIR%%/} | |
echo "Processing : $TAR_PATH" | |
tar -zcvf ${TAR_PATH}.tar.gz ${TAR_PATH} > ${TAR_PATH}.tar.gz.log | |
# rm -rf ${TAR_PATH} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment