Re: tar problem



enjoyfate wrote:

I have a tar file to extract .When I used " tar jxvf a.tar.bz2 "
command to extract , in current directory it makes mnt/c/....,
extarcted files all in that directory, but i do not want that
prefix ,so how to do that ?

bzcat a.tar.bz2 | pax -r -pp -s,mnt/c/,,

(pax is the standard POSIX utility for reading and writing tar and
cpio files).

If you are running as root and want to preserve ownership then use -pe
instead of -pp.

--
Geoff Clare <netnews@xxxxxxxxxxxxx>
.



Relevant Pages

  • tar problem
    ... command to extract, in current directory it makes mnt/c/...., ... extarcted files all in that directory, but i do not want that ... prefix,so how to do that? ...
    (comp.unix.shell)
  • Re: tar problem
    ... command to extract, in current directory it makes mnt/c/...., ... extarcted files all in that directory, but i do not want that ...
    (comp.unix.shell)
  • Re: tar problem
    ... command to extract, in current directory it makes mnt/c/...., ... extarcted files all in that directory, but i do not want that ... seem to be using the GNU tar, it stripped the leading slash leaving ... creating archives using absolute pathnames except in special cases ...
    (comp.unix.shell)