Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-22-2005, 05:08 PM
|
#1
|
|
LQ Newbie
Registered: Jul 2005
Posts: 24
Rep:
|
wget and redirection
Hi folks
Is wget support php redirection ?
I want to download htttp://www.nsbop.sux/download.php?id=333 , it redirects to htttp://www.nsbop.sux/staff/emoubi.tgz
When I execute:
wget -c htttp://www.nsbop.sux/download.php?id=333 it downloads the file staff/emoubi.tgz but with name download.php?id=333
How can I make wget to follow the redirections and save the file with his actual file name (emoubi.tgz) ?
Also I wanna ask can I download with links without opening his user interface ? Something like:
links --download htttp://www.nsbop.sux/download.php?id=333
|
|
|
|
07-22-2005, 05:23 PM
|
#3
|
|
LQ Newbie
Registered: Jul 2005
Posts: 24
Original Poster
Rep:
|
nope
I do not know the real file name of download.php?id=333. That's the problem, wget must redirect to the actual file and save it with it's actual name (emoubi.tgz in my example)
|
|
|
|
07-23-2005, 10:33 PM
|
#4
|
|
LQ Newbie
Registered: Jul 2005
Posts: 8
Rep:
|
Right but with the -o option, you don't need to know the name, you just make one you like (-o is to specify the output name).
I don't think it supports PHP redirection, but I'm not sure. I don't see anything in the man, info, or FAQ about it.
- A
|
|
|
|
07-24-2005, 04:39 AM
|
#5
|
|
LQ Newbie
Registered: Jul 2005
Posts: 24
Original Poster
Rep:
|
Quote:
Originally posted by AgentDenim
Right but with the -o option, you don't need to know the name, you just make one you like (-o is to specify the output name).
|
Exactly. I don't want to specify a file name because I don't know it  I'm talking about 10 000+ files.
Thanks for the answers anyway.
|
|
|
|
06-21-2012, 06:05 AM
|
#6
|
|
LQ Newbie
Registered: Jun 2012
Posts: 1
Rep: 
|
From manual:
‘--trust-server-names’
If this is set to on, on a redirect the last component of the redirection URL will be used as the local file name. By default it is used the last component in the original URL.
|
|
|
1 members found this post helpful.
|
01-09-2013, 05:53 AM
|
#7
|
|
LQ Newbie
Registered: Nov 2007
Location: Madurai, TN, India
Distribution: CrunchBang, CentOS
Posts: 2
Rep:
|
max-redirect
For security reasons, the distributions set max-redirect to zero. You may set it to 1 at the run-time like ....
wget --max-redirect=1 http://domainname.com/path/to/file/to/download
or you may add the following line at the bottom of /etc/wgetrc (the usual default location)...
max-redirect = 1
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:10 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|