![]() Marketplace:
|
Next: Finding Files
Up: More on Files
Previous: Files Present and Their
  Contents
  Index
File Compression with gzipOften it would be nice to make a file smaller - say, to download it faster, or so it takes up less space on your disk. The program to do this is called gzip (GNU zip). Here's how it works:
This switches to your home directory and copies an arbitrarily chosen file (/etc/profile) to your current directory, in the process renaming it mysamplefile. This gives you a file to play with when using gzip.
Lists the contents of the current directory. Note the size of mysamplefile.
Compresses mysamplefile.
Observe the results of this command: mysamplefile is now called mysamplefile.gz . It's also a good bit smaller.
This uncompresses the file. Observe that mysamplefile has returned to its original state. Notice that to uncompress, one uses gunzip, not gzip.
Use this command to remove the file, since it was just to practice with.
|
Marketplace: |
|||
| Facts: " Measuring programming progress by lines of code is like measuring aircraft building progress by weight. " | |||||
Sunday 5 February 2012 17:39:39 1328463579