ubuntu use compression for directory code example Example: compress folder ubuntu tar -czvf name-of-archive.tar.gz /path/to/directory-or-file