[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tar: Member name contains `..'
From: |
Brenda J. Butler |
Subject: |
Re: tar: Member name contains `..' |
Date: |
Sun, 31 Oct 2004 11:06:29 -0500 |
User-agent: |
Mutt/1.3.28i |
On Wed, Oct 27, 2004 at 05:03:11AM +0000, Doofus wrote:
> tar (GNU tar) 1.13.25
> SuSE Linux 8.2
>
> I'm trying to extract a directory one level up from the directory the
> archive was created in.
>
> For each file in that upper-level directory, I get a
>
> Member name contains `..'
>
> message and no extraction. Doesn't matter if I extract to stdout,
> whether I'm root, or what. I've also tried '--strip-level=1' but my
> version of tar doesn't recognize that option, and I'm uncertain that
> it would resolve this anyway.
>
> I'm not trying to do anything funny. I'm just trying to restore some
> files. So far, I haven't found any reference to '..' in 'info tar'
> yet, nor the man page, nor on-line. I'm still looking, of course.
>
> Any help appreciated.
So, the way I understand it is:
you have a tar file of stuff like
path/to/file1
path/to/file2
path/to/another/file3
(You can tell what's in the tarfile with the -t command:
tar -tvf tarfile)
You (and the tarfile) are in directory "another" and you'd like
to extract file1 and file2 to directory "to".
If that is the case, then use the -C option:
tar -C ../../.. -xf tarfile.tar path/to/file1 path/to/file2
Or you can:
cd ../../..
tar -xf path/to/another/tarfile.tar path/to/file1 path/to/file2
>
> _______________________________________________
> help-gnu-utils mailing list
> help-gnu-utils@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-utils
---end quoted text---
--
bjb at istop dot com
Open Source Weekend http://www.osw.ca
5F82 9855 E247 1F8A 49CD 053E FB03 E77F 2A19 D707