How to netcat all the files in my directory?
I have a directory of files I'd like to netcat to another machine.
For one, I use
nc <ip> <port> < sample.fls
But if I have a directory of
sample1.fls
sample2.fls
sample3.fls
sample4.fls
sample5.fls
sample6.fls
How can I netcat all these files with one command?
On receiver, go to destination directory and execute:
nc -l $tcp_port |tar xf -
then on sender:
cd sourcedirectory
tar cf - . | nc $destination_host $tcp_port