Home > Command & Utility > Exclude a Sub-directory in Tar Command

Exclude a Sub-directory in Tar Command

August 27, 2005 Posted by KP

To backup the directory /home/ to file /backups/home.tgz, and exclude /home/apachelog/ :

# cd /home
# tar czvf /backups/home.tgz –exclude apachelog/ *

(double ‘-’)

It may take a while, make it background:
# tar czf /backups/home.tgz –exclude apachelog/ * &



Related Posts:

Filed Under: Command & Utility

Leave a Comment

(required)
(will not be published, required)

* Copy this password:

* Type or paste password here:






Archives

Links