In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
For each name,the full file name of command is determined by searching the directories in $PATH and remembered.
For the parameter name in each hash command, the full filename of the command is determined by the directory searched in $PATH, and then the hash command remembers the result.
Hash [- p filename]
If the-p option is supplied,no path search is performed,and filename is used as the full filename of the command.
If the-p option is provided, no path search is performed, and the command full path path is aliased to name
The the-r option causes the shell to forget allrembered locations-r option makes shell forget all the locations that have been remembered. The the-d option cause the shell to forget location of each name-d option makes shell forget every file location of the specified name, If the-t option is supplied,the full pathnameto which each name corresponds is printed. Using the-t option, the full path to each matching name will be output. If multiple name arguments are supplied with-t, the name is printed before the hashed full pathname. If you use the-t option with many parameters for name, the output will be preceded by name before the full pathname of the hashed. The-l option cause output to be display in a format that may be reused as input. The-l option is output in a format, and the output may also be used as input. If no arguments are given,or if only-l is supplied, information about rembered commands is printed. If there is no argument, or only a-l option is followed, the information of the remembered command will be output The return status is ture unless a name is not found or an invalid option is supplied return status is ture, unless name does not find it, or an invalid option
When an external command is executed, the command is looked for under the PATH path by default, and when found, the path of the command is recorded in the hash table cache. When the command is used again, shell will first look for the hash table, if it exists, execute it, and if it does not exist, it will perform a search in PATH.
Command format
Hash [- lr] [- p filename] [- dt] [name]
Hash-p filename name: record the filename full path alias name to hash
Hash-d name clears the cache for the specified name
Hash-r clears all hash caches
Hash-t name outputs all matched name
The hash-t name1 name2 parameter name, if there is more than one, displays the name at the beginning of the corresponding line.
Hash-l [name] displays the hash cache in a specific format and can also be used as input
Hash is followed by no arguments or only a-l option, and all the cache information in the hash table will be output. The difference lies in the format in which the results are displayed.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.