使用errno-l命令查看unix中的错误代码列表



我使用的是unix,当我输入时:

man errno

我得到了一个弹出窗口,上面写着我应该能够看到所有的错误代码及其含义:

$ errno -l
EPERM 1 Operation not permitted
ENOENT 2 No such file or directory
ESRCH 3 No such process
EINTR 4 Interrupted system call
EIO 5 Input/output error
...

但是当我输入errno-l时,我的控制台显示

-bash: errno: command not found

如何在unix中查看所有错误列表?以及如何使用手册页中提供的示例(man errno(?非常感谢。

正如@Socowi在对您的问题的评论中所写,

您必须安装该程序。在大多数Linux发行版中,相应的包被称为moreutils。因此,请使用sudo apt install moreutilspacman -S moreutils或系统使用的任何包管理器。

如果您没有足够的权限执行此操作,您可以在此处找到Michael Mazack的错误代码列表(以及打印它们的perl脚本或C程序(:http://mazack.org/unix/errno.php(或后退:https://web.archive.org/web/20220327145507/http://mazack.org/unix/errno.php(

最新更新