Select Page

Metalink wget download script

Author: Chuck Edwards | | December 23, 2009

Looking for a simpler way to download from the new Metalink?  Oracle has replaced the ftp site with http downloads using wget.  

If you’re looking for a simple way to use wget without all of that cutting-and-pasting from the web site, you can use a simple script like this:

#!/bin/bash # Program:  download.sh # Description:  Download Oracle patches from Metalink

PROGRAM=`basename $0` USAGE="Usage:  $PROGRAM [ patch file ]" [ $# -lt 1 ] && echo $USAGE && exit 1 patch=$1 username=$METAUSER password=$METAPASS URL="http://updates.oracle.com/Orion/Download/download_patch/$patch" while [ -z $username ]; do echo -n "Enter metalink username: " read username done while [ -z $password ]; do echo -n "Enter metalink password: " stty -echo read password stty echo done wget --http-user=$username --http-password=$password --no-check-certificate   --output-document=$patch $URL exit

It’s pretty basic, so you can add error checking or more sophisticated wget options as you like.  The only thing you need is the full name of the patch zip file and your Metalink credentials:

$ download.sh ;

You can export your Metalink username and password to the variables $METAUSER and $METAPASS, respectively, or the script will prompt you for both. Let me know how this works for you, or if you have a better option – I’m sure there are plenty out there.

How to Solve the Oracle Error ORA-12154: TNS:could not resolve the connect identifier specified

The “ORA-12154: TNS Oracle error message is very common for database administrators. Learn how to diagnose & resolve this common issue here today.

Vijay Muthu | February 4, 2021

How to Recover a Table from an Oracle 12c RMAN Backup

Our database experts explain how to recover and restore a table from an Oracle 12c RMAN Backup with this step-by-step blog. Read more.

Megan Elphingstone | February 2, 2017

Data Types: The Importance of Choosing the Correct Data Type

Most DBAs have struggled with the pros and cons of choosing one data type over another. This blog post discusses different situations.

Craig Mullins | October 11, 2017

Subscribe to Our Blog

Never miss a post! Stay up to date with the latest database, application and analytics tips and news. Delivered in a handy bi-weekly update straight to your inbox. You can unsubscribe at any time.

Work with Us

Let’s have a conversation about what you need to succeed and how we can help get you there.

CONTACT US

Work for Us

Where do you want to take your career? Explore exciting opportunities to join our team.

EXPLORE JOBS