OTN downloads using wget

Already posted on how to download patches from Oracle support.

This is a variation on that theme for those of us who have been in this business longer than 3 minutes and are looking for more efficient ways to do things.

OTN (Oracle Technology Network) has a pretty, if not always easy to navigate, browser interface for downloading apps. The problem is that most of us real admins don’t install and run enterprise software on a browser-equipped desktop. We prefer to run stuff on headless servers, without the overhead of a graphical user environment.

The key to downloading from OTN using wget is to get the session cookie from a desktop browser session and load that into your wget command on the server.

One way to do this is to get the Export Cookies plugin for Firefox and use it to export your desktop session cookie to a standard cookies.txt file on the server. Then all you do is the following command:

wget --load-cookies=[cookie file path] [download path]

For example:

wget --load-cookies=/tmp/cookies.txt
101401 /as_linux_x86_mrca_101401_disk1.cpio