Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 如何测量dtach的时间_Linux_Shell - Fatal编程技术网

Linux 如何测量dtach的时间

Linux 如何测量dtach的时间,linux,shell,Linux,Shell,我有一个进程正在通过dtach运行。我想测量时间并将其写入文件。让我们调用进程ls-l 我已经试过几次了,但都没成功。。 有人能帮忙吗 time命令可能会帮助您: time dtach -c /tmp/foofoo -Ez ls -l 输出: ... ... [EOF - dtach terminating] real 0m0.005s user 0m0.000s sys 0m0.000s 但是,如果我想取消连接(说这是一个很长的过程),它将计算时间直到分离

我有一个进程正在通过
dtach
运行。我想测量时间并将其写入文件。让我们调用进程
ls-l

我已经试过几次了,但都没成功。。
有人能帮忙吗

time
命令可能会帮助您:

time dtach -c /tmp/foofoo -Ez ls -l
输出:

...
...
[EOF - dtach terminating]

real    0m0.005s
user    0m0.000s
sys     0m0.000s
但是,如果我想取消连接(说这是一个很长的过程),它将计算时间直到分离