hash (Unix)
Developer(s) | Various open-source and commercial developers |
---|---|
Operating system | Unix, Unix-like, IBM i |
Type | Command |
hash는 발견된 명령에 대해 위치 정보를 인쇄하는 유닉스와 유닉스-계열 운영 시스템의 명령입니다. hash 명령은 IBM i 운영 시스템에도 이식되었습니다.[1]
Syntax
$ hash [name]
Description
사용자가 명령을 내릴 때, 쉘은 PATH 환경 변수에 지정된 경로에서 명령을 검색하고 해시에 위치를 저장합니다. 이 명령은 주어진 명령을 검색하기 위해 사용될 수 있습니다. 그 명령은 쉘에 내장되어 있습니다. C 쉘은 이 명령을 다른 방법으로 구현합니다.
Options
다음 옵션이 지원됩니다.
- name
- 주어진 이름에 대해 PATH 환경 변수를 검색합니다.
Exit Status
이 명령은 다음 탈출 값을 반환합니다:
- 0
- 성공적인 완료
- 1
- 오류 발생
Examples
$ hash
해시 테이블을 인쇄합니다.
$ hash cat
PATH 환경 변수로 지정된 경로에서 cat 명령을 검색합니다; 발견되면, 그것을 해시에 추가합니다.
See also
References
- ^ IBM. "IBM System i Version 7.2 Programming Qshell" (PDF). Retrieved 2020-09-05.
{{cite web}}
: CS1 maint: url-status (link)
External links
![](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png)
The Wikibook Guide to Unix has a page on the topic of: Commands
- The Single UNIX Specification, Issue 7 from The Open Group – Commands & Utilities Reference,
- Solaris 10 User Commands Reference Manual –