Login or Register to Ask a Question and Join Our Community

view gzipped files with name file.gz.$DATE on a Solaris box (without unzipping first)

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers view gzipped files with name file.gz.$DATE on a Solaris box (without unzipping first)
# 1  
Old 04-07-2011
view gzipped files with name file.gz.$DATE on a Solaris box (without unzipping first)


Howto view gzipped files with name file.gz.$DATE on a Solaris box (without unzipping first)

$ ls -lrt
total 4477
-rwxrwxr-x   1 oracle      dba       569745 Apr  4 19:45 4_person2profileCon.txt.gz.04.04.11*
-rwxrwxr-x   1 oracle      dba         3783 Apr  4 19:45 3_profile2profileCon.txt.gz.04.04.11*
-rwxrwxr-x   1 oracle      dba        60759 Apr  4 19:45 2_profile2groupCon.txt.gz.04.04.11*
-rwxrwxr-x   1 oracle      dba        39246 Apr  4 19:45 1_createProfiles.txt.gz.04.04.11*
-rwxrwxr-x   1 oracle      dba       569751 Apr  5 19:45 4_person2profileCon.txt.gz.04.05.11*
-rwxrwxr-x   1 oracle      dba         3787 Apr  5 19:45 3_profile2profileCon.txt.gz.04.05.11*
-rwxrwxr-x   1 oracle      dba        60955 Apr  5 19:45 2_profile2groupCon.txt.gz.04.05.11*
-rwxrwxr-x   1 oracle      dba        39263 Apr  5 19:45 1_createProfiles.txt.gz.04.05.11*
-rwxr-xr-x   1 oracle      dba       569800 Apr  6 19:45 4_person2profileCon.txt.gz.04.06.11*
-rwxr-xr-x   1 oracle      dba         3792 Apr  6 19:45 3_profile2profileCon.txt.gz.04.06.11*
-rwxr-xr-x   1 oracle      dba        60805 Apr  6 19:45 2_profile2groupCon.txt.gz.04.06.11*
-rwxr-xr-x   1 oracle      dba        39276 Apr  6 19:45 1_createProfiles.txt.gz.04.06.11*

I tried:

$ gzip -d 1_createProfiles.txt.gz.04.06.11 | less
gzip: 1_createProfiles.txt.gz.04.06.11: unknown suffix -- ignored

# 2  
Old 04-08-2011
Cannot. You can pipe out the product of unzipping, using "gunzip <file" for gzcat file1 file2 ...". There might even be a gunzip -o, but I never used it. The zip/gzip/gunzip functionality is also available in many language libraries, so you can pass a call either a string or file name to gzip or gunzip.

PS: zip is an archive program, different though sometimes using some of the same calls, so these are not being "unzipped", they are being "gunzip'd".
# 3  
Old 04-11-2011
try using zcat

zcat < filename >

# 4  
Old 04-12-2011
doesn't work

$ zcat < 1_createProfiles.txt.gz.04.11.11 > tmp
stdin: not in compressed format

# 5  
Old 04-12-2011
zcat is in the compress, LZ family, which is, incidentally, quicker but about twice a big compressed as the gzip, ziplib LZW family, so I use it to speed up some network moves. gzcat can do compress as well as gzip output.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris View/Transfer Files Android Phone

I'm trying to sync/transfer files from my UNIX box and Android Phone and vice versa. I know that Android Phones show up seamlessly (mostly) in Linux given their incestuous relationship. Is there a way to do it in UNIX or more specifically in Solaris 11.3 (i86)?:confused: I haven't found one... (2 Replies)
Discussion started by: Nostradamus1973
2 Replies

2. UNIX for Advanced & Expert Users

Passing resulted string name of a gzipped file as an argument to another piped tool

Hi, I have a .pcap.gz file and I would like to initially gzip it and then pass the resulting .pcap filename as an argument to a piped tool; the right-hand tool is not standardized linux tool but a custom one that strictly requires the string name of a given .pcap file in order for the pcap file... (2 Replies)
Discussion started by: amarn
2 Replies

3. UNIX for Dummies Questions & Answers

Unzipping a file which has multiple folders and each folder has the files with same name in it

Hi, I have a zipped file a.zip. This has got multiple folders in it say x and y. x contains a.txt and y contains a.txt. Is it possible to unzip this file and have the 2 files extracted and rename them to unique names. Thanks in advance. (1 Reply)
Discussion started by: arunkesi
1 Replies

4. Windows & DOS: Issues & Discussions

Issue: Unzipping file containing files/folders with a similar name

Hi, I have a zip file created on a Linxux server that I need to extract on a Windows machine... The zip file containing folders with the same name but they each have a different case, one if camel case and the other is just capitalised. When I extract using 7zip, I get prompted if I want to... (3 Replies)
Discussion started by: muay_tb
3 Replies

5. Shell Programming and Scripting

Finding a text file from a group of zip files without unzipping

HI , There are more than 100 zip files in a directory and i wanted to see if there is a max1157.txt file in any of the zip files without actually unzipping them. Could you please help. Thanks in Advance. Karthik. (6 Replies)
Discussion started by: karthikk0508
6 Replies

6. Solaris

Command to list or view the files in .pkg (solaris) and how to extract without installing

In Linux for .rpm we can list or view the files using the command rpm -qpl <file.rpm> and to extract, the command is rpm2cpio <file.rpm> | cpio -idvh I would like to know the commands which has same functionality as above for solaris ( .pkg) Thanks in Advance (5 Replies)
Discussion started by: frintocf
5 Replies

7. Shell Programming and Scripting

How to view files from a specific date/day

I wan to view files in a directory of a specific date. For example a log directory has log files . I want to view the list of the files which were generated on 01-May-2011. Is there any option/proces to perform it?? (1 Reply)
Discussion started by: mady135
1 Replies

8. Shell Programming and Scripting

Unzipping a file in Solaris - Issue with xls file

Hi, I have an excel file generated by system in windows. I am zipping it, transfering to unix and unzipping there. But i'm getting below output while unzipping. $ /usr/bin/unzip -a 123.zip -d . Archive: 123.zip inflating: ./123/Index.xls When i copy this unzipped xls file to... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

9. Shell Programming and Scripting

script to view files based on date

I have a UNIX box where in files are created every 5 minutes. I need to write a shell script which will take in the date as parameter and return me all files created on that day. Also I will like it to show me only files which have a size greater than 0 i.e. non-empty files. how do I go abt this? I... (6 Replies)
Discussion started by: krahuliyer
6 Replies

10. UNIX for Dummies Questions & Answers

unzipping .zip file on HP and Solaris

I am transferring a large .zip file (20 GB) from an NT server to HP-UX and Solaris servers. Originally I tried to use info-zip's unzip, but I found out pretty quickly that it does not support files over 4GB. Any suggestions on how to work around this problem? Different decompression utility?... (9 Replies)
Discussion started by: dangral
9 Replies
Login or Register to Ask a Question

Featured Tech Videos