tags:

views:

69

answers:

2

I wonder how to specify to the command find for searching files with names matching some string or some other string.

For example, if I want to look for files that match either *dat or *txt under current directory, how to specify?

Thanks and regards!

+5  A: 
find . \( -name \*.dat -o -name \*.txt \)
Paul R
+1  A: 
find /path -type f \( -iname "*.txt" -o -iname "*.dat" \) 
ghostdog74
You're missing a quote after *.txt
xyld