rw

Sortix rw is a program that reads blocks from the standard input and copies them to the standard output until the end of the standard input. rw(1) is designed to be a replacement for dd(1), providing only the the core blockwise I/O. It has a standard command line interface with dashed options, useful and efficient defaults, and is simpler because it doesn't support converting the input (e.g. converting ASCII to/from EBCDIC).

rw is developed as part of the Sortix operating system and comes with Sortix. rw compiles and works on at least DragonFly, Haiku, Hurd, Illumos, Linux, macOS, Midipix, Minix, NetBSD, OpenBSD, Sortix, and Windows Subsystem for Linux.

The latest version of rw is 1.0, released April 2018. The version number increments by 0.1 on every release. rw is licensed under the ISC license.

Documentation

The latest rw documentation can be found in the rw(1) Sortix manual.

Download

rw has been packaged for the following operating systems:

Source Code

The latest rw-portable source code release is rw-portable-1.0.tar.gz.

Always verify you are viewing this page over HTTPS and that rw-portable-1.0.tar.gz has the correct cryptographic SHA256 hash by running:

sha256sum -c << EOF 50009730e36991dfe579716f91f4f616f5ba05ffb7bf69c03d41bf305ed93b6d rw-portable-1.0.tar.gz EOF

Older releases can be found in the release directory. Checksums for each each release can be found in the SHA256SUM file.

Instructions on how to compile rw using make can be found in the included README file.

rw-portable is developed in the rw-portable gitlab repository. The latest tag is rw-portable-1.0.

The latest upstream rw source code can be found in rw/rw.c in the Sortix source code.

Differences from dd

rw is similar to dd(1), but has a distinct design and improvements:

The command line options use the conventional option format.

The output file is not truncated by default. One has to use -t .

. The input and output block sizes default to the preferred I/O block sizes instead of 512 bytes.

The -c , -I , and -O options accept byte quantities by default instead of block counts, but can be specified in block counts by using the ‘r, w’, and ‘x’ suffixes.

, , and options accept byte quantities by default instead of block counts, but can be specified in block counts by using the ‘r, w’, and ‘x’ suffixes. Statistics are not written by default. One has to use -v or -p . The statistics contain more useful information and is machine readable as it contains no localized information. A human readable statistics format is available using -h . Statistics can occasionally be written out using -p .

or . The statistics contain more useful information and is machine readable as it contains no localized information. A human readable statistics format is available using . Statistics can occasionally be written out using . There is no support for converting ASCII to EBCDIC, converting ASCII to a different EBCDIC, EBCDIC to ASCII, swapping pairs of bytes, converting the bytes to lower-case or upper-case, converting line-delimited data into fixed-size blocks, or converting fixed-sized blocks into line-delimited data.

Offsets can be specified relative to the end of the input/output.

Input errors stop the copying immediately rather than writing out a partial output block.

Known Bugs

rw is not yet able to determine the size of block devices on Illumos, Minix, NetBSD, and OpenBSD.

rw does not handle tape archives specially, as dd does on some operating systems.

rw does not support copying sparse files, a feature found on some operating systems.