{
    "content": [
        {
            "type": "text",
            "text": "# whereis(1) (man)\n\n**Summary:** whereis - locate the binary, source, and manual page files for a command\n\n**Synopsis:** whereis [options] [-BMS directory... -f] name...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -b | — | — | Search for binaries. |\n| -m | — | — | Search for manuals. |\n| -s | — | — | Search for sources. |\n| -u | — | — | Only show the command names that have unusual entries. A command is said to be unusual if it does not have just one entr |\n| -B | — | — | Limit the places where whereis searches for binaries, by a whitespace-separated list of directories. |\n| -M | — | — | Limit the places where whereis searches for manuals and documentation in Info format, by a whitespace-separated list of  |\n| -S | — | — | Limit the places where whereis searches for sources, by a whitespace-separated list of directories. |\n| -f | — | — | Terminates the directory list and signals the start of filenames. It must be used when any of the -B, -M, or -S options  |\n| -l | — | — | Output the list of effective lookup paths that whereis is using. When none of -B, -M, or -S is specified, the option wil |\n| -h | --help | — | Display help text and exit. |\n| -V | --version | — | Display version information and exit. |\n\n## Examples\n\n- `To find all files in /usr/bin which are not documented in /usr/man/man1 or have no source in`\n- `/usr/src:`\n- `cd /usr/bin whereis -u -ms -M /usr/man/man1 -S /usr/src -f *`\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (21 lines)\n- **OPTIONS** (1 lines) — 11 subsections\n  - -b (2 lines)\n  - -m (2 lines)\n  - -s (2 lines)\n  - -u (5 lines)\n  - -B (3 lines)\n  - -M (3 lines)\n  - -S (3 lines)\n  - -f (3 lines)\n  - -l (4 lines)\n  - -h --help (2 lines)\n  - -V --version (2 lines)\n- **FILE SEARCH PATHS** (3 lines) — 1 subsections\n  - -l -B -M -S -l (1 lines)\n- **ENVIRONMENT** (3 lines)\n- **EXAMPLES** (5 lines)\n- **REPORTING BUGS** (2 lines)\n- **AVAILABILITY** (6 lines)\n\n## Full Content\n\n### NAME\n\nwhereis - locate the binary, source, and manual page files for a command\n\n### SYNOPSIS\n\nwhereis [options] [-BMS directory... -f] name...\n\n### DESCRIPTION\n\nwhereis locates the binary, source and manual files for the specified command names. The\nsupplied names are first stripped of leading pathname components. Prefixes of s. resulting\nfrom use of source code control are also dealt with. whereis then attempts to locate the\ndesired program in the standard Linux places, and in the places specified by $PATH and\n$MANPATH.\n\nThe search restrictions (options -b, -m and -s) are cumulative and apply to the subsequent\nname patterns on the command line. Any new search restriction resets the search mask. For\nexample,\n\nwhereis -bm ls tr -m gcc\n\nsearches for \"ls\" and \"tr\" binaries and man pages, and for \"gcc\" man pages only.\n\nThe options -B, -M and -S reset search paths for the subsequent name patterns. For example,\n\nwhereis -m ls -M /usr/share/man/man1 -f cal\n\nsearches for \"ls\" man pages in all default paths, but for \"cal\" in the /usr/share/man/man1\ndirectory only.\n\n### OPTIONS\n\n#### -b\n\nSearch for binaries.\n\n#### -m\n\nSearch for manuals.\n\n#### -s\n\nSearch for sources.\n\n#### -u\n\nOnly show the command names that have unusual entries. A command is said to be unusual if\nit does not have just one entry of each explicitly requested type. Thus 'whereis -m -u *'\nasks for those files in the current directory which have no documentation file, or more\nthan one.\n\n#### -B\n\nLimit the places where whereis searches for binaries, by a whitespace-separated list of\ndirectories.\n\n#### -M\n\nLimit the places where whereis searches for manuals and documentation in Info format, by\na whitespace-separated list of directories.\n\n#### -S\n\nLimit the places where whereis searches for sources, by a whitespace-separated list of\ndirectories.\n\n#### -f\n\nTerminates the directory list and signals the start of filenames. It must be used when\nany of the -B, -M, or -S options is used.\n\n#### -l\n\nOutput the list of effective lookup paths that whereis is using. When none of -B, -M, or\n-S is specified, the option will output the hard-coded paths that the command was able to\nfind on the system.\n\n#### -h --help\n\nDisplay help text and exit.\n\n#### -V --version\n\nDisplay version information and exit.\n\n### FILE SEARCH PATHS\n\nBy default whereis tries to find files from hard-coded paths, which are defined with glob\npatterns. The command attempts to use the contents of $PATH and $MANPATH environment\nvariables as default search path. The easiest way to know what paths are in use is to add the\n\n#### -l -B -M -S -l\n\n### ENVIRONMENT\n\nWHEREISDEBUG=all\nenables debug output.\n\n### EXAMPLES\n\nTo find all files in /usr/bin which are not documented in /usr/man/man1 or have no source in\n/usr/src:\n\ncd /usr/bin whereis -u -ms -M /usr/man/man1 -S /usr/src -f *\n\n### REPORTING BUGS\n\nFor bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n\n### AVAILABILITY\n\nThe whereis command is part of the util-linux package which can be downloaded from Linux\nKernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                   WHEREIS(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "whereis",
        "section": "1",
        "mode": "man",
        "summary": "whereis - locate the binary, source, and manual page files for a command",
        "synopsis": "whereis [options] [-BMS directory... -f] name...",
        "flags": [
            {
                "flag": "-b",
                "long": null,
                "arg": null,
                "description": "Search for binaries."
            },
            {
                "flag": "-m",
                "long": null,
                "arg": null,
                "description": "Search for manuals."
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": "Search for sources."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "Only show the command names that have unusual entries. A command is said to be unusual if it does not have just one entry of each explicitly requested type. Thus 'whereis -m -u *' asks for those files in the current directory which have no documentation file, or more than one."
            },
            {
                "flag": "-B",
                "long": null,
                "arg": null,
                "description": "Limit the places where whereis searches for binaries, by a whitespace-separated list of directories."
            },
            {
                "flag": "-M",
                "long": null,
                "arg": null,
                "description": "Limit the places where whereis searches for manuals and documentation in Info format, by a whitespace-separated list of directories."
            },
            {
                "flag": "-S",
                "long": null,
                "arg": null,
                "description": "Limit the places where whereis searches for sources, by a whitespace-separated list of directories."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "Terminates the directory list and signals the start of filenames. It must be used when any of the -B, -M, or -S options is used."
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": "Output the list of effective lookup paths that whereis is using. When none of -B, -M, or -S is specified, the option will output the hard-coded paths that the command was able to find on the system."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit."
            }
        ],
        "examples": [
            "To find all files in /usr/bin which are not documented in /usr/man/man1 or have no source in",
            "/usr/src:",
            "cd /usr/bin whereis -u -ms -M /usr/man/man1 -S /usr/src -f *"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-b",
                        "lines": 2,
                        "flag": "-b"
                    },
                    {
                        "name": "-m",
                        "lines": 2,
                        "flag": "-m"
                    },
                    {
                        "name": "-s",
                        "lines": 2,
                        "flag": "-s"
                    },
                    {
                        "name": "-u",
                        "lines": 5,
                        "flag": "-u"
                    },
                    {
                        "name": "-B",
                        "lines": 3,
                        "flag": "-B"
                    },
                    {
                        "name": "-M",
                        "lines": 3,
                        "flag": "-M"
                    },
                    {
                        "name": "-S",
                        "lines": 3,
                        "flag": "-S"
                    },
                    {
                        "name": "-f",
                        "lines": 3,
                        "flag": "-f"
                    },
                    {
                        "name": "-l",
                        "lines": 4,
                        "flag": "-l"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "FILE SEARCH PATHS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "-l -B -M -S -l",
                        "lines": 1,
                        "flag": "-l"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}