Listing Contents of tar.gz file


 
Thread Tools Search this Thread
Operating Systems Solaris Listing Contents of tar.gz file
# 1  
Old 11-25-2010
Listing Contents of tar.gz file

Hi fellows,

Can you please share any command with which I can list down the file names inside a tar.gz file.
I have tried with these possibilities but in vain.

Code:
bash-3.00$ tar -ztvf file.tar.gz
tar: z: unknown function modifier
bash-3.00$ tar ztvf file.tar.gz
tar: z: unknown function modifier
bash-3.00$ tar jtvf file.tar.gz
tar: j: unknown function modifier

Moderator's Comments:
Mod Comment code tags, please!

Last edited by DukeNuke2; 11-25-2010 at 01:33 PM..
# 2  
Old 11-25-2010
Code:
gunzip -c file.tar.gz

Code:
gunzip -c file.tar.gz | tar -tvf -

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Listing the contents of a file after a timestamp

Hi All I have a file which contains the timestamp of the log and a message and I want to implement a polling mechanism, where this log file is pooled every 2 minutes and list the errors in the file. I want to list down the errors only after the timestamp in the file is more than the current... (2 Replies)
Discussion started by: infyanurag
2 Replies

2. Shell Programming and Scripting

Listing contents of fields

I am often given log files at work in .csv format to work with, normally extracting various fields. I then have to figure out the number of each field so that I can extract that field with cut or awk. Normally I just manually count the fields, based on the field separator. I would like to be... (3 Replies)
Discussion started by: stumpyuk99
3 Replies

3. UNIX for Dummies Questions & Answers

Listing contents of .tar.gz files

Hi All, I would like to know couple of ways to list the content available in tar and gzipped file without extracting. i.e., I would like to display the contents of test.tar.gz without extracting. Note :: please suggest a command other that tar -ztvf (9 Replies)
Discussion started by: Girish19
9 Replies

4. AIX

Slow listing of LTo5 tape contents

Hi, We are taking our filesystem backup having size of 1.3 TB on LTO5 catridges using the following command find * -print|backup -ivf '/dev/rmt0' '-U' i.e backup byname and it took about 6.5 Hours to complete When we are listing same tape contents using the following command restore... (1 Reply)
Discussion started by: m_raheelahmed
1 Replies

5. Shell Programming and Scripting

How to grep the contents inside a tar file

Hi All I have searched the possibility of this options everywhere but am unable to find it in any forum. I have a tar file inside which there are n number of files and i dont know them. I need to grep a word inside the tar file and need to know in which file the word resides. > cat a... (2 Replies)
Discussion started by: Whiteboard
2 Replies

6. AIX

how to take tar backup of the contents of a file

Hi I have a file named files.2.backup which holds the location of some directory and file i,e $ cat files.2.backup /d01/app/oracle/product/7.3.2/dbs/fortest_syst_01.dbf /d01/app/oracle/product/7.3.2/dbs/fortest_temp_01.dbf /d01/app/oracle/product/7.3.2/dbs/fortestdata_01.dbf... (5 Replies)
Discussion started by: sumanbangladesh
5 Replies

7. UNIX for Dummies Questions & Answers

Listing contents

Hello guys, I am having a requirement, I am having three file m1,m2,m3 having some contents. I want to list last 20 lines of m1,m2 and m3 all together on the terminal. I used tail -20 m1 m2 m3, but it is showing error, tail: option used in invalid context -- 2 Can u help me... (2 Replies)
Discussion started by: mraghunandanan
2 Replies

8. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

9. UNIX for Dummies Questions & Answers

Listing the contents of a shared Unix library

I am brand new to Unix. This is probably simple, but how do you list the contents of a shared library? I need to see which functions exist in it. Many thanks. (1 Reply)
Discussion started by: mickpoil
1 Replies

10. Solaris

TAR command , listing backed up files

I've backed up several files to tape using tar, and wish to list those that have backed up. % tar cvf /dev/rmt/2un /s_1/oradata/pgpub/config.ora a /s_1/oradata/pgpub/config.ora 2 tape blocks But when I go to list the files: % tar tvf /dev/rmt/2un tar: tape read error What am I... (3 Replies)
Discussion started by: FredSmith
3 Replies
Login or Register to Ask a Question