PATH is an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of where executable programs are located. In general, each executing process or user session has its own PATH setting. Multics originated the idea of a search path. The early Unix shell only looked for program names in /bin, but by Version 3 Unix the directory was too large and /usr/bin, and a search path, became part of the operating system. On POSIX and Unix-like operating systems, the PATHvariableisspecifiedasalistofoneormoredirectorynamesseparatedbycolon(:)characters.DirectoriesinthePATHstringarenotmeanttobeescaped,makingitimpossibletohavedirectorieswith:intheirname.The/bin,/usr/bin,and/usr/local/bindirectoriesaretypicallyincludedinmostusersPATH variable is specified as a list of one or more directory names separated by colon (:) characters. Directories in the PATH-string are not meant to be escaped, making it impossible to have directories with : in their name. The /bin, /usr/bin, and /usr/local/bin directories are typically included in most users' PATH setting (although this varies from implementation to implementation). The superuser also typically has /sbin and /usr/sbin entries for easily executing system administration commands. The current directory (.) is sometimes included by users as well, allowing programs residing in the current working directory to be executed directly. System administrators as a rule do not include it in PATHinordertopreventtheaccidentalexecutionofscriptsresidinginthecurrentdirectory,suchasmaybeplacedtherebyamalicioustarbomb.Inthatcase,executingsuchaprogramrequiresspecifyinganabsolute(/home/userjoe/bin/script.sh)orrelativepath(./script.sh)onthecommandline.Whenacommandnameisspecifiedbytheuseroranexeccallismadefromaprogram,thesystemsearchesthroughPATH in order to prevent the accidental execution of scripts residing in the current directory, such as may be placed there by a malicious tarbomb. In that case, executing such a program requires specifying an absolute (/home/userjoe/bin/script.sh) or relative path (./script.sh) on the command line. When a command name is specified by the user or an exec call is made from a program, the system searches through PATH, examining each directory from left to right in the list, looking for a that matches the command name. Once found, the program is executed as a child process of the command shell or program that issued the command. On DOS, OS/2, and Windows operating systems, the %PATH% variable is specified as a list of one or more directory names separated by semicolon (;) characters.

À propos de ce résultat
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.

Graph Chatbot

Chattez avec Graph Search

Posez n’importe quelle question sur les cours, conférences, exercices, recherches, actualités, etc. de l’EPFL ou essayez les exemples de questions ci-dessous.

AVERTISSEMENT : Le chatbot Graph n'est pas programmé pour fournir des réponses explicites ou catégoriques à vos questions. Il transforme plutôt vos questions en demandes API qui sont distribuées aux différents services informatiques officiellement administrés par l'EPFL. Son but est uniquement de collecter et de recommander des références pertinentes à des contenus que vous pouvez explorer pour vous aider à répondre à vos questions.