Easy Tutorial
❮ Linux Install Linux Comm Dnsconf ❯

Linux look Command

Linux Command Manual

The Linux look command is used for querying words.

The look command is used for querying English words. You only need to provide it with the initial string of the word you want to query, and it will display all words that start with that string.

Syntax

look [-adf][-t<suffix string>][prefix string][dictionary file]

Parameter Description:

Example

To find all lines in the testfile file that start with the letter "L", you can enter the following command:

look L testfile

The content of the testfile file is as follows:

$ cat testfile # View testfile file content  
HELLO LINUX!  
Linux is a free unix-type opterating system.  
This is a linux testfile!  
Linux test

Using the look command to find words starting with "L" in the testfile file, the result is as follows:

$ look L testfile                              # Find words starting with "L"  
Linux is a free unix-type opterating system.   # The second line starts with "L", display the entire sentence  
Linux test                                     # The fourth line starts with "L", display the entire sentence

Linux Command Manual

❮ Linux Install Linux Comm Dnsconf ❯