UNIX 中的拼写错误命令?

Jos*_*zar 2 command-line autocorrection

我不记得有什么 UNIX 命令可以让您记住如何正确编写命令。

让我们假设我说的命令叫做 MISPELL

所以运行 MISPELL 将产生以下输出:

$ MISPELL chlmod 
Run Code Online (Sandbox Code Playgroud)

输出:

chmod
Run Code Online (Sandbox Code Playgroud)

agc*_*agc 5

对于Ubuntu发行版,请安装command-not-found

apt install command-not-found
Run Code Online (Sandbox Code Playgroud)

安装并启用后,它会在当前bashshell 中运行(更具体地说安装bash启动的任何shell )。如果用户键入一个单独的“ chlmod ”,则输出如下

No command 'chlmod' found, did you mean:
 Command 'chmod' from package 'coreutils' (main)
chlmod: command not found
Run Code Online (Sandbox Code Playgroud)

  • +1 Arch Linux 信息 [此处](https://wiki.archlinux.org/index.php/Pkgfile#Command_not_found) 用于 bash 和 zsh。 (2认同)