YouTip LogoYouTip

Linux Comm Look

# Linux look Command [![Image 3: Linux Command Manual](#) Linux Command Manual](#) The Linux `look` command is used to query words. The `look` command is used for querying English words. You only need to provide it with the prefix string you want to query, and it will display all words that start with that string. ### Syntax look **Parameter Description**: * -a Use another dictionary file `web2`, which is also located in the `/usr/dict` directory. * -d Only compare English letters and numbers, ignoring all other characters. * -f Ignore case differences. * -t Set the suffix string. ### 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 original `testfile` is as follows: $ cat testfile #View the contents of the testfile file HELLO LINUX! Linux is a free unix-type opterating system. This is a linux testfile! Linux test Using the `look` command in the `testfile` file to find words starting with "L", 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', listing the full sentence Linux test #The fourth line starts with 'L', listing the full sentence [![Image 4: Linux Command Manual](#) Linux Command Manual](#)
← Linux Comm MtypeLinux Comm Join β†’