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