linux tar exclude folders

/ Published in: Bash
Save to your folder(s)

Ubuntu 10.10

Copy this code and paste it in your HTML
  1. # Exclude only root folders 'files' and 'misc'. Don't touch folders like 'new/files' etc.
  2. tar --exclude={myfolder/files,myfolder/misc} -cvjf testarch.tar.bz2 myfolder/

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.