现在的位置: 首页 > 综合 > 正文

[小工具] cv: 显示 cp、mv 等命令的进度

2017年11月13日 ⁄ 综合 ⁄ 共 438字 ⁄ 字号 评论关闭

在 Linux 系统中,大多数命令从来都是信奉“沉默是金”的准则,所以当我们利用 cp 复制文件的时候并不能看到所谓的进度条。如果你在意这一点,那么不妨来用用
cv

cv 是 Coreutils Viewer,它能够显示传输数据的进度,包括百分比、大小、以及速率等信息。cv 支持 coreutils 中的基本命令,比如 cp、mv、rm、dd、tar 等等。

cv 的源代码可从 GitHub 获取,需要自行编译。

cv的实现机制:

It simply scans /proc for interesting commands, and then use fd/ and fdinfo/directories to find opened files and seek position, and reports status forthe biggest file.

It's very light, and compatible with virtually any command.

就是扫描/proc文件系统,查找fd/和fdinfo/目录下的已打开的文件并报告对应的状态.

抱歉!评论已关闭.