If I execute wget
from my terminal to download something, it realices multiple attempts to download it, and eventually it downloads it (or not!). For example, with three attempts and 10 seconds of wait, I get the next output:
$ LANG=C wget -T 10 -t 3 -O contents.txt www.google.com
--2013-04-14 14:55:48-- http://www.google.com/
Connecting to 213.181.73.145:80... failed: Connection timed out.
Retrying.
--2013-04-14 14:55:59-- (try: 2) http://www.google.com/
Connecting to 213.181.73.145:80... failed: Connection timed out.
Retrying.
--2013-04-14 14:56:11-- (try: 3) http://www.google.com/
Connecting to 213.181.73.145:80... failed: Connection timed out.
Giving up.
But if I execute the same line with sudo
, the download works fine and immediately. Why is the reason?
Moreover, if I put a wget
line inside a script, and this script is called from cron
, also wget
works fine.
EDITED It's an issue with a proxy. With: wget --no-proxy
works also fine. How can I check which proxy are been using by the system? And why sudo
ignore this proxy?