Hi, wget creates zero sized file when some error from remote server is catched. This sounds like bug. IMO it shouldn't create such file.
[ar...@t400 ~/test]$ ls -ld crap ls: cannot access crap: No such file or directory zsh: exit 2 ls --color=tty -ld crap [ar...@t400 ~/test]$ wget http://ble.pl/dfsfddf -O crap --2009-09-28 14:27:24-- http://ble.pl/dfsfddf Resolving ble.pl (ble.pl)... 62.146.68.12 Connecting to ble.pl (ble.pl)|62.146.68.12|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2009-09-28 14:27:24 ERROR 404: Not Found. zsh: exit 8 wget http://ble.pl/dfsfddf -O crap [ar...@t400 ~/test]$ ls -ld crap -rw-r--r-- 1 arekm users 0 Sep 28 14:27 crap [ar...@t400 ~/test]$ wget --version GNU Wget 1.12 built on linux-gnu. +digest +ipv6 +nls +ntlm +opie +md5/openssl +https -gnutls +openssl +iri Wgetrc: /home/users/arekm/.wgetrc (user) /etc/wgetrc (system) Locale: /usr/share/locale Compile: x86_64-pld-linux-gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc" -DLOCALEDIR="/usr/share/locale" -I. -I../lib -D_FORTIFY_SOURCE=2 -O2 -fno-strict-aliasing -fwrapv -march=x86-64 -gdwarf-2 -g2 Link: x86_64-pld-linux-gcc -O2 -fno-strict-aliasing -fwrapv -march=x86-64 -gdwarf-2 -g2 -Wl,--as-needed -Wl,-z,relro -Wl,-z,combreloc /usr/lib64/libssl.so /usr/lib64/libcrypto.so -ldl -lrt -lidn ftp-opie.o openssl.o http-ntlm.o gen-md5.o ../lib/libgnu.a Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Originally written by Hrvoje Niksic <[email protected]>. Currently maintained by Micah Cowan <[email protected]>. Please send bug reports and questions to <[email protected]>. -- Arkadiusz MiĆkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/
