11

find with prune option help needed

view full story
linux-howto

http://www.unix.com – Hello, I am using ksh93 (/usr/dt/bin/dtksh) on Solaris and am stuck when trying to use find with the -prune option. I need to search a directory (supplied in a variable) for files matching a certain pattern, but ignore any sub-directories. I have tried: Code: find ${full_path_to_dir_to_search} -type f -name "*.dat" -print -o -type d -prune which produces no output. If I cd to that directory and issue this command: Code: find * -type f -name "*.dat" -print -o -type d -prune it works as expected since it is working on a list of filenames. Why doesn't it work w (HowTos)