Skip to content
July 26, 2012 / doganay

NON-RECURSIVE FIND

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
## To run find for only current directory
## (sub-directories not included)
## That is because find command is recursive by default

WILDCARD="*.trc"
SEARCH_PATTERN="ora"
find . \( ! -name . -prune \) \( -type f \) \( -name "$WILDCARD" \) \( -mtime -1 \) | xargs grep -l $SEARCH_PATTERN

Leave a comment