[NTLUG:Discuss] Tar Exclude file question
NTLUG
ntlug at nfri.com
Fri Feb 6 16:34:32 CST 2004
On Fri, 2004-02-06 at 11:51, Stephen Davidson wrote:
> Greetings.
>
> I am trying to put together a custom backup script using tar. Due to file size limitations, I need to break the tar file down into some smaller
> chunks. So. what I am trying to do is tar this one directory, w/o several very large subdirectories in it. Each subdirecty in question (about 6
> out of 20) will be its own tar ball.
>
> So I figured I would run tar on the directory, and list the subdirectories in question as exclusions using the -X option. Problem is, when I put
> more than one file in the excludefiles.txt file, tar won't add anything. So what is the format for multiple files? I have tried several variations;
>
> first idea;
> dir1
> dir2
> dir3
>
> second idea
> dir1 dir2 dir3
>
> third idea
> dir1, dir2, dir3
>
> So what should it be?
>
Each exclude needs to be seperately represented.
For instance...
tar cvf backup.tar /directory --exclude mp3 --exclude jpeg --exclude jpg
and it will exclude files or directorys that include those
letters/numbers. Meaning file.MP3 would get added using the above
example, but file.mp3 would not.
I use this in a regular file backup routine that I do, but I don't want
to include any music or image files.
--
Woody
In a world without boundaries why
do we need Gates and Windows?
More information about the Discuss
mailing list