Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to download a file to my local computer Windows 7 in my server in Shell using UNIX command.

Is there a way to do this?

I also have Ubuntu installed on my computer. Do I need to do another method for downloading a file from my server from shell?

I was wondering if this can be done without using GUI software.

Cheers

share|improve this question
1  
Your question is unclear. "download...to" is either redundant or backwards. If you just want to download a file use wget. What is the source and destination? – technosaurus Mar 16 '12 at 5:02

migrated from stackoverflow.com Mar 15 '12 at 23:12

2 Answers

I'd suggest you look into scp, which I'd assume comes preinstalled with your Ubuntu installation.

Knowing the path of the file you simply do:

scp your_user_name_on_your_server@your_computers_name:/location/of/file .

scp will copy the file, and the . means copy to the current folder on your local machine.

It will ask you for the password for your user on the server.

If typing ssh or scp gives you a "command not found" you can install ssh (and thereby scp) this way from the command line:

sudo apt-get update           (updates your sources)
sudo apt-get upgrade          (upgrades your entire system)
sudo apt-get install ssh      (installs ssh (and scp))
share|improve this answer
This will work when copying files between Unix-like machines (provided you have ssh set up), but on Windows 7 this requires something like Cygwin (as Aditya Naidu points out). – user55325 Mar 16 '12 at 7:04
Yes, but the user stated he was talking about a linux server and he mentioned he als had ubuntu installed on his local computer (or so I understand it). It is easier to do from ubuntu. – xlys Mar 16 '12 at 8:44
I added the information to install ssh/scp. – xlys Mar 16 '12 at 8:56
I believe ssh is preinstalled. You may need openssh-server on the linux server. pscp, which comes with putty would be a good client on windows. – Journeyman Geek Mar 29 '12 at 13:37

You can install cygwin on your Windows machine and run sshd in cygwin. Then you can scp files either ways from either of the machines.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.