# cd /home
# tar czvf /backups/home.tgz –exclude apachelog/ *
It may take a while, make it background:
# tar czf /backups/home.tgz –exclude apachelog/ * &
if you have to exclude more than one dir.........then create a file called file.txt
and enlist the dirs with the path.
Now Suppose you want to exclude test1 & test2 dirs..then#vi file
save & exit
Now use tar as ...
# tar cvf xyz.tar.gz -X file test
where -X file is the listed dir from file and test is the tar destination to be created after excluding dirs .
have a nice taring........