locate支持正则查询的功能, 只需输入locate -r 正则表达式 即可。
现在我想查找所有main.c怎么做?
打开终端,输入shell: locate -r main.c$
PS:'$'表示结束字符串结束。