词条 | PATH (variable) |
释义 |
PATH is an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located. In general, each executing process or user session has its own PATH setting. HistoryMultics 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.[1]Unix and Unix-likeOn POSIX and Unix-like operating systems, the Directories in the The When a command name is specified by the user or an exec call is made from a program, the system searches through DOS, OS/2, and WindowsOn DOS, OS/2, and Windows operating systems, the The Windows system directory (typically When a command is entered in a command shell or a system call is made by a program to execute a program, the system first searches the current working directory and then searches the path, examining each directory from left to right, looking for an executable filename that matches the command name given. Executable programs have filename extensions of Once a matching executable file is found, the system spawns a new process which runs it. The PATH variable makes it easy to run commonly used programs located in their own folders. If used unwisely, however, the value of the PATH variable can slow down the operating system by searching too many locations, or invalid locations. Invalid locations can also stop services from running altogether, especially the 'Server' service which is usually a dependency for other services within a Windows Server environment. References1. ^{{cite techreport |first1=M. D. |last1=McIlroy |authorlink1=Doug McIlroy |year=1987 |url=http://www.cs.dartmouth.edu/~doug/reader.pdf |title=A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 |series=CSTR |number=139 |institution=Bell Labs}} {{DEFAULTSORT:Path (Variable)}}2. ^Open Group Unix Specification, Environment Variables 3. ^Open Group Unix Specification, execve() function 4. ^[https://git.kernel.org/pub/scm/utils/dash/dash.git/tree/src/exec.c?h=v0.5.9.1&id=afe0e0152e4dc12d84be3c02d6d62b0456d68580#n173 Dash exec.c as an example of an implementation of a PATH-string parser] 5. ^Microsoft.com, PATH command 2 : Computer file systems|Environment variables |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。