I have some zip
files that are really large and I want to print them without extracting first. I am using zcat
and zless
to do that and then I redirect the output to a different application. When my zip
file contains more than one text file I receive the following error:
zcat tweets.zip >a
gzip: tweets.zip has more than one entry--rest ignored
How can I do what I want with zip
files that contain more than one text file?
If you are looking to print the entire contents of your archive, use the Classic window display. You can also print a listing of the files in an archive from a Windows Explorer window. Simply right click on the archive and choose Print from the right click shortcut menu.
Press [Ctrl], and select the files you want to print. (If the files are adjacent, select the first file in the list, press [Shift], and select the last file in the list.) Right-click the selection, and select Print from the shortcut menu. Select the desired print options, and click OK.
You can do this to output a file without extracting:
$ unzip -p <zip_file> <file_to_print>
For example:
$ unzip -p MyEar.ear META-INF/MANIFEST.MF
As cur4so mentioned you can also list all files using:
$ unzip -l <zip_file>
Use the -p
option of unzip to pipe the output. Multiple files are concatenated. The -c
option does the same thing, but includes the file name in front of each file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With