Putty ssh commands zip all the files within this folder then download

DCHP picture DCHP · Nov 19, 2011 · Viewed 80.1k times · Source

oh so i cd into my folder

ls
cgi-bin                      wp-comments-post.php  wp-mail.php
googlec3erferfer228fc075b.html  wp-commentsrss2.php   wp-pass.php
index.php                    wp-config-sample.php  wp-rdf.php
license.txt                  wp-config.php         wp-register.php
php.ini                      wp-content            wp-rss.php
readme.html                  wp-cron.php           wp-rss2.php
wp-activate.php              wp-feed.php           wp-settings.php
wp-admin                     wp-includes           wp-signup.php
wp-app.php                   wp-links-opml.php     wp-trackback.php
wp-atom.php                  wp-load.php           xmlrpc.php
wp-blog-header.php           wp-login.php
(uiserver):u45567318:~/wsb454434801 >

What i want to do is zip all the files within this folder then download it to my computer i am really new to ssh and this is a clients website but really want to start to use command line for speed, i have been looking a this reference http://ss64.com/bash/ to find the right commands but would really like some help from somebody please??

Thanks

Answer

Banty Roy picture Banty Roy · Nov 13, 2012
cd path/to/folder/foldername
zip -r foldername.zip foldername *    [use * if it has any sub directory]

Please try this code it will solve your problem.