Linux look command


  Translation results:

look

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

vt.& vi.Look, look

vi.Look for; pay attention; Facing; looking like ##Third person singular: looks Plural: looks Present participle: looking Past tense: looked Past participle: looked

Linux look commandsyntax

Function: look command is used to query words.

Syntax: look [-adf][-t<suffix string>][starting string][dictionary file]

Linux look commandexample

In order to find all lines starting with the letter L in the testfile file, you can enter the following command:

look L testfile

The content of the original file testfile is as follows:


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

Use the look command in the testfile file to find words starting with "L". The results are as follows:

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

Popular Recommendations

Home

Videos

Q&A