LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2003, 04:04 PM   #1
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
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.
 
Old 05-22-2003, 04:09 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 05-22-2003, 04:09 PM   #3
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
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.
 
Old 05-22-2003, 04:35 PM   #4
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Quote:
And find the option -C ... would



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!
 
Old 05-22-2003, 07:22 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

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

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

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Untarring and installing grilledsalad Linux - Newbie 4 01-01-2005 09:48 PM
Untarring files????? caleb star Linux - Newbie 3 02-03-2004 09:28 AM
Untarring to another directory adz Linux - Software 5 07-18-2003 11:09 AM
untarring, installing contrasutra Linux - Software 6 03-08-2003 01:09 PM
Ping - Surely this should be simple???? chaste Linux - Networking 8 08-06-2002 09:42 AM


All times are GMT -5. The time now is 02:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration