網站首頁 學習教育 IT科技 金融知識 旅遊規劃 生活小知識 家鄉美食 養生小知識 健身運動 美容百科 遊戲知識 綜合知識
當前位置:趣知科普吧 > IT科技 > 

look命令詳解|linux

欄目: IT科技 / 發佈於: / 人氣:1.19W

在linux系統中,look指令是用於英文單字的查詢的,僅需給予它欲查詢的字首字元串,它就會顯示所有開頭字元串符合該條件的單字。

語法:look [-adf][-t<字尾字元串>][字首字元串][字典檔案]

參考例子:

查詢file檔案中以L開頭的行:

[root@linux265 ~]# cat file 

 LINUX!  

 Linux is a free unix-type opterating system.  

 This is a linux testfile!  

 Linux test 

[root@linux265 ~]# look L file

 LINUX!  

 Linux is a free unix-type opterating system. 

參數:

-a 使用另一個字典檔案web2,該檔案也位於/usr/dict目錄下

-d 只對比英文字母和數字,其餘一慨忽略不予比對

-f 忽略字元大小寫差別

-t <字尾字元串> 設定字尾字元串。

linux look命令詳解

Tags:命令 linux