Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-20-2008, 04:48 AM   #1
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Rep: Reputation: 15
opening tar to another directory

hi everyone..
in /home/user1 there is a file.tar ..and i want to extract it to /home/user2/openedFiles...

i thought syntax should be

tar xvzf file.tar /home/user2/openedFiles

but there is something missing i guess, it doesn't work..can anyone help?
Old 03-20-2008, 04:56 AM   #2
Registered: Oct 2004
Distribution: Fedora, Debian, Free BSD
Posts: 71

Rep: Reputation: 15
tar -zxvf tarball.tar.gz -C <directory>
Old 03-20-2008, 04:57 AM   #3
Registered: Oct 2005
Distribution: Ubuntu 9.04
Posts: 124
Blog Entries: 2

Original Poster
Rep: Reputation: 15
ohhh my god!!
why would they need an extra option tag for that?
Old 03-20-2008, 04:57 AM   #4
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
If its just a tar file, you can do
$tar xvf somefile.tar -C <directory>


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
Not successful in opening *.tar.gz files Erik_the_Red Linux - Newbie 3 05-31-2005 11:04 AM
Opening of a tar.bz2 file Gins Linux - General 8 04-08-2005 04:42 PM
Opening a .tar file njschroe Linux - Software 1 02-02-2005 01:56 PM
opening tar files zeviddalop Linux - Newbie 5 10-25-2004 08:27 PM
Opening .tar.bz2 files dominique Linux - Newbie 7 11-30-2001 03:41 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:48 AM.

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