Possa Possa 1, 7 7 gold badges 18 18 silver badges 21 21 bronze badges. Do you mean you want to open a separate connection per line? Maybe the server has a different newline convention than Unix? If so, you need to convert the newlines to the codes the server expects. I want netcat to send the file divided by line, not in a unique file. But probably is the EoL, as Barmar said. TCP is a byte stream transport, it doesn't provide a way for the application to see the chunks that were transmitted.
It can merge and split lines arbitrarily. Show 1 more comment. Active Oldest Votes. I'de like to send, and receive, one by one the lines, not all the file in a single shot. I did a little script that do the while loop, so I can pass filename and host as parameters. From the man bash , these type of files are either actually handled by the os, or bash emulates them. Add a comment. This is supposed to be a real email Have a good day! Bruno Bronosky Bruno Bronosky I just got a downvote with no comment.
Am I spreading misinformation? Surely not. Leave some feedback if you feel strongly enough to bury an answer. The pv command allows a user to see the progress of data through a pipeline. We save the hard drive image to a file. Introduction Netcat is a helpful tool when you are in a hurry to transfer files between machines. Using Netcat You will have one netcat that will send data and the other one for receiving. Sending side nc You can also subscribe without commenting.
This site uses Akismet to reduce spam. Learn how your comment data is processed. If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts?
Related Posts. Rizwan, You should install and enable epel repository to install netcat package as shown: yum install epel-release yum install nc Reply. Excellent, thanks for the link, I think the screen is way to go in this case. David, Yes, screen is best tool for such case, I always use screen to do my remote jobs… Reply.
From man pages: -l Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host. In fact, trying nc command with -l -p, it respond with an error. Daniel, I always use -l switch with nc command to initiate a connection to remote host but I never received any error, could you please share the error that you received so that I can have better solution to this..
Ravi why is this any better than scp?
0コメント