Downloading Oracle Files With the Command Line

March 8, 2018 at 6:40 pm | Posted in Oracle Developement | 2 Comments

Here 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: 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 “”

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.






RSS feed for comments on this post. TrackBack URI

  1. Thanks a lot. Clear and works!

    • Glad it worked for you. don’t forget to switch over to my new, more current blog at

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Entries and comments feeds.

%d bloggers like this: