Linux command
look 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Example
look [prefix] [path/to/file]
Example
look -f -d [prefix] [path/to/file]
Example
look -t [char] [prefix] [path/to/file]
Example
look [prefix]
说明
look uses binary search to find lines beginning with a given prefix in a sorted file. Without a file argument, it searches the system dictionary (/usr/share/dict/words), and automatically applies case-insensitive and alphanumeric-only comparison.
参数
- -f, --ignore-case
- Ignore the case of alphabetic characters
- -d, --alphanum
- Only compare alphanumeric characters (dictionary order)
- -t, --terminate CHAR
- Specify a string termination character; only the characters in the prefix up to and including the first occurrence of CHAR are compared
FAQ
What is the look command used for?
look uses binary search to find lines beginning with a given prefix in a sorted file. Without a file argument, it searches the system dictionary (/usr/share/dict/words), and automatically applies case-insensitive and alphanumeric-only comparison.
How do I run a basic look example?
Run `look [prefix] [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --ignore-case do in look?
Ignore the case of alphabetic characters