Wednesday, August 29, 2007

Exclude directories in tar

TAR:

tar -cvf httpdocs_06_20_2006.tar.gz
/home/user/domain.com/site
--exclude "/home/user/domain.com/site/excluded-dir1"
--exclude "/home/user/domain.com/site/excluded-dir2"

GNU TAR:

tar -cvf httpdocs_06_20_2006.tar.gz
--exclude "/home/user/domain.com/site/excluded-dir1"
--exclude "/home/user/domain.com/site/excluded-dir2"
/home/user/domain.com/site

No comments: