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