Results 1 to 6 of 6
Hi dudes! This has to be the lamest question ever...
I have 2 Linux servers and I simply want to download files from one to another using my shell.
Can ...
- 07-08-2009 #1
Basic Shell Command Line Downloading
Hi dudes! This has to be the lamest question ever...

I have 2 Linux servers and I simply want to download files from one to another using my shell.
Can you please tell me how I can download files using command line within my shell without running an FTP app?
I access them remotely through a browser control panel and run commands with putty. I have no access to the servers locally so I can't see the desktop.
THANKS DUDES! ~J
- 07-08-2009 #2
You can use scp:
This will copy the file to what ever directory you are in. Most likely your home directory.Code:prompt>scp root@server:/directory/directory/filename .
Jaysunn
- 07-08-2009 #3
Thanks a bunch jaysunn. I guess I'm a little confused. Where would I put the web address.
prompt>scp root@jvond.com:/cd/2009-04-20_JVonD_...yStephanie.zip
Said command not found.
Basically want to be able to download a file via http using command. Trip out to that MP3 CD if you like.. =)
- 07-08-2009 #4
Ok,
Try this. Open up a terminal on a linux machine. And issue this command. Make sure you have access to the other server. I tried to use wget and anonymous is not setup.
Make sure you have the . at the end. That instructs to place the file in your current working directory. Enter your password and you should be all set. I know the server has ssh abilities cause I received a password prompt. Let me know how you make out.Code:[root@server ~]# scp username@64.150.166.129:/path/to/file . username@64.150.166.129's password:
If you are on a Windows machine, we will need to use pscp.exe.
You can try this as well:
This should bring the file to your current working directory.Code:prompt#>wget http://filesWebAddress
Jaysunn
- 07-09-2009 #5
I'd like to go into a bit more detail.
There is software called ssh, which stands for Secure Shell. ssh allows you to login remotely to another system and work on it as though you were actually at that computer. It is quite powerful. In order for it to work, however, the remote computer must be running sshd (the ssh daemon) in order to accept incoming ssh connections.
scp is a command that uses the ssh protocol to copy a file over a network. It works like jaysunn said:
I am a bit confused, though. You said that you want to use the HTTP protocol. If this is true, you can use the "wget" utility:Code:scp user@remotehost:/path/to/file /local/destination
where the URL that you want to get is replaced with what you want, obviously.Code:wget http://www.linuxforums.org
To use SSH, you will need to install those utilities, which are in a package called openssh (the particular ssh implementation that we use in Linux). wget is in the wget package.
I hope this helps.
EDIT:
Doh. jaysunn mentioned wget too
.
DISTRO=Arch
Registered Linux User #388732
- 12-15-2009 #6
Wget
Thanks for the wget command. Worked great!
Use WGET command.
wget http .. yoursite .. file.tar
I had to exclude some of the address above because this forum is denying me.
Thanks dudes! ~J


Reply With Quote