# # copy files via tar -> normally faster coz its not byteperbyte but # blockperblock. # # parameter: # # 1 upto last - 1 : files to copy # last : destination dir # # one has to be inside the source-dir tarcp () { if (( $# >= 2 )) then echo "copy ${@[1, -2]} => ${@[-1]}" # http://www.ivarch.com/programs/pv.shtml if which pv &> /dev/null then tar -cf - ${@[1, -2]} | pv -t -b -r | tar -C ${@[-1]} -xf - else tar -cvf - ${@[1, -2]} | tar -C ${@[-1]} -xvf - fi else "error, not enough parameters." return 1 fi } # vim:ft=zsh