LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-14-2007, 09:51 AM   #1
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu
Posts: 308

Rep: Reputation: 31
extracting tar.gzip files


Hi, sorry to pose such a mundane question but I get no joy after reading the man pages, trying various permutations etc. I know it's something dumb but I can't see it.
I'm trying to extract and unzip the following file: gsmile-0.1.1.linux-i686.tar.gz.
following are a few of the shell entries, "no such file' is the constant err msg. File belongs to me in permissions.

Code:
mathay@linux-lqc2:~> ls
addresses.odt     Garden                          public_html
As I Remember it  Georgie Stories.odt             Recipes
bin               gsmile-0.1.1.linux-i686.tar.gz  Suse10.1 WiFi.odt
BkUp_Script       Intel Wireless.pdf              TauMtg2008Sep.doc
BlueToothSend     Linux_Set-Up_HelpFiles          unix_commands
books2006.odt     music                           Walks.odt
Desktop           perl
Documents         Pictures
mathay@linux-lqc2:~>  

`````````````````````````````````````````````````````````````````````````````
mathay@linux-lqc2:~> tar -xvf-z /gsmile-0.1.1.linux-i686.tar.gz
tar: -z: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
mathay@linux-lqc2:~>
Thank you in advance for your help.
Matthew
 
Old 08-14-2007, 09:55 AM   #2
cgjones
Member
 
Registered: Nov 2005
Location: Central New York
Distribution: Ubuntu
Posts: 405

Rep: Reputation: 31
Try the following while in the same directory as the file you are trying to extract.
Code:
tar -xzf gsmile-0.1.1.linux-i686.tar.gz
 
Old 08-14-2007, 09:57 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Code:
tar: -z: Cannot open: No such file or directory
Here is the reason: tar is looking for a file called "-z". Indeed, in the tar command the name of the archive to extract must follow the -f option!
 
Old 08-14-2007, 10:45 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
And if you want to know how it happens step by step, here it is: first you have a gzip-compressed tar-archive called gsmile-0.1.1.linux-i686.tar.gz. Then you gunzip-uncompress it:
Code:
gunzip gsmile-0.1.1.linux-i686.tar.gz
and you get the tar file out of it, called gsmile-0.1.1.linux-i686.tar
Then you untar it with
Code:
tar -xf gsmile-0.1.1.linux-i686.tar
and get out whatever is in the tar archive. The command tar -xzf simply includes the "gunzip" part (the -z option; it would be -j for bzip2 archives), making these two steps in one command.
 
Old 08-14-2007, 12:25 PM   #5
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu
Posts: 308

Original Poster
Rep: Reputation: 31
Thx guys,
Of course it worked straight off.
Was easy to tell I haven't opened too many zipped tar balls
Matthew

Last edited by drmjh; 08-14-2007 at 12:26 PM. Reason: (sp)
 
Old 08-14-2007, 09:30 PM   #6
jilloper
Member
 
Registered: Aug 2007
Distribution: Ubuntu
Posts: 43

Rep: Reputation: 15
im having the same problem
 
Old 08-15-2007, 02:30 AM   #7
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu
Posts: 308

Original Poster
Rep: Reputation: 31
extracting tar/gzip/b2zip files

try posting the code snippets you used here to try to extract the files. That might make the mistake (s) obvious.
Matthew
 
  


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
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 11:02 AM
Using utilities (tar,gzip) from Debian on files on XP? Lexia Linux - Server 4 03-21-2007 03:35 PM
extracting multiple files with tar -xjvf logicalfuzz Linux - Software 3 11-06-2005 01:21 AM
geting problem in extracting tar files p_garg Linux - Enterprise 1 09-29-2005 02:53 PM
extracting tar.bz2.gz files crank Linux - Newbie 5 04-18-2004 11:33 PM


All times are GMT -5. The time now is 10:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration