• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D10-Apr-20183

LICENSEH A D10-Apr-2018769 1411

MakefileH A D15-Apr-2018403 2417

READMEH A D15-Apr-20183 KiB8360

VERSIONH A D15-Apr-20184 21

rw.1H A D15-Apr-201813.2 KiB477476

rw.cH A D15-Apr-201827 KiB886749

README

1rw-portable
2===========
3
4Sortix rw is a program that reads blocks from the standard input and copies them
5to the standard output until the end of the standard input. rw(1) is designed
6to be a replacement for dd(1), providing only the the core blockwise I/O. It has
7a standard command line interface with dashed options, useful and efficient
8defaults, and is simpler because it doesn't support converting the input (e.g.
9converting ASCII to/from EBCDIC).
10
11This is the portable source code release of rw, which is developed as part of
12the Sortix operating system. rw compiles and works on at least DragonFly, Haiku,
13Hurd, Illumos, Linux, macOS, Midipix, Minix, NetBSD, OpenBSD, Sortix, and
14Windows Subsystem for Linux.
15
16rw is written in C99 using POSIX 2008 APIs, but also relies on features
17that have been approved or suggested to the next POSIX revision, as well as
18features that are available on the latest version of all modern POSIX systems.
19
20Documentation
21-------------
22
23rw is documented in the rw.1 manual page in the mdoc(7) format.
24
25Links
26-----
27
28For more information, please visit the official website:
29
30  https://sortix.org/rw/
31
32Building
33--------
34
35rw-portable comes with a simple portable makefile that can build and install rw.
36For instance:
37
38    make
39    make install # as root
40
41Will install rw into the `/usr/local` prefix by default. The default prefix can
42be overriden by setting the `PREFIX` environment variable, as can all the other
43directory variables (see the Makefile). The compilation can be controlled with
44the `CC`, `CFLAGS`, and `LDFLAGS` variables per the default Make C compilation
45rule. The `CPPFLAGS` variable for C preprocessor options is also available on
46some systems, generally those with GNU make, otherwise `CFLAGS` can be used.
47
48The makefile should work on all the supported systems, but note the following
49caveats:
50
51* 32-bit Hurd, Illumos, and Linux systems may have a 32-bit off_t by default.
52  To support large files on such systems, add `-D_FILE_OFFSET_BITS=64` to the
53  `CPPFLAGS` environment variable during the build.
54* Linux systems with an older glibc may have `clock_gettime` in `librt`, which
55  is not linked in by default. To link rw on such systems, add `-lrt` to the
56  `LDFLAGS` environment variable during the build.
57* Illumos make does not support the `?=` and `+=` syntaxes that have been
58  approved for the next POSIX release and are already available everywhere else.
59  rw-portable can instead be built with GNU make.
60
61Known Bugs
62----------
63
64rw is not yet able to determine the size of block devices on Illumos, Minix,
65NetBSD, and OpenBSD.
66
67rw does not handle tape archives specially, as dd does on some operating
68systems.
69
70rw does not support copying sparse files, a feature found on some operating
71systems.
72
73rw does not work around buggy operating systems that may report the preferred IO
74block size `st_blksize` as 0 for some files.
75
76License
77-------
78
79Copyright (c) 2016, 2017, 2018 Jonas 'Sortie' Termansen and contributors.
80
81Sortix rw is free software licensed under the ISC license as described in the
82LICENSE file.
83