I'm trying to write a script to set up a cron job to automatically download a file, using wget. Here's the important part:
$ wget -N --passive-ftp -P /home/myuser ftp://ftp.example.com/path/to/file.xml
--2015-10-09 09:55:03-- ftp://ftp.example.com/path/to/file.xml
=> “/home/myuser/file.xml”
Resolving ftp.example.com... 123.123.123.123
Connecting to ftp.example.com|123.123.123.123|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /path/to ... done.
==> PASV ... couldn’t connect to 123.123.123.123 port 47040: No route to host
If I use -nv, like so:
$ wget -N --passive-ftp -nv -P /home/myuser ftp://ftp.example.com/path/to/file.xml
Nothing is printed. I've actually already fixed this problem, (I must use --no-passive-ftp, I think the remote side - which I don't control - doesn't support passive FTP), but I want to know why the error message isn't printing with -nv so I can have a log message if it fails again for some other reason.
I am running CentOS 6.5, for what that's worth, with wget version 1.12.
This is not a duplicate of this, because my problem is that no error message is being printed at all with -nv, even though the download failed.