How to download files in putty
For example, the following command will download all the files without any subdirectories inside the documents folder from you account to the D drive on your computer:. If you want to transfer a directory together with all the files and subfolders in it, you have to add the option -r. For example:. A tip that may save you some time: by pressing the up arrow key on your keyboard you can browse through the previous commands that you have executed.
With the left and right arrow keys you can move the line cursor to correct mistakes in your commands. Don't forget that you also need to start Pageant and add your private SSH key. After you execute the set path command, you just need to type psftp followed by a space and your master username and the name of the server: e. With cd.. Here is a list with some useful commands:. Files can be downloaded with the get command:. The above command will download a file called examplefile.
This has to be done when you're downloading a file to a directory on your local computer that is not your current working directory. Unlike PSCP, where if you don't specify a name the file will be saved with the original name, with PSFTP if you don't specify a name for the file the get command might not work.
You have the choice whether to use the same name for the target file or to use a different one, but in both cases the content of the file will be the same as that of the source file. Since with PSFTP you can browse and change the working directory on your account cd command , you don't have to type the full path to the file on your account that you want to download.
Using the above example, if you use the cd command e. The same is true for the current working directory on your local computer.
In this case you don't even have to type the name of the target file when you download it to the current working directory on your computer. You can just use get examplefile. To download a directory with all its content including subdirectories , you have to add, as with PSCP, the option -r :. The above command will download a directory called newfolder from the current directory on your account to the D drive on your local computer.
If you don't specify a name for the directory on you local drive e. So the contents of newfolder will be scattered on your D drive.
This, as with files, is the case when the current working directory on your local computer is not your local D drive. If the working directory on your local computer is the D drive, you can just use get -r newfolder.
This will download not only the contents but also the folder itself to the working directory on your computer D drive in this example. Again, as with files, if you want to you can specify a different name for the target directory e. With the command mget you can download multiple files at the same time.
For example, mget examplefile1. With the -r option you can use mget to download multiple directories e. Basically the same rules apply to this command as the ones for get. Only in this case first you specify the file and path on your local computer and then on your account:. The above command will upload a file called examplefile. Note that the scp is OpenSSH program.
Then you're not typing out characters every time you want to pull something, just drag and drop. If your server have a http service you can compress your directory and download the compressed file. If you don't have direct access to the server ip, do a ssh tunnel throught putty, and forward the 80 port in some local port, and you can download the file.
I know this question is pretty old now but this can be helpful for newcomers to this question. You can use the WinSPC program. Its access to any server is pretty easy. The program gives its guide too. I hope it's helpfull. It feels like FTP client. Also I don't remember setting up anything on my machine for this. If you want download your project by Clone URL : you can use command line git clone. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 7 years, 8 months ago. Active 7 days ago. Viewed k times. I'd greatly appreciate any assistance. Update: I am able to use this command on Linux. I have successfully download the folder onto my desktop: I still need insight onto how I can do this on a Windows machine.
Martin Prikryl k 46 46 gold badges silver badges bronze badges. SobieSki SobieSki 1 1 gold badge 5 5 silver badges 5 5 bronze badges. Add a comment. Active Oldest Votes. Though PuTTY supports connection-sharing. I'm the author of WinSCP. Martin Prikryl Martin Prikryl k 46 46 gold badges silver badges bronze badges. Works great! Ashish Ashish 1, 11 11 silver badges 12 12 bronze badges. Compress: tar -zcvf archive-name. So you can use it in command prompt or power shell like bellow.
Luan Souza Luan Souza 99 1 1 gold badge 1 1 silver badge 8 8 bronze badges. Welcome to Stack Overflow!
0コメント