
Terminal - Commands using wget - 218 results
wget -H -r ?level=1 -k -p http://www.domain.com/folder/
This is sample output - yours may be different.
wget ? server to server files transfer
wget -O - http://example.com/a.gz | tar xz
This is sample output - yours may be different.
Use `tar xj` for bzip2 archives.
wget -q -O - http://someonewhocares.org/hosts/ | grep ^127 >> /etc/hosts
This is sample output - yours may be different.
The above url contains over 6700 of the common ad websites. The command just pastes these into your /etc/hosts.
wget -qO - http://cfaj.freeshell.org/ipaddr.cgi
This is sample output - yours may be different.
wget -q http://dynamic.xkcd.com/comic/random/ -O-| sed -n '/<img src="http:\/\/imgs.xkcd.com\/comics/{s/.*\(http:.*\)" t.*/\1/;p}' | awk '{system ("wget -q " $1 " -O- | display -title $(basename " $1") -write /tmp/$(basename " $1")");}'
This is sample output - yours may be different.
Only need to install Image Magick package.
Display a xkcd comic with its title and save it in /tmp directory
If you prefer to view the newest xkcd, use this command:
wget -q http://xkcd.com/ -O-| sed -n '/<img src="http:\/\/imgs.xkcd.com\/comics/{s/.*\(http:.*\)" t.*/\1/;p}' | awk '{system ("wget -q " $1 " -O- | display -title $(basename " $1") -write /tmp/$(basename " $1")");}'
wget -O - -q http://www.azlyrics.com/lyrics/abba/takeachanceonme.html | sed -e 's/[cC]hance/dump/g' > ~/tdom.htm && firefox ~/tdom.htm
This is sample output - yours may be different.
ABBA would be more entertaining if they sang this.
wget `lynx --dump http://xkcd.com/|grep png`
This is sample output - yours may be different.
wget -t inf -k -r -l 3 -p -m http://apod.nasa.gov/apod/archivepix.html
This is sample output - yours may be different.
Mirror the entire NASA Astronomy Picture of the Day archive, all the way from 1995. The archive is close to 2.5 GB, with lots of files, so give it some time. The logs can be redirected to a file using '-o somefile'. You might also want to try '-nH' and the '--cut-dirs' options
xkcd(){ wget -qO- http://xkcd.com/|tee >(feh $(grep -Po '(?<=")http://imgs[^/]+/comics/[^"]+\.\w{3}'))|grep -Po '(?<=(\w{3})" title=").*(?=" alt)';}
This is sample output - yours may be different.
This function displays the latest comic from xkcd.com. One of the best things about xkcd is the title text when you hover over the comic, so this function also displays that after you close the comic.
To get a random xkcd comic, I also use the following:
xkcdrandom(){ wget -qO- dynamic.xkcd.com/comic/random|tee >(feh $(grep -Po '(?<=")http://imgs[^/]+/comics/[^"]+\.\w{3}'))|grep -Po '(?<=(\w{3})" title=").*(?=" alt)';}
while true; do wget -r -l1 --no-clobber -A.txt http://911.wikileaks.org/files/index.html; done; cat *.txt | grep pass
This is sample output - yours may be different.
2001-09-11 17:37:01 Skytel [003937285] B ALPHA A conference call is scheduled 1700 CDT on 9-11-01. Current plans to address security, dvrtd flts & resumption of svc.Outside phn 1-800-857-3412; Unitel 8-888-0484; Intl 1-312-470-7298. Passcode 93390#. ordoo-becky johnson -recommend
2001-09-11 17:20:58 Skytel [002863587] A ALPHA kinc: CODERED-BU: Call 1-888-224-0047, passcode 212-762-2317. Call
2001-09-11 19:14:46 Skytel [005253896] C ALPHA Joanne. Up on my latop is a word doc (telesales contract) please email to BAM Asap. my password is still campbell- CC -recommend
2001-09-11 18:33:01 Arch [0472521] C ALPHA . R.R.R.A.T. ALERT from HEAT . Please call 1-800-453-7412 NOW! Client ID=154571; Password=331340 .RANCE KNISLEY reports: .TKT 00556495 opened. -recommend
wget -qO - http://www.sputnick-area.net/ip;echo
This is sample output - yours may be different.
wget -q -O - `youtube-dl -b -g $url`| ffmpeg -i - -f mp3 -vn -acodec libmp3lame -| mpg123 -
This is sample output - yours may be different.
torrid@siebot ~ $ wget -q -O - `youtube-dl -b -g http://www.youtube.com/watch?v=OKRJfIPiJGY`| ffmpeg -i - -f mp3 -vn -acodec libmp3lame - 2>/dev/null | mpg123 -
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.9.0; written and copyright by Michael Hipp and others
free software (LGPL/GPL) without any warranty but with best wishes
Playing MPEG stream 1 of 1: - ...
MPEG 1.0 layer III, 64 kbit/s, 44100 Hz joint-stereo
wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
This is sample output - yours may be different.
This is sample output - yours may be different.
clfavs(){ URL="http://www.commandlinefu.com";wget -O - --save-cookies c --post-data "username=$1&password=$2&submit=Let+me+in" $URL/users/signin;for i in `seq 0 25 $3`;do wget -O - --load-cookies c $URL/commands/favourites/plaintext/$i >>$4;done;rm -f c;}
This is sample output - yours may be different.
Usage: clfavs username password num_favourite_commands file_in_which_to_backup
wget 'link of a Picasa WebAlbum' -O - |perl -e'while(<>){while(s/"media":{"content":\[{"url":"(.+?\.JPG)//){print "$1\n"}}' |wget -w1 -i -
This is sample output - yours may be different.
wget -q -O - 'http://wap.weather.gov.hk/' | sed -r 's/<[^>]+>//g;/^UV/q' | tail -n4
This is sample output - yours may be different.
HK Observatory
At 10 AM
29'C,75%
UV Index: 4
"get Hong Kong weather infomation from HK Observatory
From Hong Kong Observatory wap site ;)"
other one showed alot of blank lines for me
wget -q -O - 'http://wap.weather.gov.hk/' | sed -r 's/<[^>]+>//g;/^UV/q' | grep -v '^$'
This is sample output - yours may be different.
HK Observatory
At 10 AM
29'C,75%
UV Index: 4
From Hong Kong Observatory wap site ;)
wget http://twitter.com/help/test.json -q -O -
This is sample output - yours may be different.
Returns a JSON object, by connecting to the 'test' endpoint of the Twitter API. Simplest way to check if you can connect to Twitter. Output also available in XML, use '/help/test.xml' for that
wget -q --spider http://server/cgi/script
This is sample output - yours may be different.
I don't know if the --spider option works to execute a script, but it might be worth trying. Note that the Drupal project uses the following in a cron job.
wget -O - -q http://localhost/drupal/cron.php
The output is sent to standard out so it can be logged by cron.
wget -O /dev/null http://www.google.com
This is sample output - yours may be different.
I have a remote php file that I want to run once an hour. I set up cron to run this wget. I don't really care about what's in the file though, I don't want to save the results, so I run the -O and send it to /dev/null
wget -nv http://en.wikipedia.org/wiki/Linux -O- | egrep -o "http://[^[:space:]]*.jpg" | xargs -P 10 -r -n 1 wget -nv
This is sample output - yours may be different.
2009-08-31 13:32:51 URL:http://en.wikipedia.org/wiki/Linux [267946/267946] -> "-" [1]
2009-08-31 13:32:51 URL:http://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Sharp_Zaurus.jpg/180px-Sharp_Zaurus.jpg [7184/7184] -> "180px-Sharp_Zaurus.jpg" [1]
2009-08-31 13:32:51 URL:http://upload.wikimedia.org/wikipedia/commons/thumb/c/c7/Roadrunner_supercomputer_HiRes.jpg/180px-Roadrunner_supercomputer_HiRes.jpg [7670/7670] -> "180px-Roadrunner_supercomputer_HiRes.jpg" [1]
2009-08-31 13:32:51 URL:http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Server_Linux.jpg/180px-Server_Linux.jpg [11564/11564] -> "180px-Server_Linux.jpg" [1]
xargs can be used in this manner to download multiple files at a time, and xargs will in this case run 10 processes at a time and initiate a new one when the number running falls below 10.
wget --reject html,htm --accept pdf,zip -rl1 url
This is sample output - yours may be different.
If the site uses https, use:
wget --reject html,htm --accept pdf,zip -rl1 --no-check-certificate https-url
wget -U "QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)" `echo http://movies.apple.com/movies/someHDmovie_720p.mov | sed 's/\([0-9][0-9]\)0p/h\10p/'`
This is sample output - yours may be different.
Copy the link to an HD movie trailer in to this command. It's more eleganant if it's put in a to a script, taking the URL as input.
mirror=ftp://somemirror.com/with/alot/versions/but/no/latest/link; latest=$(curl -l $mirror/ 2>/dev/null | grep util | tail -1); wget $mirror/$latest
This is sample output - yours may be different.
for Sun Freeware
mirror=ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/ftp.sunfreeware.com
pkg=perl
curl -l $mirror/intel/10/ 2>/dev/null | grep $pkg
perl-5.8.5-sol10-intel-local.gz
perl-5.8.7-sol10-x86-local.gz
perl-5.8.8-sol10-x86-local.gz
command above would download only perl-5.8.8-sol10-x86-local.gz
to download latest version of "util", maybe insert a sort if they wont be shown in right order.
curl lists all files on mirror, grep your util, tail -1 will gets the one lists on the bottom and get it with wget