MacOs通過命令行查找對應文件路徑

1、根據文件名查找路徑
mdfind -name 文件名   例:mdfind -name "hello.txt"

2、根據文件內容查找路徑
mdfind ‘文本內容’    例:mdfind 'hello i am fine'

 

命令拓展:
根據命令行新建文本文件:touch 文件名+.txt   例:touch hello.txt

發佈了58 篇原創文章 · 獲贊 18 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章