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 09-23-2004, 02:01 AM   #1
linuxtesting2
Member
 
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Rep: Reputation: 30
list files in a tar.gz file


hi!


how can i list files that are zipped down to a tar.gz file?
 
Old 09-23-2004, 02:04 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
tar -tzf <filename>
 
Old 09-23-2004, 02:11 AM   #3
linuxtesting2
Member
 
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Original Poster
Rep: Reputation: 30
That did not help...

[root@localhost root]# tar -tzf file.tar.gz

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors


i can list the files in *.tar with the commando

[root@localhost root]# tar --list --file=file.tar
anaconda-ks.cfg
file.tar.gz
install.log
install.log.syslog

But that commando want work with *.tar.gz
 
Old 09-23-2004, 02:21 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
You only use the z flag if the tarball is gzipped. Otherwise you just drop it. It looks like the file you tried tar -tzf on wasn't gzipped.
 
Old 09-23-2004, 02:49 AM   #5
linuxtesting2
Member
 
Registered: Mar 2004
Location: Norway
Distribution: Freebsd, Fedora, Redhat, Solaris 10
Posts: 169

Original Poster
Rep: Reputation: 30
that was correct, i tried another gz file...thx
 
  


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
untar a list of tar files? Rotwang Linux - General 6 10-10-2006 01:34 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
How to list the files in my tar.bz2 archive ??? merlin23 Linux - Newbie 13 12-14-2004 08:50 AM
can not list tar file juno Linux - Software 2 09-23-2002 02:47 AM
can not list tar file juno Linux - General 2 09-22-2002 11:54 PM


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