by oopsies49 · 10y ago · 0 comments
You would want to confirm the data received matches the data sent somehow right?
Destination: nc -l -p 1234 > foo
Source: nc destination 1234 < foo
Protip #1: You can also send directories: Destination: nc -l -p 1234 | tar xf -
Source: tar czf - directory | nc destination 1234
Protip #2: pv for progress indicators (pv on one side is enough) Destination: nc -l -p 1234 | pv > foo
Source: pv foo | nc destination 1234
Note: netcat (BSD or GNU variants) syntax varies across unixes and distros. Sometimes it's `nc -l -p 1234`, other times `nc -l 0.0.0.0 1234`. Check your man.You can check for data corruption with md5sum or similar checksumming tools.