PuTTy SSH Commands – How to Zip a Directory

I momentarily forgot how to zip a directory when using PuTTy today and, like everyone, I use Google as my ultimate source of research and was surpised to find that the big G came up short – so here is the answer to the question “how do you zip a directory and all of its contents using Telnet or PuTTY SSH clients?”

zip -r ZIPNAME directory

You should be in the directory below that which you wish to compress in order to do it in the above way, and ZIPNAME is the name you wish to give the resulting .zip file.

-r is the zip command which stands for “recurse into directories” – the fact I didn’t know this off the top of my head will show you the flawed nature of my learn by trial and error existence as a webmaster.

Simple!

About the Author

Rob Scott

Rob Scott is a 26 year old originating from Wensleydale, in the heart of the Yorkshire Dales National Park (UK). Rob founded 24 Hour Trading Ltd which currently owns and runs a series of websites. Rob writes extensively on a number of subjects here and in several other online publications, while, in his limited free time he develops his poetry. Subscribe to Rob Scott's RSS feed by clicking here. Rob has left Twitter and Facebook, after deciding there is no personal benefit to using either network.

One Response to “ PuTTy SSH Commands – How to Zip a Directory ”

  1. Thanks, great help. Was having trouble with transferring file. Zipped it with your help. Google really doesn’t know much.

Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>