LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ungzipping/untarring to another directory? Surely! (https://www.linuxquestions.org/questions/linux-newbie-8/ungzipping-untarring-to-another-directory-surely-61227/)

hamster 05-22-2003 03:04 PM

ungzipping/untarring to another directory? Surely!
 
Hi,

I was trying to ungzip and untar a file to another directory. I can extract to the directory I'm in but I can't to another directory: ie

tar xvfz xmmdmp.tar.gz /$HOME/destination/

tar is assuming the 2nd argument is also a file to be uncompressed but I want it be the extraction destination. The man pages don't mention this. I know I can mv it afterwards but just wondering though if I ever need to do this in an emergency situation.

Thanks.

manthram 05-22-2003 03:09 PM

i think there is a option -C to change the directory. i dont know if it does what you want or something else. i never tried it.

Tinkster 05-22-2003 03:09 PM

You can't have read
man tar
very thoroughly mate...


Try again ;)
Code:

man tar
/directory

And find the option -C ... would
that do what you want?

Cheers,
Tink

hamster 05-22-2003 03:35 PM

Quote:

And find the option -C ... would

:rolleyes:

Must be one of those days... thanks. The man is cryptic about it, eg:

-C, --directory DIR
change to directory DIR


change what? :) What's wrong with: "this specifies the extraction path? " or similar ;)


Thanks guys!

Tinkster 05-22-2003 06:22 PM

No worries, most of my days are like this :D

And I agree that man should be less cryptic
here ;)

Cheers,
Tink


All times are GMT -5. The time now is 01:32 AM.