pv file.txt | tee >(sha1sum > file.sha1) > file-copy.txt
命令用途:复制进度文件并将哈希保存到其他文件
管道分解
该命令通过管道(|)将多个命令串联,前一个命令的输出作为后一个命令的输入,逐步处理数据。
- 第 1 步:
pv file.txt - 第 2 步:
tee >(sha1sum > file.sha1) > file-copy.txt
重定向
使用 > 进行覆盖写入操作。
完整命令
pv file.txt | tee >(sha1sum > file.sha1) > file-copy.txt
评论(0)
发表评论