LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2022, 10:38 AM   #1
doumamuzan
Member
 
Registered: May 2021
Posts: 56

Rep: Reputation: Disabled
Question wget with different file name not working


The below works as expected

Code:
wget https://helpx.adobe.com/content/dam/help/en/edge-reflow/how-to/rf-generic-04_1408x792.jpg
but the below is not working ( trying to save as a different file name ) even with sudo

Code:
sudo wget https://helpx.adobe.com/content/dam/help/en/edge-reflow/how-to/rf-generic-04_1408x792.jpg -O newfile.jpg
 
Old 06-29-2022, 10:49 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
why did you use sudo?
What do you mean by "not working"? What's happened?
 
Old 06-29-2022, 10:53 AM   #3
doumamuzan
Member
 
Registered: May 2021
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
why did you use sudo?
What do you mean by "not working"? What's happened?
It is not saving the file it simply gives a lengthy technical error message
 
Old 06-29-2022, 11:02 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
but what is that message?
 
Old 06-29-2022, 12:39 PM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Maybe you need to report yourself as a web browser
Code:
agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0"

url="https://helpx.adobe.com/content/dam/help/en/edge-reflow/how-to/rf-generic-04_1408x792.jpg"

wget -U "$agent" "$url" -O myfile.jpg
...
Saving to: ‘myfile.jpg’

myfile.jpg            100%[======================>] 154.33K  --.-KB/s    in 0.02s   

2022-06-29 12:38:47 (7.06 MB/s) - ‘myfile.jpg’ saved [158038/158038]
 
Old 06-30-2022, 03:14 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by doumamuzan View Post
The below works as expected

Code:
wget https://helpx.adobe.com/content/dam/help/en/edge-reflow/how-to/rf-generic-04_1408x792.jpg
but the below is not working ( trying to save as a different file name ) even with sudo

Code:
sudo wget https://helpx.adobe.com/content/dam/help/en/edge-reflow/how-to/rf-generic-04_1408x792.jpg -O newfile.jpg
I cannot use wget to download that file with or without specifying output name - it just hangs waiting for a response.
I can load it in Firefox, dillo, mpv, feh, curl.
I can do it the way teckk suggested.
 
Old 06-30-2022, 12:49 PM   #7
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Couple of things!
  1. OP hasn’t posted the error message. Please do so.
  2. Rename the file after using the command without the -O option.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ctags,tags and TAGS ,different inode,different file name,but seems same file hereisanan Linux - Server 5 05-14-2018 06:54 PM
How to find a file which having same name and created on different date on different lalitshaktawat Linux - Server 2 04-25-2013 06:09 AM
How to resume an interrupted wget using wget.log? misterJ Linux - Software 2 06-19-2011 01:21 PM
wget not working! but "man wget is" ??? wrapster Solaris / OpenSolaris 5 07-30-2008 03:00 AM
Different DNS name servers for different domain names? skaralic Linux - Networking 1 12-09-2005 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration