How to wget to a directory/folder


#1

from wiki instruction http://wiki.dreamhost.com/Wget i know how to wget file to my root

wget http://www.your-favorite-download-site.org/directory/file-for-you.tar.gz

but how to wget to a directory/folder, not to my root

i try these command but its not working

wget http://www.your-favorite-download-site.org/directory/file-for-you.tar.gz /mydirectory/

wget http://www.your-favorite-download-site.org/directory/file-for-you.tar.gz /mydirectory

wget http://www.your-favorite-download-site.org/directory/file-for-you.tar.gz mydirectory/

wget http://www.your-favorite-download-site.org/directory/file-for-you.tar.gz > /mydirectory/

please share your experience, thank you


#2

Try
wget YOUR URL | tar -xzv

That will redirect what you pull down into an extract/uncompress and will recreate whatever directory you tarred up.

-Scott


#3

i still dont understand, my directory name is mydirectory, where i need to put my directory name in that code?


#4

If you want to get the files to a directory, simply cd to your directory and issue the wget command.

For example, you can

1: cd mydirectory
2: wget http://yourfile

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here