Showing posts with label wget. Show all posts
Showing posts with label wget. Show all posts

Saturday, January 7, 2012

Specify the location with Wget?

-P prefix
--directory-prefix=prefix
           Set directory prefix to prefix.  The directory prefix is the
           directory where all other files and sub-directories will be
           saved to, i.e. the top of the retrieval tree.  The default
           is . (the current directory).
wget -P /home/username/location URL

Wednesday, June 22, 2011

Allow wget to overwrite files

Default behavior of wget is to make new files if files of same name are downloaded again, appended with a counter.

wget filename > filename
wget filename > filename.1
wget filename > filename.2

To overwrite the existing file with the new downloads without creating new files, the answer is:

On GNU Wget 1.12 built on linux-gnu:

Use wget -N filename