find within a sh script

  • Follow


i am currently doing this
HEAP=`/usr/bin/find / -type f -name heap*.phd -newer $JOB_MARK -print
2>/dev/null`

i now have a new requirment to find 3 different files. i'd like to keep
it very very simple so if i could change heap*.phd to reflect the 3
unique names that would be great
1. core
2. javacore*
3. heapdump*
Thanks

0
Reply dunphyj (6) 3/9/2005 3:15:43 PM

jdunphy wrote:
>
> i am currently doing this
> HEAP=`/usr/bin/find / -type f -name heap*.phd -newer $JOB_MARK -print
> 2>/dev/null`

Quote that star by bracketing the word in double-quotes
or using a backslash.

> i now have a new requirment to find 3 different files. i'd like to
keep
> it very very simple so if i could change heap*.phd to reflect the 3
> unique names that would be great
> 1. core
> 2. javacore*
> 3. heapdump*

\( -name core -o -name javacore\* -o -name heapdump\* \)

That clause in the place of your -name clause.

Find is the sysadmin's wonder program.  Any sysadmin will
find it a week well spent to study the use of find until
they can dash off expressions, combine with xargs and so
on.

0
Reply Doug 3/9/2005 5:42:29 PM


1 Replies
112 Views

(page loaded in 0.091 seconds)

Similiar Articles:













7/29/2012 10:06:44 PM


Reply: