Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Linux / Unix pack command

Quick links

About pack
Syntax
Examples
Related commands
Linux / Unix main page

About pack

Shrinks file into one small (compressed) file so that it does not take as much space up. The file or files will be replaced by a packed file .Z.

Syntax

pack [-f] [-] filenames

-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 .
- 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.
filenames The name of the files that you want to pack.

Examples

pack -f myfile.txt - packs the file myfile.txt and renames that file to myfile.txt.z. When successfully packed will receive message similar to the following"

pack: myfile.txt: -1.8% Compression

No packing will occur if:

  • the file appears to be already packed

  • the file name has more than 14 - 2 bytes

  • the file has links

  • the file is a directory

  • the file cannot be opened

  • the file is empty

  • no disk storage blocks will be saved by packing

  • a file called file .z already exists

  • the .z file cannot be created

  • an I/O error occurred during processing.

Related commands

cat
compress
pcat
tar
unpack
zcat

 

Index

Category:
Linux / Unix

Companies:
Click here

Related Pages:

 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope