DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Compress File In SSH

  • submit to reddit
        The below will compress a file or folder in .tar.gz format in SSH.

tar -zcvf <new_tar_filename>.tar.gz <filename/directory>


Snippets Manager replied on Sun, 2007/10/28 - 6:27am

IMHO, this has nothing to do with SSH. When u say "in SSH" you probably mean just the Shell... That's just like saying 'in HTTP' if you mean HTML. A better title would have been: "Use tar to archive files"