Thanks a lot.
-----Original Message-----
From: Helmut Waitzmann [mailto:[EMAIL PROTECTED]
Sent: 2007年8月31日 2:58
To: Na (Anne) Zou
Cc: [email protected]
Subject: Re: [Bug-tar] tar: ../tmp/a.log: Member name contains `..'
"Na (Anne) Zou" <[EMAIL PROTECTED]> writes:
>Yesterday I ran "tar cvfz ../tmp.tgz ../tmp" under i386-Linux, then get
>tmp.tgz successfully. Since I'll take it to customer, I check it in my
>PC, winrar can untar it. But when I run "tar xvfz tmp.tgz" in customer's
>Linux system, it failed with message "tar: ../tmp/a.log: Member name
>contains `..'". It caused me one hour to get data transport again.
>
>I tried in the same Sun computer later. As soon as ".." is involved,
>untar can't be done although tar can be completed successfully. I
>suggest solving this bug if it is a bug. If it can't be solved, please
>at lease warn people when they tar it.
You might read the GNU tar info manual, Section ?6.10.2 Absolute File
Names? to understand, what's going on there. After that consider to use
the option ?--absolute-names?, when extracting the archive.
If you want that to be tar's default behavior, you can put that option in
the environment variable TAR_OPTIONS, when invoking GNU tar:
$ env TAR_OPTIONS=${TAR_OPTIONS:+"$TAR_OPTIONS "}'--absolute-names' \
tar xvfz tmp.tgz
--
Wer mir E-Mail schreiben will, stelle | When writing me e-mail, please
bitte vor meine E-Mail-Adresse meinen | precede my e-mail address with
Vor- und Nachnamen, etwa so: | my full name, like
Helmut Waitzmann <[EMAIL PROTECTED]>, (Helmut Waitzmann) [EMAIL PROTECTED]