LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-20-2008, 03:48 AM   #1
laucian
Member
 
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, 03:56 AM   #2
zeeshanhayat
Member
 
Registered: Oct 2004
Distribution: Fedora, Debian, Free BSD
Posts: 71

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

Original Poster
Blog Entries: 2

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

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


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

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

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

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