Created
February 4, 2023 15:57
-
-
Save sanyamsmulay/94d871208521375aab0f44690c4a66df to your computer and use it in GitHub Desktop.
tar all sub-dirs inside a dir
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 | |
echo "going to tar all dirs, in this path:" `pwd` | |
## TODO: ignore files, | |
## TODO: a flag for managing overwrites | |
for i in * | |
do | |
tar -czvf "$i.tar.gz" "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment