Exclude folders from zip – tar

Hits: 1633  

TARTape Archive  (application/x-tar)

tar svnlabs
TAR - svnlabs

A common archive format used on Unix-like systems. Generally used in conjunction with compressors such as gzip, bzip2, compress or xz to create .tar.gz, .tar.bz2, .tar.Z or tar.xz files.

# tar -cvvf foo.tar foo/ –exclude=”/home/svnlabs”

# tar -cvzpP –file=/home/backup.tar.gz –exclude={/dev/*,/proc/*,/sys/*,/tmp/*} /

tar work with directory “/” except for /dev, /proc, /sys, /tmp 🙂

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch