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

12 lines
292 B
Text
Raw Normal View History

2017-01-15 09:29:01 +00:00
#!/usr/bin/env bash
if [ "$#" -ne 2 ]; then
echo Send an entire directory over the network.
2017-01-15 09:33:21 +00:00
echo Shows progress via pv - note that progress is measured before compress is added.
2017-01-15 09:29:01 +00:00
echo Usage:
echo " senddir directoryname listen_port_number"
exit
fi
2017-01-15 09:33:21 +00:00
tar cf - $1 | pv | gzip | nc -l $2