PHP5 網管實驗室 2007 | 加入會員
PHP5網管實驗室
 
 線上討論區 繁/簡體
 
  下載 下載 我的訊息 部落格 線上討論區 文件搜尋 線上討論區 線上討論 我的訊息 我的訊息 會員服務 會員服務 回首頁 回首頁 
  [Download] [ Blog ] [ Search ] [ Forum ] [ PM ] [ Member ] [ HOME ]

  文章主目錄 :: Linux 教學 :: Linux基本操作   ||張貼文章||
 
find指令摘要by yanni

相關連結 範例或相關連結 || 作者: || 時間:2004-01-19 00:16:51 ||最後更新:2004-01-19 00:16:51|| 列印 || 修改
find指令摘要by yanni

find . –name checklist –print
找出所有在當前目錄下檔名為checklist的檔案並顯示出來。

find /usr –name \'v*[0-9]\' –print
找出所有在/usr目錄下檔名為v開頭0-9之一結尾的檔案並顯示出來。

find /usr –size +1000 –print
找出所有在/usr目錄下檔案大小大於1000個blocks(512 bytes)的檔案並顯示出來。(-1000為小於)

find /usr –mtime –1 –print
找出所有在/usr目錄最近一天內被修改的檔案並顯示出來。(+1為比1天更舊的檔案)

find / -name core –exec rm {} \\\\;
找出所有在根目錄下檔名為core的檔案並刪除掉。(-exec 後放欲執行之命令與參數,最後以 \\\\; 結尾,{}表find所找到的檔名。

find /ice/share12 -name \'*.mp3\' –exec ls -lag {} \\\\; -print > mp3.txt

find /ice/share12 -name \'*.mp3\' –ok rm {} \\\\;

註:
-group [group number]
-user [user name]
-newer [filename]
-nogroup
-nouser
-perm [permission number]
! (not)
-o (or)
-a (and)
(expression) ex. find /ice/share12 –name (*.mp3 –o *.jpg) -print
-ok [command and parameter] {} \\\\;



 

網站地圖 廣告刊登 合作提案 關於作者 連絡我們 設為首頁  
   
     程式管理: jacch (jack chen)PHP5網管實驗室版權所有
     2001 - 2007 copyright by jacch . All rights reserved.. counter