Copy a large folder over a raw tcp connection. The transfer is very quick (no protocol overhead) and you don’t need to mess up with NFS or SMB or FTP or so, simply make the file available on the server, and get it from the client. Here 192.168.1.1 is the server IP address.
|
1 |
server# tar -cf - -C VIDEO_TS . | nc -l -p 4444 # Serve tar folder on port 4444 |
|
1 |
client# nc 192.168.1.1 4444 | tar xpf - -C VIDEO_TS # Pull the file on port 4444 |
|
1 |
server# cat largefile | nc -l 5678 # Server a single file |
|
1 |
client# nc 192.168.1.1 5678 > largefile # Pull the single file |
|
1 |
server# dd if=/dev/da0 | nc -l 4444 # Server partition image |
|
1 |
client# nc 192.168.1.1 4444 | dd of=/dev/da0 # Pull partition to clone |
|
1 |
client# nc 192.168.1.1 4444 | dd of=da0.img # Pull partition to file |