[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Unexpected Behavior with wget

From: Darshit Shah
Subject: Re: [Bug-wget] Unexpected Behavior with wget
Date: Mon, 28 Oct 2013 11:35:06 +0530

On Sun, Oct 27, 2013 at 9:49 AM, D.J.J. Ring, Jr. <address@hidden> 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

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 <address@hidden>.
> Please send bug reports and questions to <address@hidden>.
> Thanks,
> David Ring

Thanking You,
Darshit Shah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]