LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 03: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, 03:09 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 03: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, 03: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, 06:22 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

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

Cheers,
Tink
 
  


Reply



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 08:48 PM
Untarring files????? caleb star Linux - Newbie 3 02-03-2004 08:28 AM
Untarring to another directory adz Linux - Software 5 07-18-2003 10:09 AM
untarring, installing contrasutra Linux - Software 6 03-08-2003 12:09 PM
Ping - Surely this should be simple???? chaste Linux - Networking 8 08-06-2002 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:04 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
Open Source Consulting | Domain Registration