[PLUG] Simple wget question

Russell Johnson russj at dimstar.net
Sat Mar 15 16:18:08 UTC 2008


kurt braget wrote:
> If I run wget on a file (or series of files), how do I specify what
> directory I want the loaded file to go to? The way I understand it is that
> wget loads the file into whatever dir it was run from. But I don't want that
> behavior, as I am giving somebody else the command to run as a cron job. I
> would like to be able to specify the dir from root, like
> /home/something/download. Since I know where the directory is on this
> persons server (and I won't be running the command), I feel if I specify the
> directory from root, it will eliminate confusion, as opposed to saying "cd
> into the downloads dir, then run the command". Thanks. Kurt
I see this in 'man wget':

       -P prefix
       --directory-prefix=prefix
           Set directory prefix to prefix.  The directory prefix is the 
directory where
           all other files and subdirectories will be saved to, i.e. the 
top of the
           retrieval tree.  The default is . (the current directory).

-- 
Russ Johnson
Stargate Online
http://www.dimstar.net






More information about the PLUG mailing list