Stop watching tar archives grow in silence
Backup & Recovery (Rsync/Tar/Dd)
Stop watching tar archives grow in silence
🧩 The Challenge
Everyone loves the classic tar -cvf but staring at a blinking cursor while backing up a half-terabyte database dump is soul-crushing. I have spent way too many minutes wondering if the job actually hung or if it is just working through a massive directory.
💡 The Fix
Throw the -v flag out the window and use a progress utility that actually reports how much data you have moved. You will get a real-time status bar instead of guessing if you are stuck.
tar -cf - /data/backup | pv -s $(du -sb /data/backup | cut -f1) > /mnt/storage/backup.tar
⚙️ Why It Works
Pipe viewer watches the data stream and calculates the percentage based on the initial size you fed it. It effectively turns a silent, mysterious process into a predictable progress bar.
🚀 Pro-Tip: Use pv -pet if you want the ETA and the transfer rate in your output too.
Linux Tips & Tricks | © ngelinux.com | 9/25/2026
