LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-03-2003, 10:30 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,637

Rep: Reputation: 54
Tar command


Hi folks

What will be the correct syntax to untar a tarball to a selected folder

e.g.

Tarball in /user/download/xxx-000.tar.gz
Preferred to untar to /opt/

$ tar zxvf /user/download/xxx-000.tar.gz -C /opt/

will a directory 'xxx-000' be automatically created under /opt/xxx-000

Kindly advise.

Thanks in advance.

B.R.
satimis
 
Old 11-03-2003, 10:44 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
The name of the tarball does not
necessarily reflect the name or
structure of the content.

If the tarball i.e. contained just
files, no directory structure, you'd
get all files extracted to /opt

Cheers,
Tink
 
Old 11-03-2003, 11:06 PM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Try 'tar tzvf file.tar.gz' to see the contents - that'll show you the directories (if any) that will be created at and below the target directory when you actually extract it. (At least, it should - may depend on how the thing was tarred, but I think it does in all circumstances.) I need to 'man tar' on that, and you could too. *g*
 
Old 11-03-2003, 11:34 PM   #4
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,637

Original Poster
Rep: Reputation: 54
Hi all

Noted with thanks

satimis
 
  


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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 03:48 AM
Tar command juanb Linux - General 4 11-03-2005 01:10 AM
tar command? xmdms Linux - General 4 10-07-2004 02:29 PM
tar command harisankar Linux - General 2 08-02-2004 01:44 PM
tar command.. johnyy Linux - Software 4 12-31-2003 11:54 PM


All times are GMT -5. The time now is 06:42 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