MV
rsync
1. 跨文件系统移动
# 使用rsync替代(完成后需手动删除源文件)
rsync -av --progress /source/file /destination/
rm /source/file
2. 大文件移动
# 使用pv监控进度
pv /source/largefile > /destination/largefile && rm /source/largefile
3.断点续传
rsync -av --partial --progress /source/ user@remote:/dest/
4.更精准的断点续传
rsync -av --partial --append --progress /source/ user@remote:/dest/
5. 适用于增长型文件,如日志
rsync -av --partial --append --progress /source/ user@remote:/dest/
6.后台运行 rsync(防止 Xshell 断开导致任务终止)
# 使用 nohup(退出 SSH 仍继续运行)
nohup rsync -av --partial --progress /source/ user@remote:/dest/ > rsync.log 2>&1 &
# 或者使用 screen/tmux(推荐)
screen -S rsync_session
rsync -av --partial --progress /source/ user@remote:/dest/
# 按 Ctrl+A, D 脱离会话
# 重新连接:screen -r rsync_session