Results 1 to 4 of 4
Hi,
I was just wondering, how I could download a file append the file name and directory append it.
I.e I want to download this: gpo.zugaina.org/AJAX/Ebuild/2386214 and call it gcc-4.6.1.ebuild ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-15-2011 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 4
WGET question when downloading a file
Hi,
I was just wondering, how I could download a file append the file name and directory append it.
I.e I want to download this: gpo.zugaina.org/AJAX/Ebuild/2386214 and call it gcc-4.6.1.ebuild within x directory.
I tried
however it would only download to the current directory.Code:sudo wget gpo.zugaina.org/AJAX/Ebuild/2386214 -O gcc-4.6.1.ebuild --directory-append=/usr/local/portage/sys-devel/gcc
What am I doing wrong?
- 07-15-2011 #2
According to the wget man page, you need to append the -P option.
Exaple:
I just tried it, and it works.Code:sudo wget gpo.zugaina.org/AJAX/Ebuild/2386214 -P /pick/your/directory
Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 07-15-2011 #3Just Joined!
- Join Date
- Sep 2010
- Posts
- 4
- 07-15-2011 #4
I'm not sure about that one, as I don't use wget very often. I've seen multiple posts in various forums that this isn't easy to do with just one command.
A possible solution would be to employ a double ampersand (&&) and rename after.
Might not be what you're looking for, but I hope that helps.sudo wget gpo.zugaina.org/AJAX/Ebuild/2386214 -P /pick/your/directory && mv /downloaded/file /new/name/fileJay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.


Reply With Quote

