Gossamer Forum
Home : General : Internet Technologies :

excluding directory from tar file

Quote Reply
excluding directory from tar file
Anyone know the syntax for excluding a single or multiple directories from a tar backup.

In my telnet I currently use:
Code:
tar -cf backup.tar /home/ftp/pub

but I would also like to exclude the directory

/home/ftp/pub/images/large

from being tarrred.

I`ve looked at the unix help but can`t understand it, doh..

cheers

chmod
Quote Reply
Re: [chmod] excluding directory from tar file In reply to
You'll need to use the exclude flag...

something like --directory / --exclude=proc --exclude=mnt --exclude=archive \


For more information, there are quite a few web pages that offer examples:

http://www.google.com/...xclude+directory+tar
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] excluding directory from tar file In reply to
cheers for that, I`ll understand it with trial and error Smile