Linux slocate命令詳解 Linux slocate命令怎麼用

來源:互聯網
上載者:User

slocate本身具有一個資料庫,裡面存放了系統中檔案與目錄的相關資訊。

文法

slocate [-u][--help][--version][-d <目錄>][尋找的檔案]

參數

  • -d<目錄>或--database=<目錄> 指定資料庫所在的目錄。

  • -u 更新slocate資料庫。

  • --help 顯示協助。

  • --version 顯示版本資訊。

執行個體

使用指令"slocate"顯示檔案名稱中含有關鍵字"fdisk"的檔案路徑資訊,輸入如下命令:

$ slocate fdisk #顯示檔案名稱中含有fdisk關鍵字的檔案的路徑資訊

執行以上命令後,指令執行的輸出資訊如下:

$ slocate fdisk #顯示檔案名稱中含有fdisk 關鍵字的檔案的路徑資訊  /root/cfdisk        #搜尋到的檔案路徑列表  /root/fdisk  /root/sfdisk  /usr/include/grub/ieee1275/ofdisk.h  /usr/share/doc/util-Linux/README.cfdisk  /usr/share/doc/util-Linux/README.fdisk.gz  /usr/share/doc/util-Linux/examples/sfdisk.examples.gz
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.