鉴于...
~$ which time
time is a shell keyword
time is /usr/bin/time
Run Code Online (Sandbox Code Playgroud)
为什么这有效?
~$ /usr/bin/time --verbose ./some_script.sh
Command being timed: "./some_script.sh"
User time (seconds): 0.00
System time (seconds): 0.01
Percent of CPU this job got: 51%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.03
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 4572
Average resident set size (kbytes): 0
Major (requiring …
Run Code Online (Sandbox Code Playgroud) time ×1