LinuxQuestions.org
Visit Jeremy's Blog.
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 11-03-2003, 09:30 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
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, 09:44 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
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, 10: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, 10:34 PM   #4
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi all

Noted with thanks

satimis
 
  


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

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

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