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