Did you ever suddenly notice that something simple you've been doing for years could be vastly improved with just a little bit of tweaking? I did yesterday concerning the transfer of files with netcat (e.g. when nobody got sendfile installed and standard paranoia forbids simply using scp instead) and figured I should share my sudden “enlightenment”
ncsend
#!/bin/sh host=$1 shift tar cv "$@" | pv -brt | nc -q0 $host 23000
ncrecv
#!/bin/sh netcat -l -p 23000 | pv -brt | tar xv
Note: piping to pv is optional
Edit: fixed a word splitting bug and specified a default port