While working on the command line in Linux, there may be situations where-in you may want to quickly and safely transfer a file from your system to some other system, irrespective of where the destination is.
If you're stuck in this kind of situation, and are looking for a command line tool that offers all these features, you'll be glad to know that such a solution exists, and we'll be briefly explaining it here.
Hi, I need to receive a file from Unix server in Binary format via connect direct into a Mainframe VB file. After the file transfer onto Mainframe the records are coming onto the same line.i.e say Record1 and Record 2 in Unix is coming onto Mainframe as a single record until it reaches the record length.Once the length exceeds it spills over to the next record. Unix Shell file transfer. How to transfer a file from source server to destination server. Connect Direct: File sending from Mainframe to Unix. If you transfer it as a VB file you should also leave it as an EBCDIC file.
Magic Wormhole
![Ndm data transfer Ndm data transfer](/uploads/1/2/5/8/125852403/593381375.jpg)
Magic Wormhole - yes, that's the name of the tool. The way it works is: you send a file using the tool, and while the transfer is in progress, the tool gives you a code that you share with the other party. Using the code, the person at destination easily receives the file.
Here's how the official documentation explains the tool's working:
'This package provides a library and a command-line tool named wormhole, which makes it possible to get arbitrary-sized files and directories (or short pieces of text) from one computer to another. The two endpoints are identified by using identical 'wormhole codes': in general, the sending machine generates and displays the code, which must then be typed into the receiving machine.'
'The codes are short and human-pronounceable, using a phonetically-distinct wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.'
Installation and usage
On Ubuntu 16.04, the tool was successfully installed using the following command:
Detailed installation instructions for other Ubuntu versions (as well as other Linux distros) are mentioned here.
Once the installation process is successful, following is the generic syntax of the command the sender needs to execute:
And following is the command the receiver needs to run:
The following screenshot shows the command in action at both sender and receiver ends:
For more information on the tool, head to its GitHub page.
How to safely transfer files from one Linux system to another through command line