Advertisement
heimi

Tar using here for exclude

Aug 26th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tar cvf /tmp/myfile.tar -C /usr/mysrcdir --exclude-from=- . << EOF
  2. data/*.log
  3. jobs/**/builds/*
  4. EOF
  5.  
  6. # include specific files
  7. tar cvzf /tmp/gosa.tgz -C / --files-from=- << EOF
  8. /etc/ldap/schema/gosa/
  9. /usr/share/gosa/
  10. /etc/gosa
  11. EOF
  12.  
  13. # update specific files (no compressed tar)
  14. tar rvf /tmp/gosa.tar -C / --files-from=- << EOF
  15. /etc/ldap/slapd.d
  16. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement