mstdmstdd Posted March 22, 2019 Share Posted March 22, 2019 Hello! I look at locale description https://www.tecmint.com/linux-locate-command-practical-examples/ but I did not find if there is a way to specify in which subdirectory to make search ? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/308500-how-with-locate-search-in-subdirectory/ Share on other sites More sharing options...
kicken Posted March 22, 2019 Share Posted March 22, 2019 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' 1 Quote Link to comment https://forums.phpfreaks.com/topic/308500-how-with-locate-search-in-subdirectory/#findComment-1565498 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.