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