Compressing a file is handy for reducing the amount of disk space it uses, but you can't do much with a compressed file—directly, at least. You'll need to uncompress it first. As Code Listing 13.9 shows, you do so using the uncompress command.
To uncompress a file with uncompress:
uncompress labrea.tar.Z
Tip
Remember that uncompressed files take up more space—sometimes lots more space—than compressed files. You might want to check your storage quota with your ISP before you uncompress a file to make sure that you don't exceed your limit. As Chapter 7 explains, you can check your quota by typing quota -v at the shell prompt.
Tip
You can add the -c flag to uncompress to leave the original file untouched and send the uncompressed version to standard output. For example, you might use uncompress -c tarred.tar.Z > tarred.tar. See Chapter 1 for more information on redirecting output, as is shown here.
Tip
You can also use gunzip to uncompress compressed files. Check out Unzipping zipped files with gunzip later in this chapter.
[ejr@hobbes compression]$ ls -l l* -rw-r--r-- 1 ejr users 297027 Jul 27 10:06 labrea.tar.Z [ejr@hobbes compression]$ uncompress labrea.tar.Z [ejr@hobbes compression]$ ls -l l* -rw-r--r-- 1 ejr users 501760 Jul 27 10:06 labrea.tar [ejr@hobbes compression]$ |
3.22.241.228