Downloading Oracle Files With the Command Line
March 8, 2018 at 6:40 pm | Posted in Oracle Developement | 2 CommentsHere is a quick trick that allows you to download files from OTN through the command line. In order to download OTN files you need to agree to the license agreement. That is easy enough in a browser, but not available with wget. However, wget allows you to include a cookie file. To get to the browser’s cookies, I use Chrome with the cookie.txt export extension.
So the first step is to go to the download page of the product you want to download. For example SQLcl: http://www.oracle.com/technetwork/developer-tools/sqlcl/downloads/index.html and agree to the license. This step is now recorded in the browser’s cookies. Now simply click the cookes.txt export icon in the browser. This opens up a pop-up window with all the cookies. Copy and paste the text into a cookies.txt file on your server (/u01/cookies.txt).
Now you can use wget with the –load-cookies option:
wget –load-cookies=/u01/cookies.txt –http-user=your.otn@username –ask-password “http://download.oracle.com/otn/java/sqldeveloper/sqlcl-17.4.0.354.2224-no-jre.zip”
You’ll be prompted for the OTN password and the download begins.
Note for each product you download, you will need to agree to the license and use those particular cookies.
2 Comments »
RSS feed for comments on this post. TrackBack URI
Thanks a lot. Clear and works!
Comment by Pfingstberg— March 28, 2019 #
Glad it worked for you. don’t forget to switch over to my new, more current blog at ruepprich.com.
Cheers!
Comment by Christoph Ruepprich— March 28, 2019 #