網站首頁 學習教育 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 命令