[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tar question: adding to "fake" subdirectory
From: |
Matthew Cornell |
Subject: |
tar question: adding to "fake" subdirectory |
Date: |
Wed, 4 Jul 2001 10:16:34 -0400 (EDT) |
Hi Folks,
I'm using tar (GNU tar) 1.13.17. I'm relatively new to tar and I have
a question: I'm trying to get tar to add a file under a "fake"
subdirectory in the new archive, such as described in the info
manual. For example, what I'd like to do is something like this:
Assume "." contains s1/, and s1 contains "t.txt":
.
./s1
./s1/t.txt
I would like to add t.txt under the directory "s2" instead of
"s1". However, the documentation for this feature has an error:
File: tar.info, Node: directory, Next: absolute, Up: one
...
Contrast this with the command,
$ tar -c -f jams.tar grape prune -C food red/cherry
which records the third file in the archive under the name `red/cherry'
so that, if the archive is extracted using `tar --extract', the third
file will be written in a subdirectory named `orange-colored'.
...
The text "`orange-colored'" doesn't appear in the example, nor
anywhere else in the documentation. Should it read "a subdirectory
named `red'."? I tried something this, but it didn't work:
tar czf test.tgz -C s1 s2/t.txt
but it said: "tar: s2/t.txt: Cannot stat: No such file or
directory". This makes sense, but please tell me: how *do* I specify
the directory in the archive to add it to? Thank you for writing such
a great program.
Sincerely,
matt
- tar question: adding to "fake" subdirectory,
Matthew Cornell <=