Change Language. Related Articles. Table of Contents. Improve Article. Save Article. Like Article. If this is not the solution to your problem, I suggest you simplify your wget-call down to something like this.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Renaming a downloaded file using wget Ask Question. Asked 6 years, 5 months ago. Active 5 years, 10 months ago. Viewed times. Thanks for the help. To get it with the real name just add the --content-disposition option as this thanks to 6EQUJ5!
A redirect of standard output into arbitrary file name always works. You are doing it correctly as man wget says, using -O. Indeed, you must be getting an HTML in your file usually can be checked with man file. In your case client is receiving Found you can check it with curl -v URL. If you were to do the same download from a web browser, and you notice the browser actually naming the file correctly, you can use the --content-disposition option to give wget the same behaviour:.
My Debian man page reports this as an 'experimental' feature but I cant recall it not working for me:. That link points to a redirector, not the final destination! So you're downloading HTML and renaming it to. The cluttered page has this around the top:. Your download will start in 0 seconds Problems with the download?
Please use this direct link , or try another mirror. Pass this URL to wget. Also, note that SourceForge tries to outsmart you, guesting the operational system via the User-Agent string. The best guess for "wget" seems to be the.
So, you should be more specific, requesting the deb file! Learn how your comment data is processed. Suggested Read: 5 Linux Command Line Based Tools for Downloading Files In this short article, we will explain how to rename a file while downloading with wget command on the Linux terminal. If you liked this article, then do subscribe to email alerts for Linux tutorials.
If you have any questions or doubts? Related Posts. Any help would be grateful. Thanks, Jeena Reply. Thanks for the Tutorial. Good trick!
0コメント