Quick and Easy File Transfer with netrw

Shell Scripts

The two tools use the classical Linux approach – reading from standard input and writing to standard output – which makes it possible to send the output of a program directly to netwrite. You can omit the -o option or redirect the output of the data to appear on the screen of the receiving computer (Figure 5).

Figure 5: If needed, you can send the output of a program across the network.

Mini Chat

If you do not specify an input file or an output file, netwrite reads from the standard input and displays on the standard output. You can use this to build a makeshift chat tool (Figure 6).

Figure 6: Mini chat with netread and netwrite.

If you intend to use this tool over a route outside of your private network, you'll want to secure the communication using Secure Shell (SSH). You need one terminal each for transmitting and receiving. Additionally, you must use a separate port for each direction.

Conclusions

The netrw tools make it easy to transfer data between two computers. They do not rely on any intermediate infrastructure and work practically on demand. And, if you encrypt the payload, you will always be on the safe side when transmitting data.

The Author

Harald Zisler has worked with FreeBSD and Linux since the early 1990s. He writes books and articles for magazines on technology and computer topics. His latest book is the second edition of Computer Networks, published by Galileo Press (German only).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • System Monitoring

    Off-the-rack monitoring tools often offer too many functions or fail to offer precisely what you need, but shell scripts let you create individual monitoring routines.

  • Zenity Dialogs

    The Zenity command-line utility lets you create simple dialog boxes with your own data or with the output of utilities and applications.

  • TGXf Project Warns of File Transfer through Screen Pixels

    Weird data transfer technique avoids all standard security measures.

  • ExifTool and jExifToolGUI

    ExifTool lets you modify and analyze metadata in multimedia files from the command line, but its comprehensive feature set results in a lengthy learning curve. Luckily, jExiftoolGUI offers an intuitive interface that makes using ExifTool easier, even for less experienced users.

  • Zenity and KDialog

    Zenity and KDialog let you integrate your scripts with the native KDE or Gnome environment.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News