Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Created October 19, 2010 18:39
Show Gist options
  • Save xeoncross/634779 to your computer and use it in GitHub Desktop.
Save xeoncross/634779 to your computer and use it in GitHub Desktop.
Backup all files in this directory and all sub directories by size or type
# backup small files (text files?)
find /home/user -type f -size -100k -print0 | tar -c -z --null --files-from=- -f backup.small.files.tgz
# Backup PHP files
find /home/user -type f -name '*.php' -print0 | tar -c -z --null --files-from=- -f backup.php.files.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment