Compressing files is an important skill to have. You never know when you might need to move large amounts of data, and knowing how to compress them into a smaller sized single archive can save you a lot of time and disk space. Compressed files are particularly useful for backups and long-term storage of data.
Most desktop operating systems provided built-in support for zip, tar, and/or gzip files. With a graphical interface, it is easy to create compressed files, but on a server, you need to learn how to do it from the command line. The most common Linux compression format is .tar.gz, which is a tarball compressed with gzip.
To compress a directory containing files, type from the secure shell (SSH) prompt:
tar -pczf name-of-archive.tar.gz /home/user/files
You should now have a compressed archive that you can transfer easily and uncompress when you need it.