Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

hash (Unix)

From Wikipedia, the free encyclopedia
Standard UNIX utility
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Hash" Unix – news ·newspapers ·books ·scholar ·JSTOR
(December 2009) (Learn how and when to remove this message)
hash
DevelopersVariousopen-source andcommercial developers
Operating systemUnix,Unix-like,IBM i
TypeCommand

hash is acommand onUnix andUnix-likeoperating systems that prints the location information for the commands found. Thehash command has also been ported to theIBM i operating system.[1]

Syntax

[edit]
$ hash [name]

Description

[edit]

When the user gives a command, the shell searches for the command in the path specified in thePATH environmental variable and stores the location in the hash. This command can be used to search for the command given. The command is built into the shell.C shell implements this command in a different way.

Options

[edit]

The following options are supported.

name
Searches the PATH environmental variable for the name given

Exit Status

[edit]

This command returns the following exit values:

0
Successful completion
1
An Error occurred

Examples

[edit]
$ hash

Print the hash table.

$ hash cat

Searches for command cat in the path specified by PATH environmental variable; if found, adds it to the hash.

See also

[edit]

References

[edit]
  1. ^IBM."IBM System i Version 7.2 Programming Qshell"(PDF).IBM. Retrieved2020-09-05.

External links

[edit]
The WikibookGuide to Unix has a page on the topic of:Commands
File system
Processes
User environment
Text processing
Shell builtins
Searching
Documentation
Software development
Miscellaneous
Retrieved from "https://en.wikipedia.org/w/index.php?title=Hash_(Unix)&oldid=1317093937"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp