Linux - NewbieThis 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
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to automate as much as possible and I'm using wget to download update .isos for the Red Hat Satellite (its disconnected).
I'm able to download individual iso files ok with the following:
Code:
[root@server isos]# wget -V
GNU Wget 1.11.4 Red Hat modified
wget -c -t 100 "https://content-web.rhn.redhat.com/rhn/isos/rhn-satellite-isos/channel-dumps/base-dumps/dump-rhel-i386-5/rhn-export-rhel-i386-5-20140928.0-03.iso?__gda__=1453735052_0fc2f0db97195722680a0101d7344d80&ext=.iso"
However I want to automate it since I have to download multiple ISOs, so I've added all of the URLs into a file called rhel_2014_09_28.txt and run the following command:
Code:
wget -i /tmp/isos/rhel5_2014_09_28.txt
Then I get the following:
Code:
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-02.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735745
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-03.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735745
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-04.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735746
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-05.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735746
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-06.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735747
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-07.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735747
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-08.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735747
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-09.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735748
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-10.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735748
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-11.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735749
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-12.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735749
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-13.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735750
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-14.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735750
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-15.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735751
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-16.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735751
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-17.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735752
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-18.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735752
-rw-r--r-- 1 root root 40802 Jan 25 09:29 DownloadError.do?code=403&uri=%2Frhn%2Fisos%2Frhn-satellite-isos%2Fchannel-dumps%2Fbase-dumps%2Fdump-rhel-i386-5%2Frhn-export-rhel-i386-5-20140928.0-19.iso&client=192.138.57.36&edge=184.51.35.244×tamp=1453735753
Just to troubleshoot, I've added the quote (" ") around the URLs in the file and still get an error.
If I cat the file, it outputs a ton of markup tags.
It probably has to do with how Firefox is copying the URL. How did you get the URL that you used directly on the command line, and how does that differ from the version you're pasting into VI that has all of the markup tags.
From the download website using Firefox Web Browser (latest version), I find the URL that I want to put in the file > right click > select Copy Link Location > go to file in RHEL > make sure VIM is in --INSERT-- mode and right click...
If I use IE (latest version), pretty much the same thing, except that select Copy Shortcut and paste into file...still the same error as before...
Last edited by JockVSJock; 01-25-2016 at 10:14 AM.
From the download website using Firefox Web Browser (latest version), I find the URL that I want to put in the file > right click > select Copy Link Location > go to file in RHEL > make sure VIM is in --INSERT-- mode and right click...
If I use IE (latest version), pretty much the same thing, except that select Copy Shortcut and paste into file...still the same error as before...
And how does that differ from how you pasted it on the command line? What does the file look like in vi and with cat?
Looks like dos2unix worked, do you have reason to believe it didn't? Your syntax is wrong though, "-o" is the default mode which overwrites the original file. So you basically told it to convert two files, one of which did not exist, hence the error. It should have converted the real file just fine though.
I got frustrated, and just created a new file with vim, no touch command, and then placed the URLs into the file. I did this out of frustration to see what would happen.
Wget seems ok now and it is running as expected...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.