如何读取不在 manpath 上的 .man 文件?
如何读取不在我的 manpath 上的 .man 文件?我知道我有一个命令,但现在我不记得了,而且我在 man 的手册页中找不到正确的开关。
How do I read a .man file that's not on my manpath? I know I had a command for this, but now I don't remember, and I can't find the right switch in the man pages for man.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试通过执行
以下操作来读取文件,如果 man 在其中找到斜杠
/
,则会将给定参数视为文件。例如,
将打开
my_test
文件,同时将在标准手册中查找给定的命令。
You can try to read your file by doing
as man will treat the given argument as a file if it finds a slash
/
in it.For instance
will open the
my_test
file, whilewill look in the standard manual for the given command.
如果您的手册页位于非标准目录位置,您可以使用:
您还可以使用 MANPATH 环境变量:
如果您要格式化独立的手册页,请使用 nroff:
If your man page is in a non-standard directory location, you can use:
You can also use the MANPATH environment variable:
If you are looking to format a standalone man page, use nroff:
选项
-l, --local-file
,如man man
中所述The option
-l, --local-file
, as documented inman man