Syntaxe
which [OPTIONS] COMMANDE...Options principales
| Option | Description |
|---|---|
-a | Afficher toutes les occurrences trouvees |
-s | Mode silencieux, retourne uniquement le code |
-i | Ignorer les alias et fonctions shell |
Exemples
Localiser une commande
$ which python3
/usr/bin/python3Afficher toutes les occurrences d'une commande
$ which -a python
/usr/bin/python
/usr/local/bin/pythonVerifier l'emplacement de plusieurs commandes
$ which git node npm
/usr/bin/git
/usr/local/bin/node
/usr/local/bin/npm