I want to download a file from the Linux command line. Basically I'm using ssh
and I'm trying to download a file to my file system on my laptop. How can I do that from the command line?
3 Answers
wget
and curl
are commonly used for web URLs. For remote files, use scp
for individual files and consider rsync
for directories.
-
3
-
Don't you just love the free rep that comes from answering these questions?– Daniel Beck ♦Mar 23, 2011 at 9:49
-
IME rsync is better for both files and directories - if available - apart from anything else it can cope with resumes efficiently.– cbzMar 23, 2011 at 9:59
-
Agreed;
scp -r
mostly aggravates me when I make the mistake of trying to use it. Mar 23, 2011 at 10:01 -
I am trying to download eclipse (212.219.56.184/sites/download.eclipse.org/eclipseMirror/…) in linux using command line. But I get "Connecting to 212.219.56.184:80... failed: Connection refused"... Any Idea of what the issue is all about?– om39aSep 7, 2012 at 5:34
If the file is publicly available, then:
wget http://example.com/file.tar
I upvoted zengr's answer, but would like to mention (since your question is a bit vague) lynx
or links
web browsers as well, if you don't remember the full URL to the file to download.
scp
with public key authentication is your friend if you copy between your own machines.