I want to transfer a character device file created using cygwin (running on windows xp) to a Linux machine. I am unable to get this to work.
In cygwin using the mknod command I get a file called test with permissions like the following:
crw-r–r–
C denotes “Character File”.
On Linux (Red Hat 5) the file is not recognized. Instead the file name is test.lnk and the permissions are as followed:
-r-xr-xr-x
So my question – is this possible?
More Details:
I thought it might be worth while adding what I was tasked to do. My task: untar a Linux OS tarball using a windows machine and upload it to a Linux server using NFS. The tarball has “character device” files that are not transferring correctly.
Question Answer:
After a week I was able to answer my own question after hours of reading.
Cygwin or any other UNIX (Windows Interix) POSIX environment cannot mingle special file types. You cannot create special files like character files or pipe files using those tools and transfer them over to Linux.
So all my scripts don’t work.
Task Answer:
I was tasked to write a script that would transfer a linux OS tarball from windows to a linux machine using NFS.
I got this to work using a virtual machine. I installed a virtual Linux OS on top of Windows XP and used the linux VM to mount a NFS client to a linux NFS server.
How To:-
1.) Install a Virtual Machine. I recommend Virtual Box!
2.) Install Red Hat Linux. I used RHEL 5.7.
3.) Install the Virtual Box Guest Additions. This allows you to “easily” share files/folders from windows to linux.
How to Setup Guest Additions
How to Setup Shared Folders
4.) Set the network type for the guest OS(Linux VM) to “Bridge” or “Host Only Networking”. This will allow you to SSH using Putty from Windows Host OS to Linux Guest/Virtual OS.
Virtual Box Networking
5.) Now you can write a script to transfer the tarball (with special character files) from windows to the virtual linux then from the virtual linux to the Linux NFS server.