When you run mv across different filesystems (e.g., from an external drive /media/jhuang/Elements1 to your home directory ~/DATA), Linux does not actually move files. It performs a copy followed by a delete. If interrupted, you’re left with a partial copy at the destination and the original intact at the source. mv cannot resume.
Here’s how to safely complete the transfer using rsync, which is designed to resume, verify, and handle large datasets without corruption.
🔹 Step 1: Resume & Complete with rsync
rsync will automatically skip files that were fully copied, resume partially copied files, and only transfer what’s missing.
rsync -a --info=progress2 /media/jhuang/Elements1/Data_Ute_smallRNA_7/ ~/DATA/Data_Ute_smallRNA/Data_Ute_smallRNA_7/
Flags explained:
-a: Archive mode (preserves permissions, timestamps, symlinks, etc.)--info=progress2: Shows a single overall progress bar + transfer speed- Trailing
/on source ensures contents are placed inside the destination directory (matching your originalmvbehavior)
⚠️ If you use SSH or worry about disconnections, run this inside
tmuxorscreen:tmux new -s data_move # paste the rsync command inside # Detach with Ctrl+B, D. Reattach later with: tmux attach -t data_move
🔹 Step 2: Verify the Transfer
Once rsync finishes, verify that both directories match:
# Compare total sizes
du -sh /media/jhuang/Elements1/Data_Ute_smallRNA_7/
du -sh ~/DATA/Data_Ute_smallRNA/Data_Ute_smallRNA_7/
# Optional: Deep verification (checks checksums, slower but thorough)
rsync -a --dry-run -c /media/jhuang/Elements1/Data_Ute_smallRNA_7/ ~/DATA/Data_Ute_smallRNA/Data_Ute_smallRNA_7/
If the dry run outputs nothing, the directories are identical.
🔹 Step 3: Safely Remove the Original
Only delete the source after verification:
rm -rf /media/jhuang/Elements1/Data_Ute_smallRNA_7/
Important Notes
- Never use
mvfor cross-drive transfers > few GB. Always usersyncorcp -a. - Why
rsyncis safe here: It uses size + modification time to decide what to copy. If a file was interrupted, its size will differ, andrsyncwill re-transfer it. If it’s complete, it’s skipped instantly. - Filesystem warnings: If your external drive is formatted as
exFATorNTFS, you may see harmless warnings likersync: chown failed: Operation not permitted. This is normal and doesn’t affect data integrity. You can suppress them with--no-perms --no-owner --no-groupif desired. - Space check: Ensure
~/DATA/has at least650 GBfree before starting:df -h ~/DATA/
Let me know if you want a script to automate verification or if the destination path structure needs adjustment! ✨
Device Partition Appears in /dev Mounted? Mount Point
nvme0n1 p1 ✅ ✅ /mnt/nvme0n1p1
nvme1n1 p1 ✅ ✅ /mnt/nvme1n1p1
nvme2n1 p1 ✅ ✅ /mnt/nvme2n1p1
nvme3n1 p1 ✅ ❌ (not mounted)
nvme4n1 p1 ✅ ❌ (not mounted)
nvme5n1 p1 ✅ ✅ /boot/efi
nvme5n1 p2 ✅ ✅ / (root)
nvme6n1 p1 ✅ ✅ /mnt/nvme6n1p1
# 1. Check filesystem type first
sudo blkid /dev/nvme3n1p1
sudo blkid /dev/nvme4n1p1
# 2. Create mount points (if needed)
sudo mkdir -p /mnt/nvme3n1p1
sudo mkdir -p /mnt/nvme4n1p1
# 3. Mount (adjust -t if not ext4/xfs)
sudo mount -t auto /dev/nvme3n1p1 /mnt/nvme3n1p1
sudo mount -t auto /dev/nvme4n1p1 /mnt/nvme4n1p1
# 4. Verify
df -h | grep nvme3
df -h | grep nvme4