look

英 [lʊk]   美 [lʊk]  

vt.& vi.看,瞧

vi.寻找;注意;面向;看起来好像

n.看;样子;(尤指吸引人的)相貌;眼神

int.(插话或唤起注意)喂,听我说

第三人称单数: looks 复数: looks 现在分词: looking 过去式: looked 过去分词: looked

Linux look命令 语法

作用:look命令用于查询单词。

语法:look [-adf][-t<字尾字符串>][字首字符串][字典文件]

Linux look命令 示例

为了查找在testfile文件中以字母L开头的所有的行,可以输入如下命令:

look L testfile

原文件testfile中的内容如下:


$ cat testfile #查看testfile 文件内容  
HELLO LINUX!  
Linux is a free unix-type opterating system.  
This is a linux testfile!  Linux test

在testfile文件中使用look命令查找以"L"开头的单词,结果如下:

$ look L testfile        #查找以“L”开头的单词  
Linux is a free unix-type opterating system.   #第二行以“L”开头,列出全句  
Linux test         #第四行以“L”开头,列出全句

热门推荐