Using locate to find a directory
You can use the option --regex
(-r
) of locate
:
locate -r '/log$'
A way (I suspect there may be a better way) is to use grep to return only the those paths which end in your folder name :
locate foldername | grep /foldername$