Database Administration (MOSC)

MOSC Banner

Scripting question

edited Aug 9, 2013 11:15AM in Database Administration (MOSC) 3 commentsAnswered ✓
I am trying to get the following line to work:

find ${ORIGIN_DIR} -name 'list_*' -o -name 'test_*' -exec cp {} ${TARGET_DIR} \;

What I am trying to do is grab all the files in ORIGIN_DIR that start with list_ or test_ and copy them into TARGET_DIR folder

The above code runs without an issue but no file gets copied.

I also tried running

find ${ORIGIN_DIR} -name 'list_*' -o -name 'test_*'

and it outputs the desired results to a screen so i know I am attempting to copy the correct files

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center