From 2905ba7bef744dabaef1bbcadbd418e5353f33fa Mon Sep 17 00:00:00 2001 From: nick Date: Thu, 10 May 2018 21:41:28 +0800 Subject: [PATCH] add --- other.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/other.md b/other.md index 6b48f8e..1182141 100644 --- a/other.md +++ b/other.md @@ -87,4 +87,18 @@ fc 588 #默认使用 vim 打开,编辑编号为 588 的命令,如果有修 echo hello linux #输出字符串 echo $my_name #输出变量值 +``` + +#### time 命令 + +``` +time ls #统计执行命令的时间 + +real 0m0.002s #命令执行开始到结束的时间 +user 0m0.002s #进程花费在用户模式中的时间 +sys 0m0.000s #在内核模式中的时间 + +/usr/bin/time -o output.log ls #将执行时间写入文件日志 + +/usr/bin/time -a -o outfile.txt ls #以追加的形式将执行时间写入日志文件 ``` \ No newline at end of file