If i lost a file I use locate a lot. Works perfectly and with grep you can quickly find back what you looked for.
However, often it generates a lot of output which is not always easy to filter. One instance is when searching for a lost dir when the name is used in the base of a lot of entries. Try searching all
bin dirs for example.
Locate by itself has no option to only search for directory type entries, but it has a option to parse a regexp. Unfortunately I am no high flyer on regexp.
What would the regexp be to parse to locate to show 1 occurrence of every
bin dir, or can I better use a different pipe?