Linux Unix中的内置命令
在Unix或类似Unix的系统中,命令的类型为“shell内置”。cd、echo等命令是shell内置的。有什么办法吗Linux Unix中的内置命令,linux,shell,unix,Linux,Shell,Unix,在Unix或类似Unix的系统中,命令的类型为“shell内置”。cd、echo等命令是shell内置的。有什么办法吗 要列出所有shell内置命令,或者是否有任何命令可用于列出shell的所有内置命令?这取决于shell。因此,请阅读特定shell的文档 有关bash,请参阅 有关zsh,请参阅 有关fish,请参阅 有关tcsh(我不推荐使用STFW),请参阅 有关POSIX外壳规范,请阅读。如果您想以某种方式编写“可移植”的shell脚本,您应该将自己限制在该规范中 一些救援炮弹有许多内置
要列出所有shell内置命令,或者是否有任何命令可用于列出shell的所有内置命令?这取决于shell。因此,请阅读特定shell的文档 有关
bash
,请参阅
有关zsh
,请参阅
有关fish
,请参阅
有关tcsh
(我不推荐使用STFW),请参阅
有关POSIX外壳规范,请阅读。如果您想以某种方式编写“可移植”的shell脚本,您应该将自己限制在该规范中
一些救援炮弹有许多内置装置,可用于严重损坏或损坏的系统,例如不再有任何/bin/mv
或/bin/cp
。比如说
有些shell能够加载(可能以某种方式定义新的内置项)或定义函数
有些Shell有一个受限形式,它删除了一些内置内容(特别是
cd
)。有关受限的bash
请参阅。查看shell的手册页。
应该有一节“SHELL内置命令”
选项卡显示路径和内置的可用命令。
重置路径并输入[TAB]两次,然后回答y
$ PATH=
$ [TAB][TAB]
Display all 123 possibilities? (y or n)
- compgen fg _ooexp_ spwd
: complete fi path startx
! compopt for _pkcon _strip
. _compreply_ function __pkconcomp suspend
.. continue _gdb_ _pkcon_search test
... coproc getopts popd then
[ __dbus_send hash ppwd time
[[ declare help printf times
]] dir history pushd trap
{ dirs if pwd true
} disown in rd type
+ do jobs read typeset
alias done kill readarray ulimit
beep echo l readonly umask
bg elif la rehash unalias
bind else let remount unmount
break enable ll return unset
builtin esac local _scout until
caller eval logout _scpm wait
case exec ls select while
cd exit ls-l set _yast2
_cd_ _exp_ _man_ shift you
cd.. export mapfile shopt _zypper
command false md skipthis
command_not_found_handle fc o source
只需在shell上键入
help
,就会出现一个列表请检查答案,谢谢。这些是文档。我期望的命令在下面的链接中。stackoverflow.com/a/949006/524743不幸的是,这个链接是针对bash
的。它不能与其他壳一起工作。如果您的bash
加载了插件,或者对于受限bash
$ PATH=
$ [TAB][TAB]
Display all 123 possibilities? (y or n)
- compgen fg _ooexp_ spwd
: complete fi path startx
! compopt for _pkcon _strip
. _compreply_ function __pkconcomp suspend
.. continue _gdb_ _pkcon_search test
... coproc getopts popd then
[ __dbus_send hash ppwd time
[[ declare help printf times
]] dir history pushd trap
{ dirs if pwd true
} disown in rd type
+ do jobs read typeset
alias done kill readarray ulimit
beep echo l readonly umask
bg elif la rehash unalias
bind else let remount unmount
break enable ll return unset
builtin esac local _scout until
caller eval logout _scpm wait
case exec ls select while
cd exit ls-l set _yast2
_cd_ _exp_ _man_ shift you
cd.. export mapfile shopt _zypper
command false md skipthis
command_not_found_handle fc o source