To run a find command limited to only the current directory and not search through any subdirectories, use the -maxdepth 0 option:

    find . -maxdepth 0 -print

    To search one level of directories below /usr, use:

    find /usr -maxdepth 1 -print

    The maxdepth option can be used in conjunction with other find options such as -name, -nouser, -atime, etc.

    — Limit the depth of search using find | UNIX | Tech-Recipes
    Working with Rails ⋅  GitHub ⋅  Twitter ⋅  Linked In ⋅  Facebook ⋅  Powered by tumblr
    Fork me on GitHub