Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

like image 324
DCHP Avatar asked Nov 19 '11 18:11

DCHP


People also ask

How do I download a folder in PuTTY?

To get files you use a related program, pscp.exe, included with PuTTY. Run the pscp.exe executable on the Windows command line to quickly copy files from a remote PC to the local computer hard drive.


2 Answers

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.

like image 60
Banty Roy Avatar answered Sep 24 '22 15:09

Banty Roy


If you are in directory itself then

zip -r zipfilename.zip  * 
like image 20
Enginerd Sunio Avatar answered Sep 24 '22 15:09

Enginerd Sunio