是的,in
命令在 Linux 中可以用于目录搜索
find /path/to/directory -type f -name "search_pattern"
其中,/path/to/directory
是你想要搜索的目录路径,search_pattern
是你想要匹配的文件名模式。例如,如果你想在 /home/user/documents
目录中搜索所有 .txt
文件,你可以使用以下命令:
find /home/user/documents -type f -name "*.txt"
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:linux chown命令能用于目录吗