Monitor progress of coreutils commad like mv, cp etc

Monitor progress of coreutils commad like mv, cp etc

You can use command called “progress”. Other option is “pv” but that is little complicated so here is simpler option.

Progress – A Tiny Tool to Monitor Progress for (cp, mv, dd, tar, etc.) Commands in Linux

To install, you can do the following:

dnf install progress

function for copy files with progress bar (using pv – pipe viewer)

function for copy files with progress bar (using pv – pipe viewer)

1
 cp_p() { if [ `echo "$2" | grep ".*/$"` ]; then pv "$1" > "$2""$1"; else pv "$1" > "$2"/"$1"; fi; }

dont have to type new file name (it copy file under same name) and dont have to use ‘/’ in the end of destination folder (but you can if u want, its idiot proof)

* View this command to comment, vote or add to favourites * View all commands by chmurli

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/f3Uy8ZDqE8Q/function-for-copy-files-with-progress-bar-using-pv-pipe-viewer

Enhanced by Zemanta