netcat to transfer files between linux and windows


netcat in windows On Source PC(Windows) download and copy nc.exe  netcat works as a Server and Client model.
Below steps show how to copy data from a Windows system into Linux(Ubuntu) system.Currently I am using Ubuntu Server.Varify
Windows System IP :192.168.xxx.xx  and   Linxu(Ubuntu) system IP: 192.168.yyy.yy
                             Copy files from Windows To Linux
Setp1:Download netcat into Windows System and copy nc.exe into the directory where your file is exist.
Ex: C:\test\nc.exe
Step 2:Install netcat on ubuntu
#apt-get install netcat
Step 3: Now netcat is available on both Windows and Linxu(Ubuntu)
Open command prompt and go to the directory where your file is located and run below command.This will act as a Server.
C:\test> type  backup.iso | nc.exe  -l -p 3333  
Note: "type" is a command in windows.
Step 4: Receive backup.iso on the client machineLinux(Ubuntu) with the following.This will act as a Client
 # nc 192.168.xxx.xx 3333 > backup.iso              
Issue a ^C on the source system and your done one u see file size in destination directory. Be sure to check the file to be sure it is the same size as the original.
                               Copy files from Linxu to Windows 
On Linxu system run below command. Now this will act as a Server
#cat backup.iso | nc -l -p 3333            
On Windows Run below command. Now this will act as a Client.
C:\test> nc.exe 192.168.yyy.yy 3333 > backup.iso
Issue a ^C on the source system and your done one u see file size in destination directory. Be sure to check the file to be sure it is the same size as the original.



4 comments:

  1. works like a charm. Thank you very much

    ReplyDelete
  2. I’ve read some good stuff here. Definitely worth bookmarking for revisiting. I surprise how much effort you put to create such a great informative website. transfer large file

    ReplyDelete
  3. thanks bud, works perfect

    ReplyDelete