I'm trying to get all files by mask in some directory without recursively searching in subdirs. There is no option
-maxdepth 0 in AIX for that.
I've heard about
-prune, but still can't get how it works.
I guess the command should look something like
find dir \( ! -name dir -prune -type f \) -a -name filemask
but it doesn't work.
Could you please write a correct command for me and explain how it will work?
It seems command
find dir ! -path dir -prune
prints all files and catalogs in
dir, but not files and catalogs in
dir/*, so I can use it for my case.