Name

look — stdin  stdout  - file  -- opt  --help  --version

Synopsis

look [options] prefix [dictionary_file]

The look command prints (on standard output) words that begin with a given string prefix. The words are located in a dictionary file (default /usr/share/dict/words). For instance, look bigg prints:

bigger
biggest
Biggs

If you supply your own dictionary file—any text file with alphabetically sorted lines—look will print all lines beginning with the given prefix.

Useful options

-f

Ignore case.

-t X

Match the prefix only up to and including the termination character X. For instance, look -t i big prints all words beginning with “bi”.

Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.