use*_*637 4 command-line gnome-terminal
对不起,这个问题将是全新的因素。如何使用 locate 命令在特定目录中搜索?
以下命令对我不起作用:
# locate -i mnt/external/Songs/"tangerine"
Run Code Online (Sandbox Code Playgroud)
我想在“歌曲”文件夹中搜索。
也许你想要
locate -ir 'mnt/external/Songs/.*tangerine'
Run Code Online (Sandbox Code Playgroud)
-r
用于正则表达式搜索,例如 in grep
。对于像这样简单的情况,您也可以使用普通的 glob:
locate /mnt/external/Songs/*tangerine*
Run Code Online (Sandbox Code Playgroud)