Skip to content

Instantly share code, notes, and snippets.

@thewellington
Created November 6, 2013 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thewellington/7341289 to your computer and use it in GitHub Desktop.
Save thewellington/7341289 to your computer and use it in GitHub Desktop.
tar and zip all the directories into individual .tgz files
#!/bin/bash
#
# Used to tar up all the directories in the cwd and create tgzs with the names of the original directories
for i in `find . -type d -depth 1`; do tar -czvf $i.tgz $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment