# Copy dirs using tar, pipes and a speeed monitor rsync is good at copying or syncing dirs but shows progress and transfer rate only per file. For longer transfers an averaged transfer rate would be helpful. `tar` can provide a pipeable datastream and a utility called [Pipe Viewer](https://www.ivarch.com/programs/pv.shtml) (`pv`) can output an averaged transfer speed. Packages for el9 are available on the homepage, other distros include it already (but maybe an older version). ```bash export PATH_TO_SOURCE=/path/to/source export PATH_TO_DEST=/path/to/dest rsync -aux --out-format='%n %i' --dry-run $PATH_TO_SOURCE $PATH_TO_DEST | grep '>f+\+' | sed 's/ >f[^\s]*//' > $PATH_TO_DEST/tarlist.txt (cd $PATH_TO_SOURCE/..; tar -cf - -T $PATH_TO_DEST/tarlist.txt) | pv -agpB 1000000 | (cd $PATH_TO_DEST; tar -xf -) ``` _Note_: Older versions of pv do not have the `-g` = gauge switch. Use `pv -aB 1000000` for just the average transfer speed. _Note 2_: This produces `/path/to/dest/source` which is necessary to check again with rsync. Run both commands again later to reduce the tar list and skip files copied already.