Wget: Difference between revisions
From Leo's Notes
This page was last edited on 6 March 2017, at 00:21.
m Text replacement - "</code>" to "}}" |
No edit summary |
||
| Line 18: | Line 18: | ||
wget -P /tmp http://google.ca/ | wget -P /tmp http://google.ca/ | ||
}} | }} | ||
== Saving an Entire Open Directory == | == Saving an Entire Open Directory == | ||
| Line 24: | Line 25: | ||
wget -np -r http://server/remote/dir | wget -np -r http://server/remote/dir | ||
}} | }} | ||
== wget on FreeBSD == | == wget on FreeBSD == | ||
| Line 29: | Line 31: | ||
wget is available in ports under {{code|ftp/wget}}. If you don't want to compile it, you could just use {{code|fetch (1)}} to download files. | wget is available in ports under {{code|ftp/wget}}. If you don't want to compile it, you could just use {{code|fetch (1)}} to download files. | ||
== See Also == | |||
* [[aria2c]] | |||
[[Category:Linux]] | [[Category:Linux]] | ||
Revision as of 00:21, 6 March 2017
wget to console
Use the -O - option to output contents to the console.
wget -O - http://google.ca
Since the contents go to stdout, you can pipe it to a shell to execute remote commands:
wget -O - http://scripthost.local/fix_graphics.sh
Note: This is equivalent to using just curl http://google.ca.
Save to Directory
Use the -P to specify the prefix of the output file.
wget -P /tmp http://google.ca/
Saving an Entire Open Directory
To download an entire open directory from a remote server:
wget -np -r http://server/remote/dir
wget on FreeBSD
wget is available in ports under ftp/wget. If you don't want to compile it, you could just use fetch (1) to download files.