大量文件拷贝,显示进度

linux中拷贝大文件,同时显示进度

rsync

# 使用 -P 参数显示进度
rsync -av -P /media/yourname/disk-a/somefile.tgz /media/yourname/disk-b

# 使用 --progress 参数显示进度
rsync -av ---progress /media/yourname/disk-a/somefile.tgz /media/yourname/disk-b

# 从远程服务器拷贝文件
rsync -av --progress root@nas01:/tmp/*Office* .

--ignore-errors --ignore-missing-args 添加这些参数,忽略错误,还没试过。

dd

dd if=/source/file/path of=/dest/file/path bs=1M status=progress
  • Benchmark
    • 操作系统: Manjaro exfat 组件: exfat-linux-dkms
      在 Intel P4600 Nvme 固态硬盘上测试,从 exfat 向 ext4 格式拷贝10G+文件,
      “bs=1M” 或 “bs=4K” 效果都很好,达到 1GB/s ;但是 “bs=4M” 或者默认 512 bytes 就很慢,才 230MB/s。

cp

cp -Rfv sourcefile destinationfile

  • cp = copy
  • R = maintains file hierarchies
  • f = if an existing destination file cannot be opened, remove it and try again
  • v = verbose mode, displays files transferred as it progresses
  • sourcefile = data you want to copy
  • destinationfile = directory/drive you want to copy to
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值