tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
# To compress a folder in Ubuntu zip -r compressed_filename.zip foldername