Jump to content
Sign in to follow this  
mstdmstdd

How with locate search in subdirectory ?

Recommended Posts

I don't think locate can limit to a directory.  You can use find though, which will search the file system.  On the plus side, it'll find anything existing.  On the down side it may take a while on large trees.

find /the/dir -name 'file*name'

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.