how to compress data with tar code example Example: tar compress tar -czvf name-of-archive.tar.gz /path/to/directory-or-file