Skip to content

[linux] find 指令,搜尋檔案資料夾名稱與全文搜尋

Published: at 05:29 AM

在 linux 中有一個 find 指令,可以幫助我們根據名稱、大小及時間等資訊快速的找到檔案與資料夾

另外,更好用的地方是可以搜尋檔案內容。

以下我們將介紹這個指令常用的地方,因為太過強大,所以比較少用的案例及詳細的參數就不寫上來囉!


這邊先介紹一下 -type [搜尋類型] 這個參數

b    block special file (特殊設備檔案) c    character special file (特殊設備檔案) d    directory (資料夾) f     regular file (一般檔案) l     symbolic link (連結檔) p    FIFO (命令管道) s    socket

參考資料:

http://blog.miniasp.com/post/2010/08/27/Linux-find-command-tips-and-notice.aspx

https://help.ubuntu.com/community/find

http://falldog7.blogspot.tw/2008/01/linux.html