How to Transfer Files Between Two Computers using nc and pv Commands

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

16 Responses

  1. Rizwan says:

    Thank you Ravi for useful info. However while I am trying to install nc on CentOS, I receive the following message – ‘No package netcat available’

    • Ravi Saive says:


      You should install and enable epel repository to install netcat package as shown:

      # yum install epel-release
      # yum install nc
  2. Jens Augustsson says:


    On Ubuntu I use woof which enables the client to use the browser to download the file, but since I can’t get woof to work on Fedora this is a excellent workaround. Thanks!

  3. David says:

    Any idea how to put netcat to background via nohup ? I was trying to achieve this but without sucess.

  4. Daniel PC says:

    From man pages:

    -l Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host. It is an error
    to use this option in conjunction with the -p, -s, or -z options. Additionally, any timeouts specified with the -w option are

    In fact, trying nc command with -l -p, it respond with an error.

    • Ravi Saive says:


      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..

  5. David in Munich says:


    why is this any better than scp?

    • Ravi Saive says:


      As I stated it’s not recommended over public network as the data transfer is insecure, it’s best suits for internal network only and there isn’t any good feature other than transfer speed..

      • Jj says:

        Any good feature? remote does not need to have configured ssh.. No logins no passwords.. You can stream only one file for your colleague in office very quick just tell him ip and port… In the office this approach has more advantages than sharing your whole /home with ssh :)

        • Ravi Saive says:


          Yes, no need of SSH configured on client nor any username/password its just works on TCP port, and yes it is very useful in sharing files in no time without any clients..

  6. Kamran says:

    Great tutorial. One question though, what if I don’t want to compress. I would use cat filename at sending machine. what will I put on recieving end?

Leave a Reply to Ravi Saive Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.