Sponsored Content
Full Discussion: Unzipping .Z file in UNIX
Top Forums Shell Programming and Scripting Unzipping .Z file in UNIX Post 302763301 by Chubler_XL on Tuesday 29th of January 2013 09:39:49 PM
Old 01-29-2013
.Z is the standard extension for compressed files so you would typically use $ uncompress file.Z

.z (lowercase Z) is the standard extension for packed files (use unpack to for them).

Last edited by Chubler_XL; 01-29-2013 at 10:45 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unzipping problems in Unix

Hi, I have a zip file in a unix file system that contains approximately 1000000 files. I would like to unzip this file. When I use unzip, the unzip command starts extracting the files , but after extracting 65535 files, I am getting the following error. "note: didn't find... (1 Reply)
Discussion started by: narayanan0
1 Replies

2. 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

3. Shell Programming and Scripting

How to search a pattern inside a zipped file ie (.gz file) with out unzipping it

How to search a pattern inside a zipped file ie (.gz file) with out unzipping it? using grep command.. Bit urgent.. pls..help me (2 Replies)
Discussion started by: senraj01
2 Replies

4. UNIX for Dummies Questions & Answers

reading a zipped file without unzipping it?

Dear all, I would like to ask how i can read a zipped file (file.gz) without actually unzipping it? i think there is a way to do so but i can't remember it.. can anyone help? thanks in advance.. (1 Reply)
Discussion started by: marwan
1 Replies

5. Solaris

Alter zip file without unzipping

I have some zip files. Every file has a "folder/xml file" inside it. Is there any way to change these zip files directly without unzipping them. I want to convert these zip files to "/xml file" (want to move the xml file/s one root up by removing the folder inside it.) Ex: -bash-3.00$ for file... (1 Reply)
Discussion started by: _prasad
1 Replies

6. Shell Programming and Scripting

Unzipping latest zip file by name.

I have these zip files that come in with the same name, but different versions. We'll say: SQL_version2.zip SQL_version3.zip SQL_version2432.zip I was wondering if there is a single command (or even piped command, thus still making it a single command) that will let me unzip the latest... (3 Replies)
Discussion started by: mrwatkin
3 Replies

7. Linux

unzipping file > 2gb

I am not able to unzip file greater then 2gb, Any suggestions how to do that in linux? Regards, Manoj (5 Replies)
Discussion started by: manoj.solaris
5 Replies

8. Shell Programming and Scripting

Unzipping the file

I have my folder structure like a file a.zip is placed in one folder. Inside a.zip is two other zip files x.zip and y.zip If i unzip x.zip i have folder a folder z and inside folder z there are different folders with event time appended to it. Inside the every event folder ,I have a sub folder... (1 Reply)
Discussion started by: weknowd
1 Replies

9. Shell Programming and Scripting

Checking if file exists and unzipping

Hey, I am new to scripting and was wondering what is wrong with this if statement. I want to check if file exists and the if it does to unzip it. I program it as follows if ; then gunzip *_filename.gz fi Thanks in advance! Please use code tags next time for your code and data. (10 Replies)
Discussion started by: mostarac2487
10 Replies

10. Shell Programming and Scripting

Error when unzipping a file with extension .gz

I am trying to unzip a file with name D_R_38957222_20111410.txt.gz using the below command. gunzip D_R_38957222_20111410.txt.gz However, I am getting the following error while using the gunzip command as below... gunzip: D_R_38957222_20111410.txt.gz: invalid compressed data--crc error ... (24 Replies)
Discussion started by: dhruuv369
24 Replies
pack(1) 							   User Commands							   pack(1)

NAME
pack, pcat, unpack - compress and expand files SYNOPSIS
pack [-f] [-] file... pcat file... unpack file... DESCRIPTION
pack The pack command attempts to store the specified files in a compressed form. Wherever possible (and useful), each input file file is replaced by a packed file file.z with the same access modes, access and modified dates, and owner as those of file. If pack is successful, file will be removed. The amount of compression obtained depends on the size of the input file and the character frequency distribution. Because a decoding tree forms the first part of each .z file, it is usually not worthwhile to pack files smaller than three blocks, unless the character frequency distribution is very skewed, which may occur with printer plots or pictures. Typically, text files are reduced to 60-75% of their original size. Load modules, which use a larger character set and have a more uniform distribution of characters, show little compression, the packed versions being about 90% of the original size. pack returns a value that is the number of files that it failed to compress. No packing will occur if: o the file appears to be already packed o the file name has more than 14 - 2 bytes o the file has links o the file is a directory o the file cannot be opened o the file is empty o no disk storage blocks will be saved by packing o a file called file.z already exists o the .z file cannot be created o an I/O error occurred during processing. The last segment of the file name must contain no more than 14 - 2 bytes to allow space for the appended .z extension. Directories cannot be compressed. pcat The pcat command does for packed files what cat(1) does for ordinary files, except that pcat cannot be used as a filter. The specified files are unpacked and written to the standard output. pcat returns the number of files it was unable to unpack. Failure may occur if: o the file cannot be opened; o the file does not appear to be the output of pack. unpack The unpack command expands files created by pack. For each file specified in the command, a search is made for a file called file.z (or just file, if file ends in .z). If this file appears to be a packed file, it is replaced by its expanded version. The new file has the .z suffix stripped from its name, and has the same access modes, access and modification dates, and owner as those of the packed file. unpack returns a value that is the number of files it was unable to unpack. Failure may occur for the same reasons that it may in pcat, as well as for the following: o a file with the ``unpacked'' name already exists; o the unpacked file cannot be created. o the filename (excluding the .z extension) has more than 14 bytes. OPTIONS
The following options are supported by pack: -f Forces packing of file. This is useful for causing an entire directory to be packed even if some of the files will not benefit. Packed files can be restored to their original form using unpack or pcat. OPERANDS
The following operands are supported: file A path name of a file to be packed, unpacked, or pcated; file can include or omit the .z suffix. - pack uses Huffman (minimum redundancy) codes on a byte-by-byte basis. If the - argument is used, an internal flag is set that causes the number of times each byte is used, its relative frequency, and the code for the byte to be printed on the standard output. Additional occurrences of - in place of file will cause the internal flag to be set and reset. USAGE
See largefile(5) for the description of the behavior of pack, pcat, and unpack when encountering files greater than or equal to 2 Gbyte ( 2 **31 bytes). EXAMPLES
Example 1: Viewing a Packed File To view a packed file named file.z use: example% pcat file.z or just: example% pcat file Example 2: Making and Unpacked Copy: To make an unpacked copy, say nnn, of a packed file named file.z (without destroying file.z) use the command: example% pcat file >nnn ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of pack, pcat, and unpack: LC_CTYPE, LC_MESSAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. The number of files the command failed to pack/unpack is returned. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ SEE ALSO
cat(1), compress(1), zcat(1), attributes(5), environ(5), largefile( 5) SunOS 5.10 20 Dec 1996 pack(1)
All times are GMT -4. The time now is 10:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy