how to tar.gz a folder in linux command line code example Example: command to compress folder linux tar -czvf name-of-archive.tar.gz /path/to/directory-or-file