Skip to content

Instantly share code, notes, and snippets.

@ConradStack
Last active July 25, 2016 18:01
Show Gist options
  • Save ConradStack/19ed5cd4784c807d5a337d0e7c03399f to your computer and use it in GitHub Desktop.
Save ConradStack/19ed5cd4784c807d5a337d0e7c03399f to your computer and use it in GitHub Desktop.
Excluding files from tarball creation
#!/bin/bash
# From: http://www.cyberciti.biz/faq/exclude-certain-files-when-creating-a-tarball-using-tar-command/
tar --exclude-vcs --exclude='nohup.out' -cjf ~/tmp/whatever.tar.bz2 ./*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment