Skip to content

Instantly share code, notes, and snippets.

@stanwu
Created July 24, 2012 18:23
Show Gist options
  • Save stanwu/3171649 to your computer and use it in GitHub Desktop.
Save stanwu/3171649 to your computer and use it in GitHub Desktop.
archive all files to target folder
#!/bin/sh
for i in tar.gz tgz tar.bz2 zip rar
do
find -name "*.$i" -exec archive "{}" true \;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment