linux中find常用命令詳解

for example:

find . -name "[1-9]*"? 或 find ?-name "[1-9]*" ? ?在當(dāng)前目錄下查找文件名以1到9開頭的文件及文件夾

find etc/ -name "[1-9]*" -type f ? ? ? ? ? ? ? ? ? ? ? ? 在當(dāng)前目錄下查找文件名以1到9開頭,類型為文件的文件

find etc/ -name "file1.txt" ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 在etc目錄下查找文件名為file.txt的文件或文件夾

find etc/ -perm 755 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?在etc目錄下查找權(quán)限值為755的文件或文件夾

find etc/ -user ?lc ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 在etc目錄下所有者為lc的文件或文件夾

find etc/ -mtime -3 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?在etc目錄下更改時間在3天內(nèi)的文件或文件夾

find etc/ -m +5 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?在etc目錄下更改時間為5天以前的文件或文件夾

find etc/ -size +1000000c ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 在etc目錄下文件大小大于1m的文件或文件夾

find etc/ -name "file1.txt" | xargs ls -l? ? ? ? ? ? ? 將find etc/ -name "file1.txt"輸出結(jié)果執(zhí)行l(wèi)s -l命令

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容