Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-19-2005, 01:46 PM   #1
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
Untar File to a specific location !

Is it possible to untar a tar file into a specific location instead of the current directory ? For example if I have test.tar in /home/test and want to extract the contents of the tar into /tmp/, can it be done.

Did try searching around, but everywhere untarrring seems to be done only into the current directory.
I know copying the tar to a specific location and untarring is just one more command, but I wanted to know whether I could do away with that extra command !
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-19-2005, 01:59 PM   #2
Senior Member
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
tar -xf /home/test/test.tar -C /tmp
2 members found this post helpful.
Old 12-19-2005, 06:35 PM   #3
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
man tar would have been helpful here..
Old 12-19-2005, 07:14 PM   #4
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Original Poster
Rep: Reputation: 36
Thnx berhanie !!

Well i did check out the manpage, but not thorougly enough I guess !!


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HowTo add specific location into sources.list? Mathsniper Debian 1 08-28-2005 04:21 AM
Getting problem when untar the .tar.gz file? ramakumard77 Linux - General 2 11-29-2004 11:15 AM
untar gzip file problem jmr0311 Linux - General 8 09-12-2004 04:32 PM
untar more than one file? Sammy2ooo Linux - Newbie 1 12-23-2003 02:39 PM
Mount hardware to specific location with specified device blixel Linux - Hardware 5 10-21-2003 04:21 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:52 PM.

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