[vox-tech] Question about Tar

Ricardo Anguiano vox-tech@lists.lugod.org
Tue, 27 May 2003 09:42:57 -0700


"Richard Crawford" <rscrawford@mossroot.com> writes:

> I've been trying to create a tar file which contains everything in our
> website except files in subdirectories called "message".
[...]
>
> According to the documentation I've read, including man tar, this
> *should* work, but it isn't.  What am I doing wrong?

The info documentation is usually more complete.  Here's what I did:

     [anguiano@mordack anguiano]$ ls -lR a
     a:
     total 4
     -rw-rw-r--    1 anguiano anguiano        0 May 27 09:39 a
     -rw-rw-r--    1 anguiano anguiano        0 May 27 09:39 b
     -rw-rw-r--    1 anguiano anguiano        0 May 27 09:39 c
     drwxrwxr-x    2 anguiano anguiano     4096 May 27 09:41 t

     a/t:
     total 0
     -rw-rw-r--    1 anguiano anguiano        0 May 27 09:39 message
     -rw-rw-r--    1 anguiano anguiano        0 May 27 09:41 message01
     [anguiano@mordack anguiano]$ tar cvfz a.tar.gz a --exclude "message*"
     a/
     a/a
     a/b
     a/c
     a/t/

-- 
Ricardo Anguiano
http://www.codesourcery.com