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 12-30-2006, 06:57 PM   #1
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Rep: Reputation: 34
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, 07:07 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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, 09:15 PM   #3
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Original Poster
Rep: Reputation: 34
Thanks bigrigdriver.

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

Rep: Reputation: 90
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-30-2006, 11:39 PM   #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, 12: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, 10:17 AM   #7
swamprat
Member
 
Registered: Sep 2005
Location: New Jersey, USA
Distribution: VMware V12 and V15 in Windows 10, MX Linux 23.1, Kubuntu 23.10, IBM z/VM 5.4
Posts: 558

Original Poster
Rep: Reputation: 34
Smile

Thanks all,

I'll try some of this out and advise.
 
  


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

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

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