我试图查看已经运行的 rsync 和 cp 任务的进度,并找到了这个答案,让我可以看到当前正在发生的事情
当我转到man页面lsof并看到它-c是用来选择要查看的过程(cp在下面的示例中)时:
-a causes list selection options to be ANDed, as described above.
-b causes lsof to avoid kernel functions that might block - lstat(2), readlink(2), and stat(2).
但我真的不明白与3-999
做什么lsof -ad3-999 -c cp?
-d3-999只是从列表中排除标准文件描述符 (0,1,2)。-d用于指定 fds 的列表或范围:写这篇文章的人可能放弃理解为什么取反范围不起作用(就像我一样),而是那样写。