{
    "mode": "man",
    "parameter": "WHICH",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/WHICH/1/json",
    "generated": "2026-05-30T06:05:05Z",
    "synopsis": "which [-a] filename ...",
    "sections": {
        "NAME": {
            "content": "which - locate a command\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "which [-a] filename ...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "which  returns  the  pathnames of the files (or links) which would be executed in the current\nenvironment, had its arguments been given as commands in a strictly  POSIX-conformant  shell.\nIt  does this by searching the PATH for executable files matching the names of the arguments.\nIt does not canonicalize path names.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-a",
                    "content": "",
                    "flag": "-a"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "0      if all specified commands are found and executable\n\n1      if one or more specified commands is nonexistent or not executable\n\n2      if an invalid option is specified\n\n\n\nDebian                                       29 Jun 2016                                    WHICH(1)",
            "subsections": []
        }
    },
    "summary": "which - locate a command",
    "flags": [
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [],
    "see_also": []
}