10
Trying to use locate
command to find an exact match for the given pattern.
However it results showing all matching files..
For example: I want to find a binary named: node
But it gives me all matches containing this word:
server2# locate node
/usr/share/man/man9/getnewvnode.9.gz
/usr/share/man/man9/ieee80211_amrr_node_init.9.gz
/usr/share/man/man9/ieee80211_dump_node.9.gz
/usr/share/man/man9/ieee80211_dump_nodes.9.gz
/usr/share/man/man9/ieee80211_find_rxnode.9.gz
/usr/share/man/man9/ieee80211_find_rxnode_withkey.9.gz
/usr/share/man/man9/ieee80211_free_node.9.gz
Alternatively, you can use the
-b
switch to only match against the basename:locate -br node$
– Sarke – 2017-09-29T22:22:10.160