![설정이나 내보내기를 위한 매뉴얼 페이지가 없는 이유는 무엇입니까? [복사]](https://linux55.com/image/136071/%EC%84%A4%EC%A0%95%EC%9D%B4%EB%82%98%20%EB%82%B4%EB%B3%B4%EB%82%B4%EA%B8%B0%EB%A5%BC%20%EC%9C%84%ED%95%9C%20%EB%A7%A4%EB%89%B4%EC%96%BC%20%ED%8E%98%EC%9D%B4%EC%A7%80%EA%B0%80%20%EC%97%86%EB%8A%94%20%EC%9D%B4%EC%9C%A0%EB%8A%94%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F%20%5B%EB%B3%B5%EC%82%AC%5D.png)
에 대한 정보를 찾으려고 노력 중이에요출구그리고놓다사용남성아무것도 찾지 못해 놀랐습니다. 이것이 사실입니까, 아니면 이 분포가 특정합니까? 페이지가 누락된 이유는 무엇인가요?
답변1
이는 쉘에서 제공하는 내부 기능이며 /bin
또는 에서 찾을 수 있는 것과 같은 진정한 독립 실행형 명령이 아닙니다 /usr/bin
. 의 출력을 또는 중 하나와 whereis ls
비교합니다 .whereis set
whereis export
입력 help
하여 모든 내부 명령 목록을 가져오거나 섹션 bash
아래의 설명서를 볼 수 있습니다 SHELL BUILTIN COMMANDS
.
따라서 이것은 배포판에 국한되지 않습니다. 사용 가능한 명령 목록은 사용되는 셸에 따라 달라집니다.
때로는 쉘 내장 및 시스템의 명령과 동일한 명령을 사용할 수 있습니다. 예를 들어 pwd
내장이 우선하며 이를 재정의하려면 유사한 명령을 호출해야 합니다 \pwd
. 여러 셸에 대한 일부 스크립트를 유지 관리해야 할 때, 특히 내장 명령과 외부 명령에 대한 내장 구문이 다른 경우 이에 대해 주의해야 합니다.
답변2
이는 쉘 내장 기능이며 다음을 사용하여 확인할 수 있습니다.
$ type export
export is a shell builtin
help export
따라서 또는 를 사용할 수 있습니다 man builtins
.
답변3
이는 쉘에 내장된 명령입니다. Bourne 쉘을 사용하면 help <cmd>
내장된 컨텐츠를 사용하는 방법에 대한 사용법 세부 정보를 얻을 수 있습니다.
명령 설정
$ help set
set: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
Set or unset values of shell options and positional parameters.
Change the value of shell attributes and positional parameters, or
display the names and values of shell variables.
Options:
-a Mark variables which are modified or created for export.
-b Notify of job termination immediately.
-e Exit immediately if a command exits with a non-zero status.
-f Disable file name generation (globbing).
-h Remember the location of commands as they are looked up.
-k All assignment arguments are placed in the environment for a
command, not just those that precede the command name.
-m Job control is enabled.
-n Read commands but do not execute them.
...
...
내보내기 명령
$ help export
export: export [-fn] [name[=value] ...] or export -p
Set export attribute for shell variables.
Marks each NAME for automatic export to the environment of subsequently
executed commands. If VALUE is supplied, assign VALUE before exporting.
Options:
-f refer to shell functions
-n remove the export property from each NAME
-p display a list of all exported variables and functions
An argument of `--' disables further option processing.
Exit Status:
Returns success unless an invalid option is given or NAME is invalid.