On Sun, Oct 27, 2013 at 9:49 AM, D.J.J. Ring, Jr. <n...@arrl.net> wrote:
> Unless I have messed up the command, wget does not label the file name of > the "next" document of the command below with a number, it clobbers the > file instead. > > Is there an alternate way for me to get wget to save a file to a file > location and not clobber, but name it with an added number like filename1 > filename2 and so forth? > > wget -O /home/djringjr/Music/tmp/pipedreams.mp3 > http://50.31.192.102:80/wabe When invoked with -O, Wget will always clobber the file. In case you do not want this behaviour, you should look at some other options. 1. Does the server send the Content-Disposition header? Maybe you can use that header for setting your filename automatically without using -O. 2. Wrap Wget in a shell script that renames the downloaded file with your clobber rules. > $ wget --version > > GNU Wget 1.14 built on linux-gnu. > > +digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl > > Wgetrc: > /etc/wgetrc (system) > Locale: /usr/share/locale > Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc" > -DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib > -D_FORTIFY_SOURCE=2 -march=i686 -mtune=generic -O2 -pipe > -fstack-protector --param=ssp-buffer-size=4 > Link: gcc -march=i686 -mtune=generic -O2 -pipe -fstack-protector > --param=ssp-buffer-size=4 > -Wl,-O1,--sort-common,--as-needed,-z,relro /usr/lib/libssl.so > /usr/lib/libcrypto.so /usr/lib/libz.so -ldl -lz -lz -lidn -luuid > -lpcre ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a > > Copyright (C) 2011 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 <hnik...@xemacs.org>. > Please send bug reports and questions to <bug-wget@gnu.org>. > > Thanks, > > David Ring > -- Thanking You, Darshit Shah