How do I perform a file search in linux without descending into directories?



  • Also see: Man page for find.

    This could be a long list, terminate the output using Ctrl-C

    Without the -prune option, find descends directories.

    $ find *st
    test
    test/perf
    

    Add the -prune option and only the top-level directory is listed.

    $ find *st -prune
    test
    


© Lightnetics 2022