- 论坛徽章:
- 1
|
$PATH
Path to binaries, usually /usr/bin/, /usr/X11R6/bin/, /usr/local/bin, etc.
When given a command, the shell automatically does a hash table search on the directories listed in
the path for the executable. The path is stored in the environmental variable, $PATH, a list of
directories, separated by colons. Normally, the system stores the $PATH definition in
/etc/profile and/or ~/.bashrc (see Appendix G).
bash$ echo $PATH
/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/sbin:/usr/sbin
PATH=${PATH}:/opt/bin appends the /opt/bin directory to the current path. In a script, it
may be expedient to temporarily add a directory to the path in this way. When the script exits, this
restores the original $PATH (a child process, such as a script, may not change the environment of the
parent process, the shell).
The current "working directory", ./, is usually omitted from the $PATH as a security
measure.
这是ABS里关于PATH变量的解释。
其中提到When given a command, the shell automatically does a hash table search on the directories listed in
the path for the executable.
这里的"hash table search"指的是什么?
还有The current "working directory", ./, is usually omitted from the $PATH as a security
measure.
这句也没理解安全在哪?
请大家指点,谢谢。 |
|