LinuxQuestions.org
Help answer threads with 0 replies.
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 12-30-2006, 07:57 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit LOL), USA
Distribution: Centos 6.7 Under VMware in Win7
Posts: 436

Rep: Reputation: 33
Question TAR Extract Question.


Help..

I have a huge tar file and I only need one file from it.

I've been trying to extract the one file with the following command but can't seem to get it.

Could anyone give me a hand with the proper command:

tar -xvf blog_work_linux.tar

I need the Readme.txt file from this tar file. I've tried a number of commands such as:

tar -xvf blog_work_linux.tar Readme.txt

and

tar -xvf blog_work_linux.tar /Readme.txt

and nothing works.

Thanks.
 
Old 12-30-2006, 08:07 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Quote:
tar -xvf blog_work_linux.tar Readme.txt
That's the correct syntax for extracting one file. Question: are you certain you spelled Readme.txt correctly? Are you sure it isn't README.txt?

"tar --list --file=blog_work_linux.tar" to list the archive and verify the spelling and case of Readme.txt.
 
Old 12-30-2006, 10:15 PM   #3
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit LOL), USA
Distribution: Centos 6.7 Under VMware in Win7
Posts: 436

Original Poster
Rep: Reputation: 33
Thanks bigrigdriver.

Yep. that the correct name of the file.
 
Old 12-30-2006, 11:53 PM   #4
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
Try opening it with a GUI archiving tool and verify the name. You can extract the one file with the same GUI tool.
 
Old 12-31-2006, 12:39 AM   #5
Ha1f
Member
 
Registered: Jun 2005
Location: University of Maryland
Distribution: FreeBSD
Posts: 268

Rep: Reputation: 30
do
Code:
tar -t blog_work_linux.tar
to make sure thats the correct name of the file.
 
Old 12-31-2006, 01:42 AM   #6
FnordPerfect
Member
 
Registered: Dec 2006
Location: Germany
Distribution: Kubuntu (Feisty Fawn), Debian (SID)
Posts: 127

Rep: Reputation: 15
hm, strange.
Look at the tarball's content using

$ tar -tf blog_work_linux.tar

and check whether the Readme.txt is in the "root directory" of the tar.
In case it is contained in a sub-directory you have to give the tar command the full path to it!

e.g.
Code:
tar -tf blog_work_linux.tar
docs/Readme.txt
docs/HOWTO.html
stuff/
stuff/1.html
stuff/2.html
then you have to type

tar -xf blog_work_linux.tar docs/Readme.txt

Or ... just use a GUI utility, as proposed.
 
Old 12-31-2006, 11:17 AM   #7
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, (Which Exit LOL), USA
Distribution: Centos 6.7 Under VMware in Win7
Posts: 436

Original Poster
Rep: Reputation: 33
Smile

Thanks all,

I'll try some of this out and advise.
 
  


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 to extract tar.gz file ???/ wahaha Linux - Software 6 10-27-2007 09:33 AM
how to extract mutiple tar.gz int21h Linux - Newbie 14 12-08-2005 07:58 AM
How to extract a tar.gz file? deWin Linux - Newbie 3 11-10-2004 12:24 PM
Choosing where to extract tar.gz Arclite Linux - Software 14 08-14-2003 04:57 PM
extract error tar.gz eye Linux - Software 6 05-18-2003 01:00 PM


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