create a tarball in ubuntu code example Example: how to tar a file tar -czvf name-of-archive.tar.gz /path/to/directory-or-file