1
0
Fork 0
mirror of https://github.com/sbrl/bin.git synced 2018-01-10 21:33:46 +00:00

Add pv to send/recv dir

This commit is contained in:
Starbeamrainbowlabs 2017-01-15 09:33:21 +00:00
parent 9f202ba871
commit 8ec2bc51bb
2 changed files with 4 additions and 2 deletions

View file

@ -2,10 +2,11 @@
if [ "$#" -ne 2 ]; then
echo Recieve an entire directory from the network and save it to the current directory.
echo Shows recieving progress via pv. Note that the progress indicator is before compression has been removed.
echo Usage:
echo " recvdir ip_address port"
exit
fi
nc $1 $2 | tar xzf -
nc $1 $2 | pv | tar xzf -

View file

@ -2,9 +2,10 @@
if [ "$#" -ne 2 ]; then
echo Send an entire directory over the network.
echo Shows progress via pv - note that progress is measured before compress is added.
echo Usage:
echo " senddir directoryname listen_port_number"
exit
fi
tar cf - $1 | gzip | nc -l $2
tar cf - $1 | pv | gzip | nc -l $2