How to read compressed files in unix




















To extract. Z files, at the shell prompt, enter:. Use the ls command to check the resulting files. If uncompress creates a. Alternatively, to do this in one step and avoid creating the intermediate filename.

Files ending in. To decompress a gzipped file, at the Unix prompt, enter:. Replace filename with the name of the file you wish to expand. It doesn't matter if you include the. If you don't have enough disk space to decompress the file, or you only want to see the contents once and have the file stay compressed, you can send the contents of the file to the standard output usually your terminal , by using the zcat command.

The call to stat will not tell you about individual files being compressed, as this flag means that the file system is compressed. Unfortunately, you cannot read compressed files the way you do normal files.

You must first expand, or uncompress, the files. How you do that depends on the program used to compress the file in the first place. Replace filename with the name of the file you wish to expand. To compress files you can use gzip , bzip2 and zip commands.

Z were compressed with the compress program. To expand such a file, at the Unix prompt, enter:. Replace filename with the name of the file you wish to expand. It doesn't matter if you include the. Z in the filename. Files ending in. To uncompress a gzipped file, at the Unix prompt, enter:. If you don't have enough disk space to uncompress the file, or you only want to see the contents once and have the file stay compressed, you can send the contents of the file to the standard output usually your terminal , by using the zcat command.

For example, to read the uncompressed contents of myfile. Note: On some Unix systems, zcat may work only on. Home » Linux. Like this post? Please share to your friends:. Even though HyperTerminal is not a part of Windows 10, the Windows 10 operating.

Move the mouse pointer to the lower left corner of the screen, right-click, and.



0コメント

  • 1000 / 1000