compress file in linux tar code example Example: how to zip with tar command Click to copytar -czvf name-of-archive.tar.gz /path/to/directory-or-file