Find cmd not working as expected

Hi,

i wan to search the file starting with Admin into the directory Output. I am running below command:

find /appl/Output -name "Admin*" -prune

but this command is going into the sub directories present under output. I do not want to search under sub directories. Any help will be highly appreciated.

Thanks!!

try -maxdepth as follows..

       -maxdepth levels
              Descend at most levels (a non-negative integer) levels of direc-
              tories below the command line arguments.   `-maxdepth  0'  means
              only  apply the tests and actions to the command line arguments.

Thanks for ur quick reply. but -maxdepth option is not supported with my unix verison. I have version 5 of unix.
when i tried to run find /appl/Output -name "Admin*" -prune -maxdepth 0 it gave error saying "find: 0652-017 -maxdepth is not a valid option."

Pls help.

Why are you using find if you are not recursing through directories?

echo /appl/Output/Admin*

actually i want to search based upon the file created time & file modified time. For that i have to use find command.

you could use the option mtime in the find command to search based on the modified time of the file.

either you can use--

ls -ltr /appl/Output/Admin*

Thanks
Namish