星期三, 11月 01, 2017

SHORT - wget with agent (alias)

Add this line to ~/.bashrc

alias wget_agent='wget -bqc --user-agent="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16" '

This could let you use
  wget_agent (---link---) (optional: target location)
to perform file download.

Something like this...


pi@pi1bTonyATTA ~ $ wget_agent http://ipv4.download.thinkbroadband.com/20MB.zip
Continuing in background, pid 3376.
pi@pi1bTonyATTA ~ $ ls -al
total 907244
drwxr-xr-x 5 pi   pi        4096 Oct 31 16:42 .
drwxr-xr-x 3 root root      4096 Feb 15  2015 ..
-rw-r--r-- 1 pi   pi     5509120 Oct 31 16:42 20MB.zip

沒有留言: