NavigationCLI Manual
$which
Locate the executable binary path of a command in system PATH.
Syntaxe de la commandePOSIX Standard
which [OPTIONS] [COMMAND...]Essayer en direct dans le bac à sable interactif
Simulation côté client sans installation avec retour instantané.
bash — terminal
AST Sandbox (Free)
Aperçu et fonctionnement
`which` searches the directories listed in your `$PATH` environment variable to find and display the absolute location of an executable binary file.
Options et drapeaux courants
| Flag / Option | Description |
|---|---|
| -a | Print all matching pathnames of each argument across PATH. |
Exemples pratiques du monde réel
#1Find where python3 or grep is installed
which grep python3Outputs the binary paths in /usr/bin or /bin.
Commandes Linux associées
$findOpérations sur les fichiers
Rechercher des fichiers et des répertoires dans une arborescence selon le nom, le type, la taille ou la date.
$lsNavigation
Lister le contenu des répertoires avec les tailles, permissions et dates.
$cdNavigation
Changer le répertoire de travail courant pour naviguer dans le système de fichiers.
$pwdNavigation
Afficher le chemin absolu du répertoire de travail actuel.
$treeNavigation
Display directory structure in a recursive visual tree diagram.