Which (Unix)
- Which (Unix)
-
which
Which est un pronom relatif anglais signifiant « lequel ».
which est également une commande POSIX qui retourne le chemin des fichiers qui seraient exécutés dans l'environnement courant si ses arguments avaient été donnés comme commandes dans un interpréteur de commandes strictement conforme à POSIX. Pour ce faire, which cherche dans la variable PATH les fichiers exécutables correspondants aux noms des arguments.
Exemple sous bash :
$> which which
/usr/bin/which
$> which less
/usr/bin/less
$> which echo
/bin/echo
Which se trompe pour echo, puisque c'est la plupart du temps une primitive du shell.
Sous zsh, which est une primitive du shell, ce qui lui donne l'avantage de retrouver les alias, les commandes internes et les fonctions du shell.
$> which which
which: shell built-in command
$> which less
/usr/bin/less
$> which echo
echo: shell built-in command
Voir aussi
GNU Core Utilities
Liens externes
- Portail de l’informatique
Catégorie : Commande Unix
Wikimedia Foundation.
2010.
Contenu soumis à la licence CC-BY-SA. Source : Article Which (Unix) de Wikipédia en français (auteurs)
Regardez d'autres dictionnaires:
Which (Unix) — which is a Unix command used to identify the location of executables.which takes one or more arguments; for each of these arguments, it prints to stdout the full path of the executable that would have been executed if this argument had been… … Wikipedia
Unix time — Unix time, or POSIX time, is a system for describing points in time, defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of January 1 1970, not counting leap seconds. It is widely used not only on Unix like… … Wikipedia
which — which Unix утилита, отображающая полный путь к указанным командам или сценариям. Содержание 1 Описание 2 Опции 3 Пример использования … Википедия
Which — which Unix утилита, отображающая полный путь к указанным командам или сценариям. Содержание 1 Описание 2 Опции 3 Пример использования … Википедия
Which — is an English relative pronoun and interrogative pronoun.Which may also refer to: *Which?, a UK charity and its magazine *which (Unix), a Unix command See also * English relative clauses, for discussion of when to use which and when to use that… … Wikipedia
Unix — (officially trademarked as UNIX, sometimes also written as Unix with small caps) is a computer operating system originally developed in 1969 by a group of AT T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Douglas McIlroy, and… … Wikipedia
Unix security — Unix security: maintaining a secure environment on Unix and Unix like operating systems is dependent on design concepts of these operating systems, but vigilance through user and administrative techniques is important to maintain security… … Wikipedia
UNIX System V — Unix System V, commonly abbreviated SysV (and usually pronounced, though rarely written as System 5), was one of the versions of the Unix operating system. It was originally developed by AT T and first released in 1983. Four major versions of… … Wikipedia
UNIX System Services — (USS) is a required, included component of z/OS. USS is a certified UNIX implementation (XPG4 UNIX 95) optimized for mainframe architecture. It is the first UNIX 95 to not be derived from the AT T source code. Through integration with the rest of … Wikipedia
Unix — (marque déposée officiellement comme UNIX, parfois aussi écrit comme Unix avec les petites capitalisations) est le nom d un système d exploitation multitâche et multi utilisateur créé en 1969, conceptuellement ouvert et fondé sur une approche par … Wikipédia en Français