搜索time命令的联机帮助页不会产生任何结果(搜索表单)。
作为旁注,它似乎是一个 BASH 内置命令,因为dpkg --search bin/time找不到它。也许这些命令没有自己的联机帮助页?
正确的,通常 shell 内置程序有help页面,因为它们的使用通常不涉及。如果内置命令是那么复杂,就可能已经被推送的功能集成到其自身的可执行文件,此时它简化外壳逻辑的努力会得到男人页面。
您可以time通过使用获取信息help time
[jadavis6@ditirlns01 ~]$ help time
time: time [-p] PIPELINE
Execute PIPELINE and print a summary of the real time, user CPU time,
and system CPU time spent executing PIPELINE when it terminates.
The return status is the return status of PIPELINE. The `-p' option
prints the timing summary in a slightly different format. This uses
the value of the TIMEFORMAT variable as the output format.
times: times
Print the accumulated user and system times for processes run from
the shell.
Run Code Online (Sandbox Code Playgroud)
由于您的示例是bash,对于 GNU 工具,您还可以尝试info <toolName>获取更详尽的信息。help旨在在命令行上运行,并且他们不想淹没您的屏幕(可能将有用的信息推送到屏幕外),因此他们尽量保持help简短并在信息页面中为您提供完整的信息。例如:
[jadavis6@hypervisor ~]$ info time
Run Code Online (Sandbox Code Playgroud)
<...在我按下回车键后,会出现一个 ncurses 页面...>
File: time.info, Node: Top, Prev: (dir), Up: (dir)
This file documents the the GNU `time' command for running programs
and summarizing the system resources they use. This is edition 1.7,
for version 1.7.
* Menu:
* Resource Measurement:: Measuring program resource use.
-- The Detailed Node Listing --
Measuring Program Resource Use
* Setting Format:: Selecting the information reported by `time'.
* Format String:: The information `time' can report.
* Redirecting:: Writing the information to a file.
* Examples:: Examples of using `time'.
* Accuracy:: Limitations on the accuracy of `time' output.
* Invoking time:: Summary of the options to the `time' command.
The Format String
* Time Resources::
* Memory Resources::
* I/O Resources::
* Command Info::
Run Code Online (Sandbox Code Playgroud)
完整描述信息页面可能超出了您的问题范围,因此我将就此搁置。我只是提到它,所以你知道他们的存在。
| 归档时间: |
|
| 查看次数: |
142 次 |
| 最近记录: |