creating tar archive linux bash code example Example: how to tar a file tar -czvf name-of-archive.tar.gz /path/to/directory-or-file