Eric Andersen | cff3fe3 | 2000-09-20 19:22:26 +0000 | [diff] [blame] | 1 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ ]> |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 2 | <book id="BusyBoxDocumentation"> |
| 3 | <bookinfo> |
| 4 | <title>BusyBox - The Swiss Army Knife of Embedded Linux</title> |
| 5 | |
| 6 | <legalnotice> |
| 7 | <para> |
| 8 | This documentation is free software; you can redistribute |
| 9 | it and/or modify it under the terms of the GNU General Public |
| 10 | License as published by the Free Software Foundation; either |
| 11 | version 2 of the License, or (at your option) any later |
| 12 | version. |
| 13 | </para> |
| 14 | |
| 15 | <para> |
| 16 | This program is distributed in the hope that it will be |
| 17 | useful, but WITHOUT ANY WARRANTY; without even the implied |
| 18 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 19 | See the GNU General Public License for more details. |
| 20 | </para> |
| 21 | |
| 22 | <para> |
| 23 | You should have received a copy of the GNU General Public |
| 24 | License along with this program; if not, write to the Free |
| 25 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 26 | MA 02111-1307 USA |
| 27 | </para> |
| 28 | |
| 29 | <para> |
| 30 | For more details see the file COPYING in the source |
| 31 | distribution of Linux. |
| 32 | </para> |
| 33 | </legalnotice> |
| 34 | </bookinfo> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 35 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 36 | <toc></toc> |
| 37 | <chapter id="Introduction"> |
| 38 | <title>Introduction</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 39 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 40 | <para> |
| 41 | BusyBox combines tiny versions of many common UNIX utilities into a single |
| 42 | small executable. It provides minimalist replacements for most of the |
| 43 | utilities you usually find in fileutils, shellutils, findutils, textutils, |
| 44 | grep, gzip, tar, etc. BusyBox provides a fairly complete POSIX environment |
| 45 | for any small or embedded system. The utilities in BusyBox generally have |
| 46 | fewer options than their full-featured GNU cousins; however, the options |
| 47 | that are included provide the expected functionality and behave very much |
| 48 | like their GNU counterparts. |
| 49 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 50 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 51 | <para> |
| 52 | BusyBox has been written with size-optimization and limited resources in |
| 53 | mind. It is also extremely modular so you can easily include or exclude |
| 54 | commands (or features) at compile time. This makes it easy to customize |
| 55 | your embedded systems. To create a working system, just add a kernel, a |
| 56 | shell (such as ash), and an editor (such as elvis-tiny or ae). |
| 57 | </para> |
| 58 | </chapter> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 59 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 60 | <chapter id="Syntax"> |
| 61 | <title>How to use BusyBox</title> |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 62 | <sect1 id="How-to-use-BusyBox"> |
| 63 | <title>Syntax</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 64 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 65 | <para> |
| 66 | <screen> |
| 67 | BusyBox <function> [arguments...] # or |
| 68 | </screen> |
| 69 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 70 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 71 | <para> |
| 72 | <screen> |
| 73 | <function> [arguments...] # if symlinked |
| 74 | </screen> |
| 75 | </para> |
| 76 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 77 | |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 78 | <sect1 id="Invoking-BusyBox"> |
| 79 | <title>Invoking BusyBox</title> |
| 80 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 81 | <para> |
| 82 | When you create a link to BusyBox for the function you wish to use, when |
| 83 | BusyBox is called using that link it will behave as if the command itself |
| 84 | has been invoked. |
| 85 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 86 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 87 | <para> |
| 88 | For example, entering |
| 89 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 90 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 91 | <para> |
| 92 | <screen> |
| 93 | ln -s ./BusyBox ls |
| 94 | ./ls |
| 95 | </screen> |
| 96 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 97 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 98 | <para> |
| 99 | will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled |
| 100 | into BusyBox). |
| 101 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 102 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 103 | <para> |
| 104 | You can also invoke BusyBox by issuing the command as an argument on the |
| 105 | command line. For example, entering |
| 106 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 107 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 108 | <para> |
| 109 | <screen> |
| 110 | ./BusyBox ls |
| 111 | </screen> |
| 112 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 113 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 114 | <para> |
| 115 | will also cause BusyBox to behave as 'ls'. |
| 116 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 117 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 118 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 119 | |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 120 | <sect1 id="Common-options"> |
| 121 | <title>Common options</title> |
| 122 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 123 | <para> |
| 124 | Most BusyBox commands support the <emphasis>--help</emphasis> option to provide |
| 125 | a terse runtime description of their behavior. |
| 126 | </para> |
| 127 | </sect1> |
| 128 | </chapter> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 129 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 130 | <chapter id="Commands"> |
| 131 | <title>BusyBox Commands</title> |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 132 | <sect1 id="Available-BusyBox-Commands"> |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 133 | <title>Available BusyBox Commands</title> |
| 134 | <para> |
| 135 | Currently defined functions include: |
| 136 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 137 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 138 | <para> |
Eric Andersen | cad4c5b | 2003-07-28 10:13:03 +0000 | [diff] [blame] | 139 | addgroup, adduser, adjtimex, ar, arping, ash, awk, basename, |
| 140 | bunzip2, busybox, bzcat, cal, cat, chgrp, chmod, chown, chroot, |
| 141 | chvt, clear, cmp, cp, cpio, crond, crontab, cut, date, dc, dd, |
| 142 | deallocvt, delgroup, deluser, df, dirname, dmesg, dos2unix, dpkg, |
| 143 | dpkg-deb, du, dumpkmap, dumpleases, dutmp, echo, egrep, env, expr, |
| 144 | false, fbset, fdflush, fdformat, fgrep, find, fold, free, freeramdisk, |
| 145 | fsck.minix, ftpget, ftpput, getopt, getty, grep, gunzip, gzip, |
| 146 | halt, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, |
| 147 | id, ifconfig, ifdown, ifup, inetd, init, insmod, ip, ipcalc, iplink, |
| 148 | iproute, iptunnel, kill, killall, klogd, lash, length, linuxrc, |
| 149 | ln, loadacm, loadfont, loadkmap, logger, login, logname, logread, |
| 150 | losetup, ls, lsmod, makedevs, md5sum, mesg, minit, mkdir, mkfifo, |
| 151 | mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, msh, |
| 152 | msvc, mt, mv, nameif, nc, netstat, nslookup, od, openvt, passwd, |
| 153 | patch, pidfilehack, pidof, ping, ping6, pivot_root, poweroff, |
| 154 | printf, ps, pwd, rdate, readlink, realpath, reboot, renice, reset, |
| 155 | rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, sed, setkeycodes, |
| 156 | sha1sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin, |
| 157 | swapoff, swapon, sync, syslogd, tail, tar, tee, telnet, telnetd, |
| 158 | test, tftp, time, top, touch, tr, traceroute, true, tty, udhcpc, |
| 159 | udhcpd, umount, uname, uncompress, uniq, unix2dos, unzip, |
| 160 | uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, |
| 161 | watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, [ |
| 162 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 163 | </para> |
| 164 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 165 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 166 | <sect1 id="ar"> |
| 167 | <title>ar</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 168 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 169 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 170 | Usage: ar [OPTION] archive [FILENAME]... |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 171 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 172 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 173 | <para> |
| 174 | Extract or list files from an ar archive. |
| 175 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 176 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 177 | <para> |
| 178 | Options: |
| 179 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 180 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 181 | <para> |
| 182 | <screen> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 183 | o Preserve original dates |
| 184 | p Extract to stdout |
| 185 | t List |
| 186 | x Extract |
| 187 | v Verbosely list files processed |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 188 | </screen> |
| 189 | </para> |
| 190 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 191 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 192 | <sect1 id="basename"> |
| 193 | <title>basename</title> |
| 194 | <para> |
| 195 | Usage: basename FILE [SUFFIX] |
| 196 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 197 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 198 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 199 | Strip directory path and suffixes from FILE. If specified, also removes |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 200 | any trailing SUFFIX. |
| 201 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 202 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 203 | <para> |
| 204 | Example: |
| 205 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 206 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 207 | <para> |
| 208 | <screen> |
| 209 | $ basename /usr/local/bin/foo |
| 210 | foo |
| 211 | $ basename /usr/local/bin/ |
| 212 | bin |
| 213 | $ basename /foo/bar.txt .txt |
| 214 | bar |
| 215 | </screen> |
| 216 | </para> |
| 217 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 218 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 219 | <sect1 id="cat"> |
| 220 | <title>cat</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 221 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 222 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 223 | Usage: cat [FILE]... |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 224 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 225 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 226 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 227 | Concatenate <literal>FILE(s)</literal> and prints them to the standard |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 228 | output. |
| 229 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 230 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 231 | <para> |
| 232 | Example: |
| 233 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 234 | |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 235 | <para> |
| 236 | <screen> |
| 237 | $ cat /proc/uptime |
| 238 | 110716.72 17.67 |
| 239 | </screen> |
| 240 | </para> |
Eric Andersen | 5331025 | 2000-07-04 19:42:23 +0000 | [diff] [blame] | 241 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 242 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 243 | <sect1 id="chgrp"> |
| 244 | <title>chgrp</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 245 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 246 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 247 | Usage: chgrp [OPTION]... GROUP FILE... |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 248 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 249 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 250 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 251 | Change the group membership of each FILE to GROUP. |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 252 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 253 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 254 | <para> |
| 255 | Options: |
| 256 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 257 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 258 | <para> |
| 259 | <screen> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 260 | -R Change files and directories recursively |
| 261 | </screen> |
| 262 | </para> |
| 263 | |
| 264 | <para> |
| 265 | Example: |
| 266 | </para> |
| 267 | |
| 268 | <para> |
| 269 | <screen> |
| 270 | $ ls -l /tmp/foo |
| 271 | -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo |
| 272 | $ chgrp root /tmp/foo |
| 273 | $ ls -l /tmp/foo |
| 274 | -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo |
| 275 | </screen> |
| 276 | </para> |
| 277 | </sect1> |
| 278 | |
| 279 | <sect1 id="chmod"> |
| 280 | <title>chmod</title> |
| 281 | |
| 282 | <para> |
| 283 | Usage: chmod [<emphasis>-R</emphasis>] MODE[,MODE]... FILE... |
| 284 | </para> |
| 285 | |
| 286 | <para> |
| 287 | Change file access permissions for the specified |
| 288 | <literal>FILE(s)</literal> (or directories). Each MODE is defined by |
| 289 | combining the letters for WHO has access to the file, an OPERATOR for |
| 290 | selecting how the permissions should be changed, and a PERMISSION for |
| 291 | <literal>FILE(s)</literal> (or directories). |
| 292 | </para> |
| 293 | |
| 294 | <para> |
| 295 | WHO may be chosen from |
| 296 | </para> |
| 297 | |
| 298 | <para> |
| 299 | <screen> |
| 300 | u User who owns the file |
| 301 | g Users in the file's Group |
| 302 | o Other users not in the file's group |
| 303 | a All users |
| 304 | </screen> |
| 305 | </para> |
| 306 | |
| 307 | <para> |
| 308 | OPERATOR may be chosen from |
| 309 | </para> |
| 310 | |
| 311 | <para> |
| 312 | <screen> |
| 313 | + Add a permission |
| 314 | - Remove a permission |
| 315 | = Assign a permission |
| 316 | </screen> |
| 317 | </para> |
| 318 | |
| 319 | <para> |
| 320 | PERMISSION may be chosen from |
| 321 | </para> |
| 322 | |
| 323 | <para> |
| 324 | <screen> |
| 325 | r Read |
| 326 | w Write |
| 327 | x Execute (or access for directories) |
| 328 | s Set user (or group) ID bit |
| 329 | t Sticky bit (for directories prevents removing files by non-owners) |
| 330 | </screen> |
| 331 | </para> |
| 332 | |
| 333 | <para> |
| 334 | Alternately, permissions can be set numerically where the first three |
| 335 | numbers are calculated by adding the octal values, such as |
| 336 | </para> |
| 337 | |
| 338 | <para> |
| 339 | <screen> |
| 340 | 4 Read |
| 341 | 2 Write |
| 342 | 1 Execute |
| 343 | </screen> |
| 344 | </para> |
| 345 | |
| 346 | <para> |
| 347 | An optional fourth digit can also be used to specify |
| 348 | </para> |
| 349 | |
| 350 | <para> |
| 351 | <screen> |
| 352 | 4 Set user ID |
| 353 | 2 Set group ID |
| 354 | 1 Sticky bit |
| 355 | </screen> |
| 356 | </para> |
| 357 | |
| 358 | <para> |
| 359 | Options: |
| 360 | </para> |
| 361 | |
| 362 | <para> |
| 363 | <screen> |
| 364 | -R Change files and directories recursively. |
| 365 | </screen> |
| 366 | </para> |
| 367 | |
| 368 | <para> |
| 369 | Example: |
| 370 | </para> |
| 371 | |
| 372 | <para> |
| 373 | <screen> |
| 374 | $ ls -l /tmp/foo |
| 375 | -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo |
| 376 | $ chmod u+x /tmp/foo |
| 377 | $ ls -l /tmp/foo |
| 378 | -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo* |
| 379 | $ chmod 444 /tmp/foo |
| 380 | $ ls -l /tmp/foo |
| 381 | -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo |
| 382 | </screen> |
| 383 | </para> |
| 384 | </sect1> |
| 385 | |
| 386 | <sect1 id="chown"> |
| 387 | <title>chown</title> |
| 388 | <para> |
| 389 | Usage: chown [OPTION]... OWNER[<.|:>[GROUP] FILE... |
| 390 | </para> |
| 391 | |
| 392 | <para> |
| 393 | Change the owner and/or group of each FILE to OWNER and/or GROUP. |
| 394 | </para> |
| 395 | |
| 396 | <para> |
| 397 | Options: |
| 398 | </para> |
| 399 | |
| 400 | <para> |
| 401 | <screen> |
| 402 | -R Change files and directories recursively |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 403 | </screen> |
| 404 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 405 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 406 | <para> |
| 407 | Example: |
| 408 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 409 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 410 | <para> |
| 411 | <screen> |
| 412 | $ ls -l /tmp/foo |
| 413 | -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo |
| 414 | $ chown root /tmp/foo |
| 415 | $ ls -l /tmp/foo |
| 416 | -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo |
| 417 | $ chown root.root /tmp/foo |
| 418 | ls -l /tmp/foo |
| 419 | -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo |
| 420 | </screen> |
| 421 | </para> |
| 422 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 423 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 424 | <sect1 id="chroot"> |
| 425 | <title>chroot</title> |
| 426 | <para> |
| 427 | Usage: chroot NEWROOT [COMMAND...] |
| 428 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 429 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 430 | <para> |
| 431 | Run COMMAND with root directory set to NEWROOT. |
| 432 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 433 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 434 | <para> |
| 435 | Example: |
| 436 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 437 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 438 | <para> |
| 439 | <screen> |
| 440 | $ ls -l /bin/ls |
| 441 | lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox |
| 442 | $ mount /dev/hdc1 /mnt -t minix |
| 443 | $ chroot /mnt |
| 444 | $ ls -l /bin/ls |
| 445 | -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls* |
| 446 | </screen> |
| 447 | </para> |
| 448 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 449 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 450 | <sect1 id="chvt"> |
| 451 | <title>chvt</title> |
| 452 | <para> |
| 453 | Usage: chvt N |
| 454 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 455 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 456 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 457 | Change the foreground virtual terminal to /dev/ttyN |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 458 | </para> |
| 459 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 460 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 461 | <sect1 id="clear"> |
| 462 | <title>clear</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 463 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 464 | <para> |
| 465 | Usage: clear |
| 466 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 467 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 468 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 469 | Clear the screen. |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 470 | </para> |
| 471 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 472 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 473 | <sect1 id="cp"> |
| 474 | <title>cp</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 475 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 476 | <para> |
| 477 | Usage: cp [OPTION]... SOURCE DEST |
| 478 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 479 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 480 | <para> |
| 481 | <screen> |
| 482 | or: cp [OPTION]... SOURCE... DIRECTORY |
| 483 | </screen> |
| 484 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 485 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 486 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 487 | Copy SOURCE to DEST, or multiple <literal>SOURCE(s)</literal> to |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 488 | DIRECTORY. |
| 489 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 490 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 491 | <para> |
| 492 | Options: |
| 493 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 494 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 495 | <para> |
| 496 | <screen> |
| 497 | -a Same as -dpR |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 498 | -d Preserve links |
| 499 | -p Preserve file attributes if possible |
| 500 | -R Copy directories recursively |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 501 | </screen> |
| 502 | </para> |
| 503 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 504 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 505 | <sect1 id="cut"> |
| 506 | <title>cut</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 507 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 508 | <para> |
| 509 | Usage: cut [OPTION]... [FILE]... |
| 510 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 511 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 512 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 513 | Print selected fields from each input FILE to standard output. |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 514 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 515 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 516 | <para> |
| 517 | Options: |
| 518 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 519 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 520 | <para> |
| 521 | <screen> |
| 522 | -b LIST Output only bytes from LIST |
| 523 | -c LIST Output only characters from LIST |
| 524 | -d CHAR Use CHAR instead of tab as the field delimiter |
Pavel Roskin | 0010ee4 | 2000-07-21 15:10:57 +0000 | [diff] [blame] | 525 | -s Output only the lines containing delimiter |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 526 | -f N Print only these fields |
| 527 | -n Ignored |
| 528 | </screen> |
| 529 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 530 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 531 | <para> |
| 532 | Example: |
| 533 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 534 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 535 | <para> |
| 536 | <screen> |
| 537 | $ echo "Hello world" | cut -f 1 -d ' ' |
| 538 | Hello |
| 539 | $ echo "Hello world" | cut -f 2 -d ' ' |
| 540 | world |
| 541 | </screen> |
| 542 | </para> |
| 543 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 544 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 545 | <sect1 id="date"> |
| 546 | <title>date</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 547 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 548 | <para> |
| 549 | Usage: date [OPTION]... [+FORMAT] |
| 550 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 551 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 552 | <para> |
| 553 | <screen> |
| 554 | or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]] |
| 555 | </screen> |
| 556 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 557 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 558 | <para> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 559 | Display the current time in the given FORMAT, or set the system date. |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 560 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 561 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 562 | <para> |
| 563 | Options: |
| 564 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 565 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 566 | <para> |
| 567 | <screen> |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 568 | -R Output RFC-822 compliant date string |
| 569 | -s Set time described by STRING |
| 570 | -u Print or set Coordinated Universal Time |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 571 | </screen> |
| 572 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 573 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 574 | <para> |
| 575 | Example: |
| 576 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 577 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 578 | <para> |
| 579 | <screen> |
| 580 | $ date |
| 581 | Wed Apr 12 18:52:41 MDT 2000 |
| 582 | </screen> |
| 583 | </para> |
| 584 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 585 | |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 586 | <sect1 id="dc"> |
| 587 | <title>dc</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 588 | |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 589 | <para> |
| 590 | Usage: dc [EXPRESSION] |
| 591 | </para> |
| 592 | |
| 593 | <para> |
| 594 | This is a Tiny RPN calculator that understands the |
| 595 | following operations: +, -, /, *, and, or, not, eor. If |
| 596 | no arguments are given, dc will process input from |
| 597 | stdin. |
| 598 | </para> |
| 599 | |
| 600 | <para> |
| 601 | The behaviour of BusyBox/dc deviates (just a little ;-) |
| 602 | from GNU/dc, but this will be remedied in the future. |
| 603 | </para> |
| 604 | |
| 605 | <para> |
| 606 | Example: |
| 607 | </para> |
| 608 | |
| 609 | <para> |
| 610 | <screen> |
| 611 | $ dc 2 2 + |
| 612 | 4 |
| 613 | $ dc 8 8 \* 2 2 + / |
| 614 | 16 |
| 615 | $ dc 0 1 and |
| 616 | 0 |
| 617 | $ dc 0 1 or |
| 618 | 1 |
| 619 | $ echo 72 9 div 8 mul | dc |
| 620 | 64 |
| 621 | </screen> |
| 622 | </para> |
| 623 | </sect1> |
| 624 | |
| 625 | <sect1 id="dd"> |
| 626 | <title>dd</title> |
| 627 | |
| 628 | <para> |
| 629 | Usage: dd [OPTION]... |
| 630 | </para> |
| 631 | |
| 632 | <para> |
| 633 | Copy a file, converting and formatting according to |
| 634 | options. |
| 635 | </para> |
| 636 | |
| 637 | <para> |
| 638 | Options: |
| 639 | </para> |
| 640 | |
| 641 | <para> |
| 642 | <screen> |
| 643 | if=FILE Read from FILE instead of stdin |
| 644 | of=FILE Write to FILE instead of stdout |
| 645 | bs=N Read and write N bytes at a time |
| 646 | count=N Copy only N input blocks |
| 647 | skip=N Skip N input blocks |
| 648 | seek=N Skip N output blocks |
| 649 | </screen> |
| 650 | </para> |
| 651 | |
| 652 | <para> |
| 653 | Numbers may be suffixed by w (x2), k (x1024), b (x512), |
| 654 | or M (x1024^2). |
| 655 | </para> |
| 656 | |
| 657 | <para> |
| 658 | Example: |
| 659 | </para> |
| 660 | |
| 661 | <para> |
| 662 | <screen> |
| 663 | $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4 |
| 664 | 4+0 records in |
| 665 | 4+0 records out |
| 666 | </screen> |
| 667 | </para> |
| 668 | </sect1> |
| 669 | |
| 670 | <sect1 id="deallocvt"> |
| 671 | <title>deallocvt</title> |
| 672 | |
| 673 | <para> |
| 674 | Usage: deallocvt N |
| 675 | </para> |
| 676 | |
| 677 | <para> |
| 678 | Deallocate unused virtual terminal /dev/ttyN. |
| 679 | </para> |
| 680 | </sect1> |
| 681 | |
| 682 | <sect1 id="df"> |
| 683 | <title>df</title> |
| 684 | |
| 685 | <para> |
| 686 | Usage: df [FILE]... |
| 687 | </para> |
| 688 | |
| 689 | <para> |
| 690 | Print the filesystem space used and space available. |
| 691 | </para> |
| 692 | |
| 693 | <para> |
| 694 | Example: |
| 695 | </para> |
| 696 | |
| 697 | <para> |
| 698 | <screen> |
| 699 | $ df |
| 700 | Filesystem 1k-blocks Used Available Use% Mounted on |
| 701 | /dev/sda3 8690864 8553540 137324 98% / |
| 702 | /dev/sda1 64216 36364 27852 57% /boot |
| 703 | $ df /dev/sda3 |
| 704 | Filesystem 1k-blocks Used Available Use% Mounted on |
| 705 | /dev/sda3 8690864 8553540 137324 98% / |
| 706 | </screen> |
| 707 | </para> |
| 708 | </sect1> |
| 709 | |
| 710 | <sect1 id="dirname"> |
| 711 | <title>dirname</title> |
| 712 | |
| 713 | <para> |
| 714 | Usage: dirname NAME |
| 715 | </para> |
| 716 | |
| 717 | <para> |
| 718 | Strip non-directory suffix from NAME. |
| 719 | </para> |
| 720 | |
| 721 | <para> |
| 722 | Example: |
| 723 | </para> |
| 724 | |
| 725 | <para> |
| 726 | <screen> |
| 727 | $ dirname /tmp/foo |
| 728 | /tmp |
| 729 | $ dirname /tmp/foo/ |
| 730 | /tmp |
| 731 | </screen> |
| 732 | </para> |
| 733 | </sect1> |
| 734 | |
| 735 | <sect1 id="dmesg"> |
| 736 | <title>dmesg</title> |
| 737 | |
| 738 | <para> |
| 739 | Usage: dmesg [OPTION]... |
| 740 | </para> |
| 741 | |
| 742 | <para> |
| 743 | Print or control the kernel ring buffer. |
| 744 | </para> |
| 745 | |
| 746 | <para> |
| 747 | Options: |
| 748 | </para> |
| 749 | |
| 750 | <para> |
| 751 | <screen> |
| 752 | -c Clear the ring buffer after printing |
| 753 | -n LEVEL Set the console logging level to LEVEL |
| 754 | -s BUFSIZE Query ring buffer using a buffer of BUFSIZE |
| 755 | </screen> |
| 756 | </para> |
| 757 | </sect1> |
| 758 | |
Eric Andersen | cff3fe3 | 2000-09-20 19:22:26 +0000 | [diff] [blame] | 759 | <sect1 id="dos2unix"> |
| 760 | <title>dos2unix</title> |
| 761 | |
| 762 | <para> |
| 763 | Usage: dos2unix < dosfile > unixfile |
| 764 | </para> |
| 765 | |
| 766 | <para> |
| 767 | Converts a text file from dos format to unix format. |
| 768 | </para> |
| 769 | |
| 770 | </sect1> |
| 771 | |
Glenn L McGrath | fa04432 | 2001-01-03 01:06:30 +0000 | [diff] [blame] | 772 | <sect1 id="dpkg-deb"> |
| 773 | <title>dpkg-deb</title> |
| 774 | |
| 775 | <para> |
| 776 | Usage: dpkg-deb [OPTION] archive [directory] |
| 777 | </para> |
| 778 | |
| 779 | <para> |
| 780 | Debian package archive (.deb) manipulation tool |
| 781 | </para> |
| 782 | |
| 783 | <para> |
| 784 | Options: |
| 785 | </para> |
| 786 | |
| 787 | <para> |
| 788 | <screen> |
| 789 | -c List the contents of the filesystem tree archive portion of the package |
| 790 | -e Extracts the control information files from a package archive into the specified directory. |
| 791 | If no directory is specified then a subdirectory DEBIAN in the current directory is used. |
| 792 | -x Silently extracts the filesystem tree from a package archive into the specified directory. |
| 793 | -X Extracts the filesystem tree from a package archive into the specified directory, listing the files as it goes. |
| 794 | If required the specified directory (but not its parents) will be created. |
| 795 | </screen> |
| 796 | <para> |
| 797 | |
| 798 | <para> |
| 799 | Example: |
| 800 | </para> |
| 801 | |
| 802 | <para> |
| 803 | <screen> |
| 804 | dpkg-deb -e ./busybox_0.48-1_i386.deb |
| 805 | dpkg-deb -x ./busybox_0.48-1_i386.deb ./unpack_dir |
| 806 | </screen> |
| 807 | </para> |
| 808 | </sect1> |
| 809 | |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 810 | <sect1 id="du"> |
| 811 | <title>du</title> |
| 812 | |
| 813 | <para> |
| 814 | Usage: du [OPTION]... [FILE]... |
| 815 | </para> |
| 816 | |
| 817 | <para> |
| 818 | Summarize the disk space used for each FILE or current |
Eric Andersen | 77d9268 | 2001-05-23 20:32:09 +0000 | [diff] [blame] | 819 | directory. Disk space printed in units of 1k (i.e., |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 820 | 1024 bytes). |
| 821 | </para> |
| 822 | |
| 823 | <para> |
| 824 | Options: |
| 825 | </para> |
| 826 | |
| 827 | <para> |
| 828 | <screen> |
| 829 | -l Count sizes many times if hard linked |
| 830 | -s Display only a total for each argument |
| 831 | </screen> |
| 832 | </para> |
| 833 | |
| 834 | <para> |
| 835 | Example: |
| 836 | </para> |
| 837 | |
| 838 | <para> |
| 839 | <screen> |
| 840 | $ du |
| 841 | 16 ./CVS |
| 842 | 12 ./kernel-patches/CVS |
| 843 | 80 ./kernel-patches |
| 844 | 12 ./tests/CVS |
| 845 | 36 ./tests |
| 846 | 12 ./scripts/CVS |
| 847 | 16 ./scripts |
| 848 | 12 ./docs/CVS |
| 849 | 104 ./docs |
| 850 | 2417 . |
| 851 | </screen> |
| 852 | </para> |
| 853 | </sect1> |
| 854 | |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 855 | <sect1 id="dumpkmap"> |
| 856 | <title>dumpkmap</title> |
| 857 | |
| 858 | <para> |
| 859 | Usage: dumpkmap |
| 860 | </para> |
| 861 | |
| 862 | <para> |
Eric Andersen | 337ec1b | 2000-11-17 17:23:16 +0000 | [diff] [blame] | 863 | Prints out a binary keyboard translation table to standard output. |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 864 | </para> |
Eric Andersen | 18a1014 | 2000-09-01 16:12:57 +0000 | [diff] [blame] | 865 | |
| 866 | <para> |
| 867 | Example: |
| 868 | </para> |
| 869 | |
| 870 | <para> |
| 871 | <screen> |
| 872 | $ dumpkmap < keymap |
| 873 | </screen> |
| 874 | </para> |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 875 | </sect1> |
| 876 | |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 877 | <sect1 id="dutmp"> |
| 878 | <title>dutmp</title> |
| 879 | |
| 880 | <para> |
| 881 | Usage: dutmp [FILE] |
| 882 | </para> |
| 883 | |
| 884 | <para> |
| 885 | Dump utmp file format (pipe delimited) from FILE or |
| 886 | stdin to stdout. |
| 887 | </para> |
| 888 | |
| 889 | <para> |
| 890 | Example: |
| 891 | </para> |
| 892 | |
| 893 | <para> |
| 894 | <screen> |
| 895 | $ dutmp /var/run/utmp |
| 896 | 8|7||si|||0|0|0|955637625|760097|0 |
| 897 | 2|0|~|~~|reboot||0|0|0|955637625|782235|0 |
| 898 | 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0 |
| 899 | 8|125||l4|||0|0|0|955637629|998367|0 |
| 900 | 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0 |
| 901 | 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0 |
| 902 | 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0 |
| 903 | </screen> |
| 904 | </para> |
| 905 | </sect1> |
| 906 | |
| 907 | <sect1 id="echo"> |
| 908 | <title>echo</title> |
| 909 | |
| 910 | <para> |
| 911 | Usage: echo [OPTION]... [ARG]... |
| 912 | </para> |
| 913 | |
| 914 | <para> |
| 915 | Print ARGs to stdout. |
| 916 | </para> |
| 917 | |
| 918 | <para> |
| 919 | Options: |
| 920 | </para> |
| 921 | |
| 922 | <para> |
| 923 | <screen> |
| 924 | -n Suppress trailing newline |
| 925 | -e Enable interpretation of escaped characters |
| 926 | -E Disable interpretation of escaped characters |
| 927 | </screen> |
| 928 | </para> |
| 929 | |
| 930 | <para> |
| 931 | Example: |
| 932 | </para> |
| 933 | |
| 934 | <para> |
| 935 | <screen> |
| 936 | $ echo "Erik is cool" |
| 937 | Erik is cool |
| 938 | $ echo -e "Erik\nis\ncool" |
| 939 | Erik |
| 940 | is |
| 941 | cool |
| 942 | $ echo "Erik\nis\ncool" |
| 943 | Erik\nis\ncool |
| 944 | </screen> |
| 945 | </para> |
| 946 | </sect1> |
| 947 | |
Eric Andersen | 1b355eb | 2000-09-05 17:37:48 +0000 | [diff] [blame] | 948 | <sect1 id="expr"> |
| 949 | <title>expr</title> |
| 950 | |
| 951 | <para> |
| 952 | Usage: expr EXPRESSION |
| 953 | </para> |
| 954 | |
| 955 | <para> |
| 956 | Prints the value of EXPRESSION to standard output. |
| 957 | </para> |
| 958 | |
| 959 | <para> |
| 960 | EXPRESSION may be: |
| 961 | </para> |
| 962 | |
| 963 | <para> |
| 964 | <screen> |
| 965 | ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2 |
| 966 | ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0 |
| 967 | ARG1 < ARG2 ARG1 is less than ARG2 |
| 968 | ARG1 <= ARG2 ARG1 is less than or equal to ARG2 |
| 969 | ARG1 = ARG2 ARG1 is equal to ARG2 |
| 970 | ARG1 != ARG2 ARG1 is unequal to ARG2 |
| 971 | ARG1 >= ARG2 ARG1 is greater than or equal to ARG2 |
| 972 | ARG1 > ARG2 ARG1 is greater than ARG2 |
| 973 | ARG1 + ARG2 arithmetic sum of ARG1 and ARG2 |
| 974 | ARG1 - ARG2 arithmetic difference of ARG1 and ARG2 |
| 975 | ARG1 * ARG2 arithmetic product of ARG1 and ARG2 |
| 976 | ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2 |
| 977 | ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2 |
| 978 | STRING : REGEXP anchored pattern match of REGEXP in STRING |
| 979 | match STRING REGEXP same as STRING : REGEXP |
| 980 | substr STRING POS LENGTH substring of STRING, POS counted from 1 |
| 981 | index STRING CHARS index in STRING where any CHARS is found, or 0 |
| 982 | length STRING length of STRING |
| 983 | quote TOKEN interpret TOKEN as a string, even if it is a |
| 984 | keyword like `match' or an operator like `/' |
| 985 | ( EXPRESSION ) value of EXPRESSION |
| 986 | </screen> |
| 987 | </para> |
| 988 | |
| 989 | <para> |
| 990 | Beware that many operators need to be escaped or quoted for shells. |
| 991 | Comparisons are arithmetic if both ARGs are numbers, else |
| 992 | lexicographical. Pattern matches return the string matched between |
| 993 | \( and \) or null; if \( and \) are not used, they return the number |
| 994 | of characters matched or 0. |
| 995 | </para> |
| 996 | |
| 997 | </sect1> |
| 998 | |
| 999 | |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 1000 | <sect1 id="false"> |
| 1001 | <title>false</title> |
| 1002 | |
| 1003 | <para> |
| 1004 | Usage: false |
| 1005 | </para> |
| 1006 | |
| 1007 | <para> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 1008 | Return an exit code of FALSE (1). |
Eric Andersen | 6f5e281 | 2000-07-06 16:58:45 +0000 | [diff] [blame] | 1009 | </para> |
| 1010 | |
| 1011 | <para> |
| 1012 | Example: |
| 1013 | </para> |
| 1014 | |
| 1015 | <para> |
| 1016 | <screen> |
| 1017 | $ false |
| 1018 | $ echo $? |
| 1019 | 1 |
| 1020 | </screen> |
| 1021 | </para> |
| 1022 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 1023 | |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1024 | <sect1 id="fbset"> |
| 1025 | <title>fbset</title> |
| 1026 | |
| 1027 | <para> |
| 1028 | Usage: fbset [OPTION]... [MODE] |
| 1029 | </para> |
| 1030 | |
| 1031 | <para> |
| 1032 | Show and modify frame buffer device settings. |
| 1033 | </para> |
| 1034 | |
| 1035 | <para> |
| 1036 | Options: |
| 1037 | </para> |
| 1038 | |
| 1039 | <para> |
| 1040 | <screen> |
| 1041 | -h Display option summary |
| 1042 | -fb DEVICE Operate on DEVICE |
| 1043 | -db FILE Use FILE for mode database |
| 1044 | -g XRES YRES VXRES VYRES DEPTH Set all geometry parameters |
| 1045 | -t PIXCLOCK LEFT RIGHT UPPER LOWER HSLEN VSLEN Set all timing parameters |
| 1046 | -xres RES Set visible horizontal resolution |
| 1047 | -yres RES Set visible vertical resolution |
| 1048 | </screen> |
| 1049 | </para> |
| 1050 | |
| 1051 | <para> |
| 1052 | Example: |
| 1053 | </para> |
| 1054 | |
| 1055 | <para> |
| 1056 | <screen> |
| 1057 | $ fbset |
| 1058 | mode "1024x768-76" |
| 1059 | # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz |
| 1060 | geometry 1024 768 1024 768 16 |
| 1061 | timings 12714 128 32 16 4 128 4 |
| 1062 | accel false |
| 1063 | rgba 5/11,6/5,5/0,0/0 |
| 1064 | endmode |
| 1065 | </screen> |
| 1066 | </para> |
| 1067 | </sect1> |
| 1068 | |
| 1069 | <sect1 id="fdflush"> |
| 1070 | <title>fdflush</title> |
| 1071 | |
| 1072 | <para> |
| 1073 | Usage: fdflush DEVICE |
| 1074 | </para> |
| 1075 | |
| 1076 | <para> |
| 1077 | Force floppy disk drive to detect disk change on DEVICE. |
| 1078 | </para> |
| 1079 | </sect1> |
| 1080 | |
| 1081 | <sect1 id="find"> |
| 1082 | <title>find</title> |
| 1083 | |
| 1084 | <para> |
| 1085 | Usage: find [PATH]... [EXPRESSION] |
| 1086 | </para> |
| 1087 | |
| 1088 | <para> |
| 1089 | Search for files in a directory hierarchy. The default |
| 1090 | PATH is the current directory; default EXPRESSION is |
| 1091 | '-print'. |
| 1092 | </para> |
| 1093 | |
| 1094 | <para> |
| 1095 | EXPRESSION may consist of: |
| 1096 | </para> |
| 1097 | |
| 1098 | <para> |
| 1099 | <screen> |
| 1100 | -follow Dereference symbolic links |
| 1101 | -name PATTERN File name (leading directories removed) matches PATTERN |
Matt Kraai | df8ccb6 | 2001-02-07 04:05:35 +0000 | [diff] [blame] | 1102 | -type X Filetype matches X (where X is one of: f,d,l,b,c,...) |
| 1103 | -perm PERMS Permissions match any of (+NNN); all of (-NNN); or exactly (NNN) |
| 1104 | -mtime TIME Modified time is greater than (+N); less than (-N); or exactly (N) days |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1105 | </screen> |
| 1106 | </para> |
| 1107 | |
| 1108 | <para> |
| 1109 | Example: |
| 1110 | </para> |
| 1111 | |
| 1112 | <para> |
| 1113 | <screen> |
| 1114 | $ find / -name /etc/passwd |
| 1115 | /etc/passwd |
| 1116 | </screen> |
| 1117 | </para> |
| 1118 | </sect1> |
| 1119 | |
| 1120 | <sect1 id="free"> |
| 1121 | <title>free</title> |
| 1122 | |
| 1123 | <para> |
| 1124 | Usage: free |
| 1125 | </para> |
| 1126 | |
| 1127 | <para> |
| 1128 | Displays the amount of free and used system memory. |
| 1129 | </para> |
| 1130 | |
| 1131 | <para> |
| 1132 | Example: |
| 1133 | </para> |
| 1134 | |
| 1135 | <para> |
| 1136 | <screen> |
| 1137 | $ free |
| 1138 | total used free shared buffers |
| 1139 | Mem: 257628 248724 8904 59644 93124 |
| 1140 | Swap: 128516 8404 120112 |
| 1141 | Total: 386144 257128 129016 |
| 1142 | </screen> |
| 1143 | </para> |
| 1144 | </sect1> |
| 1145 | |
| 1146 | <sect1 id="freeramdisk"> |
| 1147 | <title>freeramdisk</title> |
| 1148 | |
| 1149 | <para> |
| 1150 | Usage: freeramdisk DEVICE |
| 1151 | </para> |
| 1152 | |
| 1153 | <para> |
| 1154 | Free all memory used by the ramdisk DEVICE. |
| 1155 | </para> |
| 1156 | |
| 1157 | <para> |
| 1158 | Example: |
| 1159 | </para> |
| 1160 | |
| 1161 | <para> |
| 1162 | <screen> |
| 1163 | $ freeramdisk /dev/ram2 |
| 1164 | </screen> |
| 1165 | </para> |
| 1166 | </sect1> |
| 1167 | |
| 1168 | <sect1 id="fsck.minix"> |
| 1169 | <title>fsck.minix</title> |
| 1170 | |
| 1171 | <para> |
| 1172 | Usage: fsck.minix [OPTION]... DEVICE |
| 1173 | </para> |
| 1174 | |
| 1175 | <para> |
| 1176 | Perform a consistency check on the MINIX filesystem on |
| 1177 | DEVICE. |
| 1178 | </para> |
| 1179 | |
| 1180 | <para> |
| 1181 | Options: |
| 1182 | </para> |
| 1183 | |
| 1184 | <para> |
| 1185 | <screen> |
| 1186 | -l List all filenames |
| 1187 | -r Perform interactive repairs |
| 1188 | -a Perform automatic repairs |
| 1189 | -v Verbose |
| 1190 | -s Output super-block information |
| 1191 | -m Activate MINIX-like "mode not cleared" warnings |
| 1192 | -f Force file system check. |
| 1193 | </screen> |
| 1194 | </para> |
| 1195 | </sect1> |
Eric Andersen | a1f16bb | 2000-08-21 22:02:34 +0000 | [diff] [blame] | 1196 | |
| 1197 | <sect1 id="getopt"> |
| 1198 | <title>getopt</title> |
| 1199 | |
| 1200 | <para> |
| 1201 | Usage: getopt [OPTIONS]... |
| 1202 | </para> |
| 1203 | |
| 1204 | <para> |
| 1205 | Parse command options |
| 1206 | </para> |
| 1207 | |
| 1208 | <para> |
| 1209 | <screen> |
| 1210 | -a, --alternative Allow long options starting with single -\n" |
| 1211 | -l, --longoptions=longopts Long options to be recognized\n" |
| 1212 | -n, --name=progname The name under which errors are reported\n" |
| 1213 | -o, --options=optstring Short options to be recognized\n" |
| 1214 | -q, --quiet Disable error reporting by getopt(3)\n" |
| 1215 | -Q, --quiet-output No normal output\n" |
| 1216 | -s, --shell=shell Set shell quoting conventions\n" |
| 1217 | -T, --test Test for getopt(1) version\n" |
| 1218 | -u, --unqote Do not quote the output\n" |
| 1219 | </screen> |
| 1220 | </para> |
| 1221 | |
| 1222 | |
| 1223 | <para> |
| 1224 | Example: |
| 1225 | </para> |
| 1226 | |
| 1227 | <para> |
| 1228 | <screen> |
| 1229 | $ cat getopt.test |
| 1230 | #!/bin/sh |
| 1231 | GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \ |
| 1232 | -n 'example.busybox' -- "$@"` |
| 1233 | if [ $? != 0 ] ; then exit 1 ; fi |
| 1234 | eval set -- "$GETOPT" |
| 1235 | while true ; do |
| 1236 | case $1 in |
| 1237 | -a|--a-long) echo "Option a" ; shift ;; |
| 1238 | -b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;; |
| 1239 | -c|--c-long) |
| 1240 | case "$2" in |
| 1241 | "") echo "Option c, no argument"; shift 2 ;; |
| 1242 | *) echo "Option c, argument \`$2'" ; shift 2 ;; |
| 1243 | esac ;; |
| 1244 | --) shift ; break ;; |
| 1245 | *) echo "Internal error!" ; exit 1 ;; |
| 1246 | esac |
| 1247 | done |
| 1248 | </screen> |
| 1249 | </para> |
| 1250 | </sect1> |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1251 | |
| 1252 | <sect1 id="grep"> |
| 1253 | <title>grep</title> |
| 1254 | |
| 1255 | <para> |
| 1256 | Usage: grep [OPTIONS]... PATTERN [FILE]... |
| 1257 | </para> |
| 1258 | |
| 1259 | <para> |
| 1260 | Search for PATTERN in each FILE or stdin. |
| 1261 | </para> |
| 1262 | |
| 1263 | <para> |
| 1264 | Options: |
| 1265 | </para> |
| 1266 | |
| 1267 | <para> |
| 1268 | <screen> |
| 1269 | -h Suppress the prefixing filename on output |
| 1270 | -i Ignore case distinctions |
| 1271 | -n Print line number with output lines |
| 1272 | -q Be quiet. Returns 0 if result was found, 1 otherwise |
| 1273 | -v Select non-matching lines |
| 1274 | </screen> |
| 1275 | </para> |
| 1276 | |
| 1277 | <para> |
| 1278 | This version of grep matches full regular expressions. |
| 1279 | </para> |
| 1280 | |
| 1281 | <para> |
| 1282 | Example: |
| 1283 | </para> |
| 1284 | |
| 1285 | <para> |
| 1286 | <screen> |
| 1287 | $ grep root /etc/passwd |
| 1288 | root:x:0:0:root:/root:/bin/bash |
| 1289 | $ grep ^[rR]oo. /etc/passwd |
| 1290 | root:x:0:0:root:/root:/bin/bash |
| 1291 | </screen> |
| 1292 | </para> |
| 1293 | </sect1> |
| 1294 | |
| 1295 | <sect1 id="gunzip"> |
| 1296 | <title>gunzip</title> |
| 1297 | |
| 1298 | <para> |
| 1299 | Usage: gunzip [OPTION]... FILE |
| 1300 | </para> |
| 1301 | |
| 1302 | <para> |
| 1303 | Uncompress FILE (or stdin if FILE is '-'). |
| 1304 | </para> |
| 1305 | |
| 1306 | <para> |
| 1307 | Options: |
| 1308 | </para> |
| 1309 | |
| 1310 | <para> |
| 1311 | <screen> |
| 1312 | -c Write output to standard output |
| 1313 | -t Test compressed file integrity |
| 1314 | </screen> |
| 1315 | </para> |
| 1316 | |
| 1317 | <para> |
| 1318 | Example: |
| 1319 | </para> |
| 1320 | |
| 1321 | <para> |
| 1322 | <screen> |
| 1323 | $ ls -la /tmp/BusyBox* |
| 1324 | -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz |
| 1325 | $ gunzip /tmp/BusyBox-0.43.tar.gz |
| 1326 | $ ls -la /tmp/BusyBox* |
| 1327 | -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar |
| 1328 | </screen> |
| 1329 | </para> |
| 1330 | </sect1> |
| 1331 | |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 1332 | <sect1 id="gzip"> |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1333 | <title>gzip</title> |
| 1334 | |
| 1335 | <para> |
| 1336 | Usage: gzip [OPTION]... FILE |
| 1337 | </para> |
| 1338 | |
| 1339 | <para> |
| 1340 | Compress FILE (or stdin if FILE is '-') with maximum |
| 1341 | compression to FILE.gz (or stdout if FILE is '-'). |
| 1342 | </para> |
| 1343 | |
| 1344 | <para> |
| 1345 | Options: |
| 1346 | </para> |
| 1347 | |
| 1348 | <para> |
| 1349 | <screen> |
| 1350 | -c Write output to standard output |
Eric Andersen | d0fa0a1 | 2000-12-13 17:59:37 +0000 | [diff] [blame] | 1351 | -d decompress |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1352 | </screen> |
| 1353 | </para> |
| 1354 | |
| 1355 | <para> |
| 1356 | Example: |
| 1357 | </para> |
| 1358 | |
| 1359 | <para> |
| 1360 | <screen> |
| 1361 | $ ls -la /tmp/BusyBox* |
| 1362 | -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar |
| 1363 | $ gzip /tmp/BusyBox-0.43.tar |
| 1364 | $ ls -la /tmp/BusyBox* |
| 1365 | -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz |
| 1366 | </screen> |
| 1367 | </para> |
| 1368 | </sect1> |
| 1369 | |
| 1370 | <sect1 id="halt"> |
| 1371 | <title>halt</title> |
| 1372 | |
| 1373 | <para> |
| 1374 | Usage: halt |
| 1375 | </para> |
| 1376 | |
| 1377 | <para> |
| 1378 | Halt the system. |
| 1379 | </para> |
| 1380 | </sect1> |
| 1381 | |
| 1382 | <sect1 id="head"> |
| 1383 | <title>head</title> |
| 1384 | |
| 1385 | <para> |
| 1386 | Usage: head [OPTION] FILE... |
| 1387 | </para> |
| 1388 | |
| 1389 | <para> |
| 1390 | Print first 10 lines of each FILE to standard output. |
| 1391 | With more than one FILE, precede each with a header |
| 1392 | giving the file name. With no FILE, or when FILE is -, |
| 1393 | read standard input. |
| 1394 | </para> |
| 1395 | |
| 1396 | <para> |
| 1397 | Options: |
| 1398 | </para> |
| 1399 | |
| 1400 | <para> |
| 1401 | <screen> |
| 1402 | -n NUM Print first NUM lines instead of first 10 |
| 1403 | </screen> |
| 1404 | </para> |
| 1405 | |
| 1406 | <para> |
| 1407 | Example: |
| 1408 | </para> |
| 1409 | |
| 1410 | <para> |
| 1411 | <screen> |
| 1412 | $ head -n 2 /etc/passwd |
| 1413 | root:x:0:0:root:/root:/bin/bash |
| 1414 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh |
| 1415 | </screen> |
| 1416 | </para> |
| 1417 | </sect1> |
| 1418 | |
| 1419 | <sect1 id="hostid"> |
| 1420 | <title>hostid</title> |
| 1421 | |
| 1422 | <para> |
| 1423 | Usage: hostid |
| 1424 | </para> |
| 1425 | |
| 1426 | <para> |
| 1427 | Prints out a unique 32-bit identifier for the current |
| 1428 | machine. The 32-bit identifier is intended to be unique |
| 1429 | among all UNIX systems in existence. |
| 1430 | </para> |
| 1431 | </sect1> |
| 1432 | |
| 1433 | <sect1 id="hostname"> |
| 1434 | <title>hostname</title> |
| 1435 | |
| 1436 | <para> |
| 1437 | Usage: hostname [OPTION]... [HOSTNAME|-F FILE] |
| 1438 | </para> |
| 1439 | |
| 1440 | <para> |
| 1441 | Get or set the hostname or DNS domain name. If a |
| 1442 | hostname is given (or a file with the -F parameter), the |
| 1443 | host name will be set. |
| 1444 | </para> |
| 1445 | |
| 1446 | <para> |
| 1447 | Options: |
| 1448 | </para> |
| 1449 | |
| 1450 | <para> |
| 1451 | <screen> |
Eric Andersen | 0d5835a | 2000-10-12 22:30:31 +0000 | [diff] [blame] | 1452 | -s Short |
| 1453 | -i Addresses for the hostname |
| 1454 | -d DNS domain name |
| 1455 | -F, --file FILE Use the contents of FILE to specify the hostname |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1456 | </screen> |
| 1457 | </para> |
| 1458 | |
| 1459 | <para> |
| 1460 | Example: |
| 1461 | </para> |
| 1462 | |
| 1463 | <para> |
| 1464 | <screen> |
| 1465 | $ hostname |
| 1466 | slag |
| 1467 | </screen> |
| 1468 | </para> |
| 1469 | </sect1> |
| 1470 | |
| 1471 | <sect1 id="id"> |
| 1472 | <title>id</title> |
| 1473 | |
| 1474 | <para> |
| 1475 | Usage: id [OPTION]... [USERNAME] |
| 1476 | </para> |
| 1477 | |
| 1478 | <para> |
| 1479 | Print information for USERNAME or the current user. |
| 1480 | </para> |
| 1481 | |
| 1482 | <para> |
| 1483 | Options: |
| 1484 | </para> |
| 1485 | |
| 1486 | <para> |
| 1487 | <screen> |
| 1488 | -g Print only the group ID |
| 1489 | -u Print only the user ID |
Eric Andersen | c1b8f12 | 2001-01-25 05:12:02 +0000 | [diff] [blame] | 1490 | -n print a name instead of a number (with for -ug) |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1491 | -r Print the real user ID instead of the effective ID (with -ug) |
| 1492 | </screen> |
| 1493 | </para> |
| 1494 | |
| 1495 | <para> |
| 1496 | Example: |
| 1497 | </para> |
| 1498 | |
| 1499 | <para> |
| 1500 | <screen> |
| 1501 | $ id |
| 1502 | uid=1000(andersen) gid=1000(andersen) |
| 1503 | </screen> |
| 1504 | </para> |
| 1505 | </sect1> |
| 1506 | |
| 1507 | <sect1 id="init"> |
| 1508 | <title>init</title> |
| 1509 | |
| 1510 | <para> |
| 1511 | Usage: init |
| 1512 | </para> |
| 1513 | |
| 1514 | <para> |
| 1515 | Init is the parent of all processes. |
| 1516 | </para> |
| 1517 | |
| 1518 | <para> |
| 1519 | This version of init is designed to be run only by the |
| 1520 | kernel. |
| 1521 | </para> |
| 1522 | |
| 1523 | <para> |
| 1524 | BusyBox init doesn't support multiple runlevels. The |
| 1525 | runlevels field of the /etc/inittab file is completely |
| 1526 | ignored by BusyBox init. If you want runlevels, use |
| 1527 | sysvinit. |
| 1528 | </para> |
| 1529 | |
| 1530 | <para> |
| 1531 | BusyBox init works just fine without an inittab. If no |
| 1532 | inittab is found, it has the following default behavior: |
| 1533 | </para> |
| 1534 | |
| 1535 | <para> |
| 1536 | <screen> |
| 1537 | ::sysinit:/etc/init.d/rcS |
| 1538 | ::askfirst:/bin/sh |
| 1539 | </screen> |
| 1540 | </para> |
| 1541 | |
| 1542 | <para> |
| 1543 | If it detects that /dev/console is _not_ a serial |
| 1544 | console, it will also run: |
| 1545 | </para> |
| 1546 | |
| 1547 | <para> |
| 1548 | <screen> |
| 1549 | tty2::askfirst:/bin/sh |
| 1550 | </screen> |
| 1551 | </para> |
| 1552 | |
| 1553 | <para> |
| 1554 | If you choose to use an /etc/inittab file, the inittab |
| 1555 | entry format is as follows: |
| 1556 | </para> |
| 1557 | |
| 1558 | <para> |
| 1559 | <screen> |
| 1560 | <id>:<runlevels>:<action>:<process> |
| 1561 | </screen> |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 1562 | </para> |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1563 | |
| 1564 | <sect2> |
| 1565 | <title>id</title> |
| 1566 | <para> |
Eric Andersen | 0d2acb0 | 2000-12-18 20:36:02 +0000 | [diff] [blame] | 1567 | |
| 1568 | WARNING: This field has a non-traditional meaning for BusyBox init! |
| 1569 | The id field is used by BusyBox init to specify the controlling tty |
| 1570 | for the specified process to run on. The contents of this field |
| 1571 | are appended to "/dev/" and used as-is. There is no need for this |
| 1572 | field to be unique, although if it isn't you may have strange |
| 1573 | results. If this field is left blank, the controlling tty is set |
| 1574 | to the console. Also note that if BusyBox detects that a serial |
| 1575 | console is in use, then only entries whose controlling tty is |
| 1576 | either the serial console or /dev/null will be run. BusyBox init |
| 1577 | does nothing with utmp. We don't need no stinkin' utmp. |
| 1578 | |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1579 | </para> |
| 1580 | </sect2> |
| 1581 | |
| 1582 | <sect2> |
| 1583 | <title>runlevels</title> |
| 1584 | |
| 1585 | <para> |
| 1586 | The runlevels field is completely ignored. |
| 1587 | </para> |
| 1588 | </sect2> |
| 1589 | |
| 1590 | <sect2> |
| 1591 | <title>action</title> |
| 1592 | |
Eric Andersen | eb4218d | 2000-12-08 20:38:00 +0000 | [diff] [blame] | 1593 | |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1594 | <para> |
Eric Andersen | eb4218d | 2000-12-08 20:38:00 +0000 | [diff] [blame] | 1595 | Valid actions include: sysinit, respawn, askfirst, wait, |
| 1596 | once, and ctrlaltdel. |
| 1597 | </para> |
| 1598 | |
| 1599 | |
| 1600 | <para> |
| 1601 | The available actions can be classified into two groups: actions |
| 1602 | that are run only once, and actions that are re-run when the specified |
| 1603 | process exits. |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1604 | </para> |
| 1605 | |
| 1606 | <para> |
Eric Andersen | eb4218d | 2000-12-08 20:38:00 +0000 | [diff] [blame] | 1607 | Run only-once actions: |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1608 | </para> |
| 1609 | |
| 1610 | <para> |
Eric Andersen | eb4218d | 2000-12-08 20:38:00 +0000 | [diff] [blame] | 1611 | 'sysinit' is the first item run on boot. init waits until all |
| 1612 | sysinit actions are completed before continuing. Following the |
| 1613 | completion of all sysinit actions, all 'wait' actions are run. |
| 1614 | 'wait' actions, like 'sysinit' actions, cause init to wait until |
| 1615 | the specified task completes. 'once' actions are asyncronous, |
| 1616 | therefore, init does not wait for them to complete. 'ctrlaltdel' |
| 1617 | actions are run immediately before init causes the system to reboot |
| 1618 | (unmounting filesystems with a 'ctrlaltdel' action is a very good |
| 1619 | idea). |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1620 | </para> |
Eric Andersen | eb4218d | 2000-12-08 20:38:00 +0000 | [diff] [blame] | 1621 | |
| 1622 | <para> |
| 1623 | Run repeatedly actions: |
| 1624 | </para> |
| 1625 | |
| 1626 | <para> |
| 1627 | 'respawn' actions are run after the 'once' actions. When a process |
| 1628 | started with a 'respawn' action exits, init automatically restarts |
| 1629 | it. Unlike sysvinit, BusyBox init does not stop processes from |
| 1630 | respawning out of control. The 'askfirst' actions acts just like |
| 1631 | respawn, except that before running the specified process it |
| 1632 | displays the line "Please press Enter to activate this console." |
| 1633 | and then waits for the user to press enter before starting the |
| 1634 | specified process. |
| 1635 | </para> |
| 1636 | |
| 1637 | <para> |
| 1638 | Unrecognized actions (like initdefault) will cause init to emit an |
| 1639 | error message, and then go along with its business. All actions are |
| 1640 | run in the reverse order from how they appear in /etc/inittab. |
| 1641 | </para> |
| 1642 | |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1643 | </sect2> |
| 1644 | |
| 1645 | <sect2> |
| 1646 | <title>process</title> |
| 1647 | |
| 1648 | <para> |
| 1649 | Specifies the process to be executed and its |
| 1650 | command line. |
| 1651 | </para> |
| 1652 | </sect2> |
| 1653 | |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 1654 | <sect2> |
| 1655 | <title>Example /etc/inittab file</title> |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1656 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 1657 | <para> |
| 1658 | <screen> |
| 1659 | # This is run first except when booting in single-user mode. |
| 1660 | # |
| 1661 | ::sysinit:/etc/init.d/rcS |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1662 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 1663 | # /bin/sh invocations on selected ttys |
| 1664 | # |
| 1665 | # Start an "askfirst" shell on the console (whatever that may be) |
| 1666 | ::askfirst:-/bin/sh |
| 1667 | # Start an "askfirst" shell on /dev/tty2-4 |
| 1668 | tty2::askfirst:-/bin/sh |
| 1669 | tty2::askfirst:-/bin/sh |
| 1670 | tty2::askfirst:-/bin/sh |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1671 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 1672 | # /sbin/getty invocations for selected ttys |
| 1673 | # |
| 1674 | tty4::respawn:/sbin/getty 38400 tty5 |
| 1675 | tty5::respawn:/sbin/getty 38400 tty6 |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1676 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 1677 | # Example of how to put a getty on a serial line (for a terminal) |
| 1678 | # |
Eric Andersen | 8ce85ce | 2000-09-26 22:20:06 +0000 | [diff] [blame] | 1679 | #::respawn:/sbin/getty -L ttyS0 9600 vt100 |
| 1680 | #::respawn:/sbin/getty -L ttyS1 9600 vt100 |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 1681 | # |
| 1682 | # Example how to put a getty on a modem line. |
Eric Andersen | 8ce85ce | 2000-09-26 22:20:06 +0000 | [diff] [blame] | 1683 | #::respawn:/sbin/getty 57600 ttyS2 |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1684 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 1685 | # Stuff to do before rebooting |
| 1686 | ::ctrlaltdel:/bin/umount -a -r |
| 1687 | ::ctrlaltdel:/sbin/swapoff |
| 1688 | </screen> |
| 1689 | </para> |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 1690 | </sect2> |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1691 | </sect1> |
| 1692 | |
| 1693 | <sect1 id="insmod"> |
| 1694 | <title>insmod</title> |
| 1695 | |
| 1696 | <para> |
| 1697 | Usage: insmod [OPTION]... MODULE [symbol=value]... |
| 1698 | </para> |
| 1699 | |
| 1700 | <para> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 1701 | Load MODULE into the kernel. |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1702 | </para> |
| 1703 | |
| 1704 | <para> |
| 1705 | Options: |
| 1706 | </para> |
| 1707 | |
| 1708 | <para> |
| 1709 | <screen> |
| 1710 | -f Force module to load into the wrong kernel version. |
| 1711 | -k Make module autoclean-able. |
| 1712 | -v Verbose output |
| 1713 | -x Do not export externs |
Eric Andersen | 8c5cb31 | 2001-01-24 19:15:07 +0000 | [diff] [blame] | 1714 | -L Prevent simultaneous loads of the same module |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1715 | </screen> |
| 1716 | </para> |
| 1717 | </sect1> |
| 1718 | |
| 1719 | <sect1 id="kill"> |
| 1720 | <title>kill</title> |
| 1721 | |
| 1722 | <para> |
| 1723 | Usage: kill [OPTION] PID... |
| 1724 | </para> |
| 1725 | |
| 1726 | <para> |
| 1727 | Send a signal (default is SIGTERM) to the specified |
| 1728 | PID(s). |
| 1729 | </para> |
| 1730 | |
| 1731 | <para> |
| 1732 | Options: |
| 1733 | </para> |
| 1734 | |
| 1735 | <para> |
| 1736 | <screen> |
| 1737 | -l List all signal names and numbers |
| 1738 | -SIG Send signal SIG |
| 1739 | </screen> |
| 1740 | </para> |
| 1741 | |
| 1742 | <para> |
| 1743 | Example: |
| 1744 | </para> |
| 1745 | |
| 1746 | <para> |
| 1747 | <screen> |
| 1748 | $ ps | grep apache |
| 1749 | 252 root root S [apache] |
| 1750 | 263 www-data www-data S [apache] |
| 1751 | 264 www-data www-data S [apache] |
| 1752 | 265 www-data www-data S [apache] |
| 1753 | 266 www-data www-data S [apache] |
| 1754 | 267 www-data www-data S [apache] |
| 1755 | $ kill 252 |
| 1756 | </screen> |
| 1757 | </para> |
| 1758 | </sect1> |
| 1759 | |
| 1760 | <sect1 id="killall"> |
| 1761 | <title>killall</title> |
| 1762 | |
| 1763 | <para> |
| 1764 | Usage: killall [OPTION] NAME... |
| 1765 | </para> |
| 1766 | |
| 1767 | <para> |
| 1768 | Send a signal (default is SIGTERM) to the specified |
| 1769 | NAME(s). |
| 1770 | </para> |
| 1771 | |
| 1772 | <para> |
| 1773 | Options: |
| 1774 | </para> |
| 1775 | |
| 1776 | <para> |
| 1777 | <screen> |
| 1778 | -l List all signal names and numbers |
| 1779 | -SIG Send signal SIG |
| 1780 | </screen> |
| 1781 | </para> |
| 1782 | |
| 1783 | <para> |
| 1784 | Example: |
| 1785 | </para> |
| 1786 | |
| 1787 | <para> |
| 1788 | <screen> |
| 1789 | $ killall apache |
| 1790 | </screen> |
| 1791 | </para> |
| 1792 | </sect1> |
| 1793 | |
| 1794 | <sect1 id="length"> |
| 1795 | <title>length</title> |
| 1796 | |
| 1797 | <para> |
| 1798 | Usage: length STRING |
| 1799 | </para> |
| 1800 | |
| 1801 | <para> |
| 1802 | Print the length of STRING. |
| 1803 | </para> |
| 1804 | |
| 1805 | <para> |
| 1806 | Example: |
| 1807 | </para> |
| 1808 | |
| 1809 | <para> |
| 1810 | <screen> |
| 1811 | $ length "Hello" |
| 1812 | 5 |
| 1813 | </screen> |
| 1814 | </para> |
| 1815 | </sect1> |
| 1816 | |
| 1817 | <sect1 id="ln"> |
| 1818 | <title>ln</title> |
| 1819 | |
| 1820 | <para> |
| 1821 | Usage: ln [OPTION]... TARGET FILE|DIRECTORY |
| 1822 | </para> |
| 1823 | |
| 1824 | <para> |
| 1825 | Create a link named FILE or DIRECTORY to the specified |
| 1826 | TARGET. You may use '--' to indicate that all following |
| 1827 | arguments are non-options. |
| 1828 | </para> |
| 1829 | |
| 1830 | <para> |
| 1831 | Options: |
| 1832 | </para> |
| 1833 | |
| 1834 | <para> |
| 1835 | <screen> |
| 1836 | -s Make symbolic link instead of hard link |
| 1837 | -f Remove existing destination file |
| 1838 | </screen> |
| 1839 | </para> |
| 1840 | |
| 1841 | <para> |
| 1842 | Example: |
| 1843 | </para> |
| 1844 | |
| 1845 | <para> |
| 1846 | <screen> |
| 1847 | $ ln -s BusyBox /tmp/ls |
| 1848 | $ ls -l /tmp/ls |
| 1849 | lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox* |
| 1850 | </screen> |
| 1851 | </para> |
| 1852 | </sect1> |
| 1853 | |
| 1854 | <sect1 id="loadacm"> |
| 1855 | <title>loadacm</title> |
| 1856 | |
| 1857 | <para> |
| 1858 | Usage: loadacm |
| 1859 | </para> |
| 1860 | |
| 1861 | <para> |
| 1862 | Load an acm from stdin. |
| 1863 | </para> |
| 1864 | |
| 1865 | <para> |
| 1866 | Example: |
| 1867 | </para> |
| 1868 | |
| 1869 | <para> |
| 1870 | <screen> |
| 1871 | $ loadacm < /etc/i18n/acmname |
| 1872 | </screen> |
| 1873 | </para> |
| 1874 | </sect1> |
| 1875 | |
| 1876 | <sect1 id="loadfont"> |
| 1877 | <title>loadfont</title> |
| 1878 | |
| 1879 | <para> |
| 1880 | Usage: loadfont |
| 1881 | </para> |
| 1882 | |
| 1883 | <para> |
| 1884 | Load a console font from stdin. |
| 1885 | </para> |
| 1886 | |
| 1887 | <para> |
| 1888 | Example: |
| 1889 | </para> |
| 1890 | |
| 1891 | <para> |
| 1892 | <screen> |
| 1893 | $ loadfont < /etc/i18n/fontname |
| 1894 | </screen> |
| 1895 | </para> |
| 1896 | </sect1> |
| 1897 | |
| 1898 | <sect1 id="loadkmap"> |
| 1899 | <title>loadkmap</title> |
| 1900 | |
| 1901 | <para> |
| 1902 | Usage: loadkmap |
| 1903 | </para> |
| 1904 | |
| 1905 | <para> |
| 1906 | Load a binary keyboard translation table from stdin. |
| 1907 | </para> |
| 1908 | |
| 1909 | <para> |
| 1910 | Example: |
| 1911 | </para> |
| 1912 | |
| 1913 | <para> |
| 1914 | <screen> |
| 1915 | $ loadkmap < /etc/i18n/lang-keymap |
| 1916 | </screen> |
| 1917 | </para> |
| 1918 | </sect1> |
| 1919 | |
| 1920 | <sect1 id="logger"> |
| 1921 | <title>logger</title> |
| 1922 | |
| 1923 | <para> |
| 1924 | Usage: logger [OPTION]... [MESSAGE] |
| 1925 | </para> |
| 1926 | |
| 1927 | <para> |
Matt Kraai | 004827d | 2001-01-02 22:54:12 +0000 | [diff] [blame] | 1928 | Write MESSAGE to the system log. If MESSAGE is omitted, log |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 1929 | stdin. |
| 1930 | </para> |
| 1931 | |
| 1932 | <para> |
| 1933 | Options: |
| 1934 | </para> |
| 1935 | |
| 1936 | <para> |
| 1937 | <screen> |
| 1938 | -s Log to stderr as well as the system log |
| 1939 | -t Log using the specified tag (defaults to user name) |
| 1940 | -p Enter the message with the specified priority |
| 1941 | This may be numerical or a ``facility.level'' pair |
| 1942 | </screen> |
| 1943 | </para> |
| 1944 | |
| 1945 | <para> |
| 1946 | Example: |
| 1947 | </para> |
| 1948 | |
| 1949 | <para> |
| 1950 | <screen> |
| 1951 | $ logger "hello" |
| 1952 | </screen> |
| 1953 | </para> |
| 1954 | </sect1> |
| 1955 | |
| 1956 | <sect1 id="logname"> |
| 1957 | <title>logname</title> |
| 1958 | |
| 1959 | <para> |
| 1960 | Usage: logname |
| 1961 | </para> |
| 1962 | |
| 1963 | <para> |
| 1964 | Print the name of the current user. |
| 1965 | </para> |
| 1966 | |
| 1967 | <para> |
| 1968 | Example: |
| 1969 | </para> |
| 1970 | |
| 1971 | <para> |
| 1972 | <screen> |
| 1973 | $ logname |
| 1974 | root |
| 1975 | </screen> |
| 1976 | </para> |
| 1977 | </sect1> |
| 1978 | |
| 1979 | <sect1 id="ls"> |
| 1980 | <title>ls</title> |
| 1981 | |
| 1982 | <para> |
| 1983 | Usage: ls [OPTION]... [FILE]... |
| 1984 | </para> |
| 1985 | |
| 1986 | <para> |
| 1987 | |
| 1988 | </para> |
| 1989 | |
| 1990 | <para> |
| 1991 | Options: |
| 1992 | </para> |
| 1993 | |
| 1994 | <para> |
| 1995 | <screen> |
| 1996 | -a Do not hide entries starting with . |
| 1997 | -c With -l: show ctime (the time of last |
| 1998 | modification of file status information) |
| 1999 | -d List directory entries instead of contents |
| 2000 | -e List both full date and full time |
| 2001 | -l Use a long listing format |
| 2002 | -n List numeric UIDs and GIDs instead of names |
| 2003 | -p Append indicator (one of /=@|) to entries |
| 2004 | -u With -l: show access time (the time of last |
| 2005 | access of the file) |
| 2006 | -x List entries by lines instead of by columns |
| 2007 | -A Do not list implied . and .. |
| 2008 | -C List entries by columns |
| 2009 | -F Append indicator (one of */=@|) to entries |
Eric Andersen | 5b17693 | 2000-09-22 20:22:28 +0000 | [diff] [blame] | 2010 | -L list entries pointed to by symbolic links |
Eric Andersen | e5cec4e | 2000-07-06 19:59:22 +0000 | [diff] [blame] | 2011 | -R List subdirectories recursively |
| 2012 | </screen> |
| 2013 | </para> |
| 2014 | |
| 2015 | <para> |
| 2016 | Example: |
| 2017 | </para> |
| 2018 | |
| 2019 | <para> |
| 2020 | <screen> |
| 2021 | </screen> |
| 2022 | </para> |
| 2023 | </sect1> |
| 2024 | |
| 2025 | <sect1 id="lsmod"> |
| 2026 | <title>lsmod</title> |
| 2027 | |
| 2028 | <para> |
| 2029 | Usage: lsmod |
| 2030 | </para> |
| 2031 | |
| 2032 | <para> |
| 2033 | List currently loaded kernel modules. |
| 2034 | </para> |
| 2035 | </sect1> |
| 2036 | |
| 2037 | <sect1 id="makedevs"> |
| 2038 | <title>makedevs</title> |
| 2039 | |
| 2040 | <para> |
| 2041 | Usage: makedevsf NAME TYPE MAJOR MINOR FIRST LAST [s] |
| 2042 | </para> |
| 2043 | |
| 2044 | <para> |
| 2045 | Create a range of block or character special files. |
| 2046 | </para> |
| 2047 | |
| 2048 | <para> |
| 2049 | TYPE may be: |
| 2050 | </para> |
| 2051 | |
| 2052 | <para> |
| 2053 | <screen> |
| 2054 | b Make a block (buffered) device |
| 2055 | c or u Make a character (un-buffered) device |
| 2056 | p Make a named pipe. MAJOR and MINOR are ignored for named pipes |
| 2057 | </screen> |
| 2058 | </para> |
| 2059 | |
| 2060 | <para> |
| 2061 | FIRST specifies the number appended to NAME to create |
| 2062 | the first device. LAST specifies the number of the last |
| 2063 | item that should be created. If 's' is the last |
| 2064 | argument, the base device is created as well. |
| 2065 | </para> |
| 2066 | |
| 2067 | <para> |
| 2068 | Example: |
| 2069 | </para> |
| 2070 | |
| 2071 | <para> |
| 2072 | <screen> |
| 2073 | $ makedevs /dev/ttyS c 4 66 2 63 |
| 2074 | [creates ttyS2-ttyS63] |
| 2075 | $ makedevs /dev/hda b 3 0 0 8 s |
| 2076 | [creates hda,hda1-hda8] |
| 2077 | </screen> |
| 2078 | </para> |
| 2079 | </sect1> |
| 2080 | |
Eric Andersen | b9eb023 | 2000-07-07 05:04:24 +0000 | [diff] [blame] | 2081 | <sect1 id="md5sum"> |
| 2082 | <title>md5sum</title> |
| 2083 | |
| 2084 | <para> |
| 2085 | Usage: md5sum [OPTION]... FILE... |
| 2086 | </para> |
| 2087 | |
| 2088 | <para> |
| 2089 | Print or check MD5 checksums. |
| 2090 | </para> |
| 2091 | |
| 2092 | <para> |
| 2093 | Options: |
| 2094 | </para> |
| 2095 | |
| 2096 | <para> |
| 2097 | <screen> |
| 2098 | -b Read files in binary mode |
| 2099 | -c Check MD5 sums against given list |
| 2100 | -t Read files in text mode (default) |
| 2101 | -g Read a string |
| 2102 | </screen> |
| 2103 | </para> |
| 2104 | |
| 2105 | <para> |
| 2106 | The following two options are useful only when verifying |
| 2107 | checksums: |
| 2108 | </para> |
| 2109 | |
| 2110 | <para> |
| 2111 | <screen> |
| 2112 | -s Don't output anything, status code shows success |
| 2113 | -w Warn about improperly formated MD5 checksum lines |
| 2114 | </screen> |
| 2115 | </para> |
| 2116 | |
| 2117 | <para> |
| 2118 | Example: |
| 2119 | </para> |
| 2120 | |
| 2121 | <para> |
| 2122 | <screen> |
| 2123 | $ md5sum busybox |
| 2124 | 6fd11e98b98a58f64ff3398d7b324003 busybox |
| 2125 | $ md5sum -c |
| 2126 | 6fd11e98b98a58f64ff3398d7b324003 busybox |
| 2127 | 6fd11e98b98a58f64ff3398d7b324002 busybox |
| 2128 | md5sum: MD5 check failed for 'busybox' |
| 2129 | ^D |
| 2130 | </screen> |
| 2131 | </para> |
| 2132 | </sect1> |
| 2133 | |
| 2134 | <sect1 id="mkdir"> |
| 2135 | <title>mkdir</title> |
| 2136 | |
| 2137 | <para> |
| 2138 | Usage: mkdir [OPTION]... DIRECTORY... |
| 2139 | </para> |
| 2140 | |
| 2141 | <para> |
| 2142 | Create the DIRECTORY(s), if they do not already exist. |
| 2143 | </para> |
| 2144 | |
| 2145 | <para> |
| 2146 | Options: |
| 2147 | </para> |
| 2148 | |
| 2149 | <para> |
| 2150 | <screen> |
| 2151 | -m Set permission mode (as in chmod), not rwxrwxrwx - umask |
| 2152 | -p No error if directory exists, make parent directories as needed |
| 2153 | </screen> |
| 2154 | </para> |
| 2155 | |
| 2156 | <para> |
| 2157 | Example: |
| 2158 | </para> |
| 2159 | |
| 2160 | <para> |
| 2161 | <screen> |
| 2162 | $ mkdir /tmp/foo |
| 2163 | $ mkdir /tmp/foo |
| 2164 | /tmp/foo: File exists |
| 2165 | $ mkdir /tmp/foo/bar/baz |
| 2166 | /tmp/foo/bar/baz: No such file or directory |
| 2167 | $ mkdir -p /tmp/foo/bar/baz |
| 2168 | </screen> |
| 2169 | </para> |
| 2170 | </sect1> |
| 2171 | |
| 2172 | <sect1 id="mkfifo"> |
| 2173 | <title>mkfifo</title> |
| 2174 | |
| 2175 | <para> |
| 2176 | Usage: mkfifo [OPTION] NAME |
| 2177 | </para> |
| 2178 | |
| 2179 | <para> |
| 2180 | Create a named pipe (identical to 'mknod NAME p'). |
| 2181 | </para> |
| 2182 | |
| 2183 | <para> |
| 2184 | Options: |
| 2185 | </para> |
| 2186 | |
| 2187 | <para> |
| 2188 | <screen> |
| 2189 | -m MODE Create the pipe using the specified mode (default a=rw) |
| 2190 | </screen> |
| 2191 | </para> |
| 2192 | </sect1> |
| 2193 | |
| 2194 | <sect1 id="mkfs.minix"> |
| 2195 | <title>mkfs.minix</title> |
| 2196 | |
| 2197 | <para> |
| 2198 | Usage: mkfs.minix [OPTION]... NAME [BLOCKS] |
| 2199 | </para> |
| 2200 | |
| 2201 | <para> |
| 2202 | Make a MINIX filesystem. |
| 2203 | </para> |
| 2204 | |
| 2205 | <para> |
| 2206 | Options: |
| 2207 | </para> |
| 2208 | |
| 2209 | <para> |
| 2210 | <screen> |
| 2211 | -c Check the device for bad blocks |
| 2212 | -n [14|30] Specify the maximum length of filenames |
| 2213 | -i Specify the number of inodes for the filesystem |
| 2214 | -l FILENAME Read the bad blocks list from FILENAME |
| 2215 | -v Make a Minix version 2 filesystem |
| 2216 | </screen> |
| 2217 | </para> |
| 2218 | </sect1> |
| 2219 | |
| 2220 | <sect1 id="mknod"> |
| 2221 | <title>mknod</title> |
| 2222 | |
| 2223 | <para> |
| 2224 | Usage: mknod [OPTION]... NAME TYPE MAJOR MINOR |
| 2225 | </para> |
| 2226 | |
| 2227 | <para> |
| 2228 | Create a special file (block, character, or pipe). |
| 2229 | </para> |
| 2230 | |
| 2231 | <para> |
| 2232 | Options: |
| 2233 | </para> |
| 2234 | |
| 2235 | <para> |
| 2236 | <screen> |
| 2237 | -m Create the special file using the specified mode (default a=rw) |
| 2238 | </screen> |
| 2239 | </para> |
| 2240 | |
| 2241 | <para> |
| 2242 | TYPE may be: |
| 2243 | </para> |
| 2244 | |
| 2245 | <para> |
| 2246 | <screen> |
| 2247 | b Make a block (buffered) device |
| 2248 | c or u Make a character (un-buffered) device |
| 2249 | p Make a named pipe. MAJOR and MINOR are ignored for named pipes |
| 2250 | </screen> |
| 2251 | </para> |
| 2252 | |
| 2253 | <para> |
| 2254 | Example: |
| 2255 | </para> |
| 2256 | |
| 2257 | <para> |
| 2258 | <screen> |
| 2259 | $ mknod /dev/fd0 b 2 0 |
| 2260 | $ mknod -m 644 /tmp/pipe p |
| 2261 | </screen> |
| 2262 | </para> |
| 2263 | </sect1> |
| 2264 | |
| 2265 | <sect1 id="mkswap"> |
| 2266 | <title>mkswap</title> |
| 2267 | |
| 2268 | <para> |
| 2269 | Usage: mkswap [OPTION]... DEVICE [BLOCKS] |
| 2270 | </para> |
| 2271 | |
| 2272 | <para> |
| 2273 | Prepare a disk partition to be used as a swap partition. |
| 2274 | </para> |
| 2275 | |
| 2276 | <para> |
| 2277 | Options: |
| 2278 | </para> |
| 2279 | |
| 2280 | <para> |
| 2281 | <screen> |
| 2282 | -c Check for read-ability. |
| 2283 | -v0 Make version 0 swap [max 128 Megs]. |
| 2284 | -v1 Make version 1 swap [big!] (default for kernels > 2.1.117). |
| 2285 | BLOCKS Number of block to use (default is entire partition). |
| 2286 | </screen> |
| 2287 | </para> |
| 2288 | </sect1> |
| 2289 | |
| 2290 | <sect1 id="mktemp"> |
| 2291 | <title>mktemp</title> |
| 2292 | |
| 2293 | <para> |
| 2294 | Usage: mktemp TEMPLATE |
| 2295 | </para> |
| 2296 | |
| 2297 | <para> |
| 2298 | Creates a temporary file with its name based on |
Eric Andersen | 77d9268 | 2001-05-23 20:32:09 +0000 | [diff] [blame] | 2299 | TEMPLATE. TEMPLATE is any name with six `Xs' (i.e., |
Eric Andersen | b9eb023 | 2000-07-07 05:04:24 +0000 | [diff] [blame] | 2300 | /tmp/temp.XXXXXX). |
| 2301 | </para> |
| 2302 | |
| 2303 | <para> |
| 2304 | Example: |
| 2305 | </para> |
| 2306 | |
| 2307 | <para> |
| 2308 | <screen> |
| 2309 | $ mktemp /tmp/temp.XXXXXX |
| 2310 | /tmp/temp.mWiLjM |
| 2311 | $ ls -la /tmp/temp.mWiLjM |
| 2312 | -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM |
| 2313 | </screen> |
| 2314 | </para> |
| 2315 | </sect1> |
| 2316 | |
| 2317 | <sect1 id="more"> |
| 2318 | <title>more</title> |
| 2319 | |
| 2320 | <para> |
| 2321 | Usage: more [FILE]... |
| 2322 | </para> |
| 2323 | |
| 2324 | <para> |
| 2325 | Page through text one screenful at a time. |
| 2326 | </para> |
| 2327 | |
| 2328 | <para> |
| 2329 | Example: |
| 2330 | </para> |
| 2331 | |
| 2332 | <para> |
| 2333 | <screen> |
| 2334 | $ dmesg | more |
| 2335 | </screen> |
| 2336 | </para> |
| 2337 | </sect1> |
| 2338 | |
| 2339 | <sect1 id="mount"> |
| 2340 | <title>mount</title> |
| 2341 | |
| 2342 | <para> |
| 2343 | Usage: mount [OPTION]... |
| 2344 | </para> |
| 2345 | |
| 2346 | <para> |
| 2347 | <screen> |
| 2348 | or: mount [OPTION]... DEVICE DIRECTORY |
| 2349 | </screen> |
| 2350 | </para> |
| 2351 | |
| 2352 | <para> |
| 2353 | Mount filesystems. |
| 2354 | </para> |
| 2355 | |
| 2356 | <para> |
| 2357 | Options: |
| 2358 | </para> |
| 2359 | |
| 2360 | <para> |
| 2361 | <screen> |
| 2362 | -a Mount all filesystems in /etc/fstab |
| 2363 | -o One of the many filesystem options listed below |
| 2364 | -r Mount the filesystem read-only |
| 2365 | -t TYPE Specify the filesystem type |
| 2366 | -w Mount the filesystem read-write |
| 2367 | </screen> |
| 2368 | </para> |
| 2369 | |
| 2370 | <para> |
| 2371 | Options for use with the -o flag: |
| 2372 | </para> |
| 2373 | |
| 2374 | <para> |
| 2375 | <screen> |
| 2376 | async/sync Writes are asynchronous / synchronous |
| 2377 | atime/noatime Enable / disable updates to inode access times |
| 2378 | dev/nodev Allow / disallow use of special device files |
| 2379 | exec/noexec Allow / disallow use of executable files |
| 2380 | loop Mount a file via loop device |
| 2381 | suid/nosuid Allow / disallow set-user-id-root programs |
| 2382 | remount Remount a currently mounted filesystem |
| 2383 | ro/rw Mount filesystem read-only / read-write |
| 2384 | </screen> |
| 2385 | </para> |
| 2386 | |
| 2387 | <para> |
| 2388 | There are even more flags that are filesystem specific. |
| 2389 | You'll have to see the written documentation for those. |
| 2390 | </para> |
| 2391 | |
| 2392 | <para> |
| 2393 | Example: |
| 2394 | </para> |
| 2395 | |
| 2396 | <para> |
| 2397 | <screen> |
| 2398 | $ mount |
| 2399 | /dev/hda3 on / type minix (rw) |
| 2400 | proc on /proc type proc (rw) |
| 2401 | devpts on /dev/pts type devpts (rw) |
| 2402 | $ mount /dev/fd0 /mnt -t msdos -o ro |
| 2403 | $ mount /tmp/diskimage /opt -t ext2 -o loop |
| 2404 | </screen> |
| 2405 | </para> |
| 2406 | </sect1> |
| 2407 | |
| 2408 | <sect1 id="mt"> |
| 2409 | <title>mt</title> |
| 2410 | |
| 2411 | <para> |
| 2412 | Usage: mt [OPTION] OPCODE VALUE |
| 2413 | </para> |
| 2414 | |
| 2415 | <para> |
| 2416 | Control magnetic tape drive operation. |
| 2417 | </para> |
| 2418 | |
| 2419 | <para> |
| 2420 | Options: |
| 2421 | </para> |
| 2422 | |
| 2423 | <para> |
| 2424 | <screen> |
| 2425 | -f DEVICE Control DEVICE |
| 2426 | </screen> |
| 2427 | </para> |
| 2428 | </sect1> |
| 2429 | |
| 2430 | <sect1 id="mv"> |
| 2431 | <title>mv</title> |
| 2432 | |
| 2433 | <para> |
| 2434 | Usage: mv SOURCE DEST |
| 2435 | </para> |
| 2436 | |
| 2437 | <para> |
| 2438 | <screen> |
| 2439 | or: mv SOURCE... DIRECTORY |
| 2440 | </screen> |
| 2441 | </para> |
| 2442 | |
| 2443 | <para> |
| 2444 | Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. |
| 2445 | </para> |
| 2446 | |
| 2447 | <para> |
| 2448 | Example: |
| 2449 | </para> |
| 2450 | |
| 2451 | <para> |
| 2452 | <screen> |
| 2453 | $ mv /tmp/foo /bin/bar |
| 2454 | </screen> |
| 2455 | </para> |
| 2456 | </sect1> |
| 2457 | |
| 2458 | <sect1 id="nc"> |
| 2459 | <title>nc</title> |
| 2460 | |
| 2461 | <para> |
| 2462 | Usage: nc HOST PORT |
| 2463 | </para> |
| 2464 | |
| 2465 | <para> |
Matt Kraai | 1d70267 | 2001-02-07 04:09:23 +0000 | [diff] [blame] | 2466 | or: nc -p PORT -l |
| 2467 | </para> |
| 2468 | |
| 2469 | |
| 2470 | <para> |
| 2471 | Open a pipe to HOST:PORT or listen for a connection on PORT. |
Eric Andersen | b9eb023 | 2000-07-07 05:04:24 +0000 | [diff] [blame] | 2472 | </para> |
| 2473 | |
| 2474 | <para> |
| 2475 | Example: |
| 2476 | </para> |
| 2477 | |
| 2478 | <para> |
| 2479 | <screen> |
| 2480 | $ nc foobar.somedomain.com 25 |
| 2481 | 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600 |
| 2482 | help |
| 2483 | 214-Commands supported: |
| 2484 | 214- HELO EHLO MAIL RCPT DATA AUTH |
| 2485 | 214 NOOP QUIT RSET HELP |
| 2486 | quit |
| 2487 | 221 foobar closing connection |
| 2488 | </screen> |
| 2489 | </para> |
| 2490 | </sect1> |
| 2491 | |
| 2492 | <sect1 id="nslookup"> |
| 2493 | <title>nslookup</title> |
| 2494 | |
| 2495 | <para> |
| 2496 | Usage: nslookup [HOST] |
| 2497 | </para> |
| 2498 | |
| 2499 | <para> |
| 2500 | Query the nameserver for the IP address of the given |
| 2501 | HOST. |
| 2502 | </para> |
| 2503 | |
| 2504 | <para> |
| 2505 | Example: |
| 2506 | </para> |
| 2507 | |
| 2508 | <para> |
| 2509 | <screen> |
| 2510 | $ nslookup localhost |
| 2511 | Server: default |
| 2512 | Address: default |
| 2513 | |
| 2514 | Name: debian |
| 2515 | Address: 127.0.0.1 |
| 2516 | </screen> |
| 2517 | </para> |
| 2518 | </sect1> |
| 2519 | |
| 2520 | <sect1 id="ping"> |
| 2521 | <title>ping</title> |
| 2522 | |
| 2523 | <para> |
| 2524 | Usage: ping [OPTION]... HOST |
| 2525 | </para> |
| 2526 | |
| 2527 | <para> |
| 2528 | Send ICMP ECHO_REQUEST packets to HOST. |
| 2529 | </para> |
| 2530 | |
| 2531 | <para> |
| 2532 | Options: |
| 2533 | </para> |
| 2534 | |
| 2535 | <para> |
| 2536 | <screen> |
| 2537 | -c COUNT Send only COUNT pings |
| 2538 | -s SIZE Send SIZE data bytes in packets (default=56) |
| 2539 | -q Quiet mode, only displays output at start and when finished |
| 2540 | </screen> |
| 2541 | </para> |
| 2542 | |
| 2543 | <para> |
| 2544 | Example: |
| 2545 | </para> |
| 2546 | |
| 2547 | <para> |
| 2548 | <screen> |
| 2549 | $ ping localhost |
| 2550 | PING slag (127.0.0.1): 56 data bytes |
| 2551 | 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms |
| 2552 | |
| 2553 | --- debian ping statistics --- |
| 2554 | 1 packets transmitted, 1 packets received, 0% packet loss |
| 2555 | round-trip min/avg/max = 20.1/20.1/20.1 ms |
| 2556 | </screen> |
| 2557 | </para> |
| 2558 | </sect1> |
| 2559 | |
| 2560 | <sect1 id="poweroff"> |
| 2561 | <title>poweroff</title> |
| 2562 | |
| 2563 | <para> |
| 2564 | Usage: poweroff |
| 2565 | </para> |
| 2566 | |
| 2567 | <para> |
| 2568 | Shut down the system, and request that the kernel turn |
| 2569 | off power upon halting. |
| 2570 | </para> |
| 2571 | </sect1> |
| 2572 | |
| 2573 | <sect1 id="printf"> |
| 2574 | <title>printf</title> |
| 2575 | |
| 2576 | <para> |
| 2577 | Usage: printf FORMAT [ARGUMENT]... |
| 2578 | </para> |
| 2579 | |
| 2580 | <para> |
| 2581 | Format and print the given data in a manner similar to |
| 2582 | the C printf command. |
| 2583 | </para> |
| 2584 | |
| 2585 | <para> |
| 2586 | Example: |
| 2587 | </para> |
| 2588 | |
| 2589 | <para> |
| 2590 | <screen> |
| 2591 | $ printf "Val=%d\n" 5 |
| 2592 | Val=5 |
| 2593 | </screen> |
| 2594 | </para> |
| 2595 | </sect1> |
| 2596 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2597 | <sect1 id="ps"> |
| 2598 | <title>ps</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2599 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2600 | <para> |
| 2601 | Usage: ps |
| 2602 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2603 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2604 | <para> |
| 2605 | Report process status. This version of ps accepts no |
| 2606 | options. |
| 2607 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2608 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2609 | <para> |
| 2610 | Options: |
| 2611 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2612 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2613 | <para> |
| 2614 | <screen> |
| 2615 | </screen> |
| 2616 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2617 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2618 | <para> |
| 2619 | Example: |
| 2620 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2621 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2622 | <para> |
| 2623 | <screen> |
| 2624 | $ ps |
| 2625 | PID Uid Gid State Command |
| 2626 | 1 root root S init |
| 2627 | 2 root root S [kflushd] |
| 2628 | 3 root root S [kupdate] |
| 2629 | 4 root root S [kpiod] |
| 2630 | 5 root root S [kswapd] |
| 2631 | 742 andersen andersen S [bash] |
| 2632 | 743 andersen andersen S -bash |
| 2633 | 745 root root S [getty] |
| 2634 | 2990 andersen andersen R ps |
| 2635 | </screen> |
| 2636 | </para> |
| 2637 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2638 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2639 | <sect1 id="pwd"> |
| 2640 | <title>pwd</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2641 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2642 | <para> |
| 2643 | Usage: pwd |
| 2644 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2645 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2646 | <para> |
| 2647 | Print the full filename of the current working |
| 2648 | directory. |
| 2649 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2650 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2651 | <para> |
| 2652 | Example: |
| 2653 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2654 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2655 | <para> |
| 2656 | <screen> |
| 2657 | $ pwd |
| 2658 | /root |
| 2659 | </screen> |
| 2660 | </para> |
| 2661 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2662 | |
Eric Andersen | 918507e | 2000-08-21 22:46:33 +0000 | [diff] [blame] | 2663 | <sect1 id="rdate"> |
| 2664 | <title>rdate</title> |
| 2665 | |
| 2666 | <para> |
| 2667 | Usage: rdate [OPTION] HOST |
| 2668 | </para> |
| 2669 | |
| 2670 | <para> |
| 2671 | Get and possibly set the system date and time from a remote HOST. |
| 2672 | </para> |
| 2673 | |
| 2674 | <para> |
| 2675 | Options: |
| 2676 | </para> |
| 2677 | |
| 2678 | <para> |
| 2679 | <screen> |
| 2680 | -s Set the system date and time (default). |
| 2681 | -p Print the date and time. |
| 2682 | </screen> |
| 2683 | </para> |
| 2684 | </sect1> |
| 2685 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2686 | <sect1 id="reboot"> |
| 2687 | <title>reboot</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2688 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2689 | <para> |
| 2690 | Usage: reboot |
| 2691 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2692 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2693 | <para> |
| 2694 | Reboot the system. |
| 2695 | </para> |
| 2696 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2697 | |
Eric Andersen | bf960f5 | 2000-07-21 21:32:12 +0000 | [diff] [blame] | 2698 | <sect1 id="renice"> |
| 2699 | <title>renice</title> |
| 2700 | |
| 2701 | <para> |
| 2702 | Usage: renice priority pid [pid ...] |
| 2703 | </para> |
| 2704 | |
| 2705 | <para> |
| 2706 | Changes priority of running processes. Allowed priorities range |
| 2707 | from 20 (the process runs only when nothing else is running) to 0 |
| 2708 | (default priority) to -20 (almost nothing else ever gets to run). |
| 2709 | </para> |
| 2710 | </sect1> |
| 2711 | |
Eric Andersen | fa405d0 | 2000-08-21 21:18:52 +0000 | [diff] [blame] | 2712 | <sect1 id="reset"> |
| 2713 | <title>reset</title> |
| 2714 | |
| 2715 | <para> |
| 2716 | Usage: reset |
| 2717 | </para> |
| 2718 | |
| 2719 | <para> |
| 2720 | Resets the screen. |
| 2721 | </para> |
| 2722 | </sect1> |
| 2723 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2724 | <sect1 id="rm"> |
| 2725 | <title>rm</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2726 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2727 | <para> |
| 2728 | Usage: rm [OPTION]... FILE... |
| 2729 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2730 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2731 | <para> |
| 2732 | Remove (unlink) the FILE(s). You may use '--' to |
| 2733 | indicate that all following arguments are non-options. |
| 2734 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2735 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2736 | <para> |
| 2737 | Options: |
| 2738 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2739 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2740 | <para> |
| 2741 | <screen> |
Mark Whitley | e0bf91d | 2001-03-13 00:40:19 +0000 | [diff] [blame] | 2742 | -i Always prompt before removing each destinations |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2743 | -f Remove existing destinations, never prompt |
| 2744 | -r or -R Remove the contents of directories recursively |
| 2745 | </screen> |
| 2746 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2747 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2748 | <para> |
| 2749 | Example: |
| 2750 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2751 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2752 | <para> |
| 2753 | <screen> |
| 2754 | $ rm -rf /tmp/foo |
| 2755 | </screen> |
| 2756 | </para> |
| 2757 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2758 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2759 | <sect1 id="rmdir"> |
| 2760 | <title>rmdir</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2761 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2762 | <para> |
| 2763 | Usage: rmdir DIRECTORY... |
| 2764 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2765 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2766 | <para> |
| 2767 | Remove DIRECTORY(s) if they are empty. |
| 2768 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2769 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2770 | <para> |
| 2771 | Example: |
| 2772 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2773 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2774 | <para> |
| 2775 | <screen> |
| 2776 | $ rmdir /tmp/foo |
| 2777 | </screen> |
| 2778 | </para> |
| 2779 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2780 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2781 | <sect1 id="rmmod"> |
| 2782 | <title>rmmod</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2783 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2784 | <para> |
| 2785 | Usage: rmmod [OPTION]... [MODULE]... |
| 2786 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2787 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2788 | <para> |
| 2789 | Unload MODULE(s) from the kernel. |
| 2790 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2791 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2792 | <para> |
| 2793 | Options: |
| 2794 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2795 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2796 | <para> |
| 2797 | <screen> |
Tim Riker | cf93274 | 2002-12-14 01:58:59 +0000 | [diff] [blame] | 2798 | -a Remove all unused modules (recursively) |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2799 | </screen> |
| 2800 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2801 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2802 | <para> |
| 2803 | Example: |
| 2804 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2805 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2806 | <para> |
| 2807 | <screen> |
| 2808 | $ rmmod tulip |
| 2809 | </screen> |
| 2810 | </para> |
| 2811 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2812 | |
Eric Andersen | 6cf47a7 | 2001-10-31 10:24:36 +0000 | [diff] [blame] | 2813 | <sect1 id="run-parts"> |
| 2814 | <title>run-parts</title> |
| 2815 | |
| 2816 | <para> |
| 2817 | Usage: run-parts [-t] [-a ARG] [-u MASK] DIRECTORY |
| 2818 | </para> |
| 2819 | |
| 2820 | <para> |
| 2821 | Run a bunch of scripts in a directory. |
| 2822 | </para> |
| 2823 | |
| 2824 | <para> |
| 2825 | Options: |
| 2826 | </para> |
| 2827 | |
| 2828 | <para> |
| 2829 | <screen> |
| 2830 | -t Test only. It only print the file to be executed, |
| 2831 | without execute them. |
| 2832 | -a ARG Pass ARG as an a argument to the programs executed. |
| 2833 | -u MASK Set the umask to MASK before executing the programs. |
| 2834 | </screen> |
| 2835 | </para> |
| 2836 | </sect1> |
| 2837 | |
| 2838 | |
| 2839 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2840 | <sect1 id="sed"> |
| 2841 | <title>sed</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2842 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2843 | <para> |
| 2844 | Usage: sed [OPTION]... SCRIPT [FILE]... |
| 2845 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2846 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2847 | <para> |
| 2848 | Allowed sed scripts come in the following form: |
| 2849 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2850 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2851 | <para> |
| 2852 | <screen> |
| 2853 | ADDR [!] COMMAND |
| 2854 | </screen> |
| 2855 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2856 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2857 | <para> |
| 2858 | ADDR can be: |
| 2859 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2860 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2861 | <para> |
| 2862 | <screen> |
| 2863 | NUMBER Match specified line number |
| 2864 | $ Match last line |
| 2865 | /REGEXP/ Match specified regexp |
| 2866 | </screen> |
| 2867 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2868 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2869 | <para> |
| 2870 | ! inverts the meaning of the match |
| 2871 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2872 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2873 | <para> |
| 2874 | COMMAND can be: |
| 2875 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2876 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2877 | <para> |
| 2878 | <screen> |
| 2879 | s/regexp/replacement/[igp] |
| 2880 | which attempt to match regexp against the pattern space |
| 2881 | and if successful replaces the matched portion with replacement. |
| 2882 | aTEXT |
| 2883 | which appends TEXT after the pattern space |
| 2884 | </screen> |
| 2885 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2886 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2887 | <para> |
| 2888 | This version of sed matches full regular expressions. |
| 2889 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2890 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2891 | <para> |
| 2892 | Options: |
| 2893 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2894 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2895 | <para> |
| 2896 | <screen> |
| 2897 | -e Add the script to the commands to be executed |
| 2898 | -n Suppress automatic printing of pattern space |
| 2899 | </screen> |
| 2900 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2901 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2902 | <para> |
| 2903 | Example: |
| 2904 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2905 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2906 | <para> |
| 2907 | <screen> |
| 2908 | $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g' |
| 2909 | bar |
| 2910 | </screen> |
| 2911 | </para> |
| 2912 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2913 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2914 | <sect1 id="setkeycodes"> |
| 2915 | <title>setkeycodes</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2916 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2917 | <para> |
| 2918 | Usage: setkeycodes SCANCODE KEYCODE ... |
| 2919 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2920 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2921 | <para> |
| 2922 | Set entries into the kernel's scancode-to-keycode map, |
| 2923 | allowing unusual keyboards to generate usable keycodes. |
| 2924 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2925 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2926 | <para> |
| 2927 | SCANCODE may be either xx or e0xx (hexadecimal), and |
| 2928 | KEYCODE is given in decimal. |
| 2929 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2930 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2931 | <para> |
| 2932 | Example: |
| 2933 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2934 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2935 | <para> |
| 2936 | <screen> |
| 2937 | $ setkeycodes e030 127 |
| 2938 | </screen> |
| 2939 | </para> |
| 2940 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2941 | |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2942 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2943 | <sect1 id="sh"> |
| 2944 | <title>sh</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2945 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2946 | <para> |
| 2947 | Usage: sh |
| 2948 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2949 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2950 | <para> |
| 2951 | lash -- the BusyBox LAme SHell (command interpreter) |
| 2952 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2953 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2954 | <para> |
| 2955 | This command does not yet have proper documentation. |
| 2956 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2957 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2958 | <para> |
| 2959 | Use lash just as you would use any other shell. It |
| 2960 | properly handles pipes, redirects, job control, can be |
| 2961 | used as the shell for scripts (#!/bin/sh), and has a |
| 2962 | sufficient set of builtins to do what is needed. It does |
| 2963 | not (yet) support Bourne Shell syntax. If you need |
| 2964 | things like ``if-then-else'', ``while'', and such, use |
| 2965 | ash or bash. If you just need a very simple and |
| 2966 | extremely small shell, this will do the job. |
| 2967 | </para> |
| 2968 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2969 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2970 | <sect1 id="sleep"> |
| 2971 | <title>sleep</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2972 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2973 | <para> |
| 2974 | Usage: sleep N |
| 2975 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2976 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2977 | <para> |
| 2978 | Pause for N seconds. |
| 2979 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2980 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2981 | <para> |
| 2982 | Example: |
| 2983 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2984 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2985 | <para> |
| 2986 | <screen> |
| 2987 | $ sleep 2 |
| 2988 | [2 second delay results] |
| 2989 | </screen> |
| 2990 | </para> |
| 2991 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2992 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2993 | <sect1 id="sort"> |
| 2994 | <title>sort</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2995 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 2996 | <para> |
| 2997 | Usage: sort [OPTION]... [FILE]... |
| 2998 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 2999 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3000 | <para> |
| 3001 | Sort lines of text in FILE(s). |
| 3002 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3003 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3004 | <para> |
| 3005 | Options: |
| 3006 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3007 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3008 | <para> |
| 3009 | <screen> |
| 3010 | -n Compare numerically |
| 3011 | -r Reverse after sorting |
| 3012 | </screen> |
| 3013 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3014 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3015 | <para> |
| 3016 | Example: |
| 3017 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3018 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3019 | <para> |
| 3020 | <screen> |
| 3021 | $ echo -e "e\nf\nb\nd\nc\na" | sort |
| 3022 | a |
| 3023 | b |
| 3024 | c |
| 3025 | d |
| 3026 | e |
| 3027 | f |
| 3028 | </screen> |
| 3029 | </para> |
| 3030 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3031 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3032 | <sect1 id="swapoff"> |
| 3033 | <title>swapoff</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3034 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3035 | <para> |
| 3036 | Usage: swapoff [OPTION] [DEVICE] |
| 3037 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3038 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3039 | <para> |
| 3040 | Stop swapping virtual memory pages on DEVICE. |
| 3041 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3042 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3043 | <para> |
| 3044 | Options: |
| 3045 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3046 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3047 | <para> |
| 3048 | <screen> |
| 3049 | -a Stop swapping on all swap devices |
| 3050 | </screen> |
| 3051 | </para> |
| 3052 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3053 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3054 | <sect1 id="swapon"> |
| 3055 | <title>swapon</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3056 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3057 | <para> |
| 3058 | Usage: swapon [OPTION] [DEVICE] |
| 3059 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3060 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3061 | <para> |
| 3062 | Start swapping virtual memory pages on the given device. |
| 3063 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3064 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3065 | <para> |
| 3066 | Options: |
| 3067 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3068 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3069 | <para> |
| 3070 | <screen> |
| 3071 | -a Start swapping on all swap devices |
| 3072 | </screen> |
| 3073 | </para> |
| 3074 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3075 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3076 | <sect1 id="sync"> |
| 3077 | <title>sync</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3078 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3079 | <para> |
| 3080 | Usage: sync |
| 3081 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3082 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3083 | <para> |
| 3084 | Write all buffered filesystem blocks to disk. |
| 3085 | </para> |
| 3086 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3087 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3088 | <sect1 id="syslogd"> |
| 3089 | <title>syslogd</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3090 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3091 | <para> |
| 3092 | Usage: syslogd [OPTION]... |
| 3093 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3094 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3095 | <para> |
| 3096 | Linux system and kernel (provides klogd) logging |
| 3097 | utility. Note that this version of syslogd/klogd ignores |
| 3098 | /etc/syslog.conf. |
| 3099 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3100 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3101 | <para> |
| 3102 | Options: |
| 3103 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3104 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3105 | <para> |
| 3106 | <screen> |
| 3107 | -m NUM Interval between MARK lines (default=20min, 0=off) |
| 3108 | -n Run as a foreground process |
| 3109 | -K Do not start up the klogd process |
| 3110 | -O FILE Use an alternate log file (default=/var/log/messages) |
Eric Andersen | 70d09ed | 2000-12-11 16:24:16 +0000 | [diff] [blame] | 3111 | -R HOST[:PORT] Log remotely to IP or hostname on PORT (default PORT=514/UDP) |
Eric Andersen | 20c2bdd | 2000-12-11 19:39:25 +0000 | [diff] [blame] | 3112 | -L Log locally as well as network logging (default is network only) |
Robert Griebl | 2ab6ff9 | 2002-08-07 21:24:33 +0000 | [diff] [blame] | 3113 | -C Log to a circular buffer. Read this buffer using 'logread' |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3114 | </screen> |
| 3115 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3116 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3117 | <para> |
| 3118 | Example: |
| 3119 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3120 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3121 | <para> |
| 3122 | <screen> |
Eric Andersen | ced2cef | 2000-07-20 23:41:24 +0000 | [diff] [blame] | 3123 | $ syslogd -R masterlog:514 |
| 3124 | $ syslogd -R 192.168.1.1:601 |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3125 | </screen> |
| 3126 | </para> |
| 3127 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3128 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3129 | <sect1 id="tail"> |
| 3130 | <title>tail</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3131 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3132 | <para> |
| 3133 | Usage: tail [OPTION] [FILE]... |
| 3134 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3135 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3136 | <para> |
| 3137 | Print last 10 lines of each FILE to standard output. |
| 3138 | With more than one FILE, precede each with a header |
| 3139 | giving the file name. With no FILE, or when FILE is -, |
| 3140 | read stdin. |
| 3141 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3142 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3143 | <para> |
| 3144 | Options: |
| 3145 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3146 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3147 | <para> |
| 3148 | <screen> |
| 3149 | -n NUM Print last NUM lines instead of last 10 |
| 3150 | -f Output data as the file grows. This version |
| 3151 | of 'tail -f' supports only one file at a time. |
| 3152 | </screen> |
| 3153 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3154 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3155 | <para> |
| 3156 | Example: |
| 3157 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3158 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3159 | <para> |
| 3160 | <screen> |
| 3161 | $ tail -n 1 /etc/resolv.conf |
| 3162 | nameserver 10.0.0.1 |
| 3163 | </screen> |
| 3164 | </para> |
| 3165 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3166 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3167 | <sect1 id="tar"> |
| 3168 | <title>tar</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3169 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3170 | <para> |
| 3171 | Usage: tar [MODE] [OPTION] [FILE]... |
| 3172 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3173 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3174 | <para> |
| 3175 | |
| 3176 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3177 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3178 | <para> |
| 3179 | MODE may be chosen from |
| 3180 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3181 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3182 | <para> |
| 3183 | <screen> |
| 3184 | c Create |
| 3185 | x Extract |
| 3186 | t List |
| 3187 | </screen> |
| 3188 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3189 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3190 | <para> |
| 3191 | Options: |
| 3192 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3193 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3194 | <para> |
| 3195 | <screen> |
Eric Andersen | fdd5103 | 2000-08-02 18:48:26 +0000 | [diff] [blame] | 3196 | f FILE Use FILE for tarfile (or stdin if '-') |
| 3197 | O Extract to stdout |
| 3198 | exclude FILE File to exclude |
| 3199 | v List files processed |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3200 | </screen> |
| 3201 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3202 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3203 | <para> |
| 3204 | Example: |
| 3205 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3206 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3207 | <para> |
| 3208 | <screen> |
| 3209 | $ zcat /tmp/tarball.tar.gz | tar -xf - |
| 3210 | $ tar -cf /tmp/tarball.tar /usr/local |
| 3211 | </screen> |
| 3212 | </para> |
| 3213 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3214 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3215 | <sect1 id="tee"> |
| 3216 | <title>tee</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3217 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3218 | <para> |
| 3219 | Usage: tee [OPTION]... [FILE]... |
| 3220 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3221 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3222 | <para> |
| 3223 | Copy stdin to FILE(s), and also to stdout. |
| 3224 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3225 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3226 | <para> |
| 3227 | Options: |
| 3228 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3229 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3230 | <para> |
| 3231 | <screen> |
| 3232 | -a Append to the given FILEs, do not overwrite |
| 3233 | </screen> |
| 3234 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3235 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3236 | <para> |
| 3237 | Example: |
| 3238 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3239 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3240 | <para> |
| 3241 | <screen> |
| 3242 | $ echo "Hello" | tee /tmp/foo |
| 3243 | Hello |
| 3244 | $ cat /tmp/foo |
| 3245 | Hello |
| 3246 | </screen> |
| 3247 | </para> |
| 3248 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3249 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3250 | <sect1 id="telnet"> |
| 3251 | <title>telnet</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3252 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3253 | <para> |
| 3254 | Usage: telnet HOST [PORT] |
| 3255 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3256 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3257 | <para> |
| 3258 | Establish interactive communication with another |
| 3259 | computer over a network using the TELNET protocol. |
| 3260 | </para> |
| 3261 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3262 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3263 | <sect1 id="test"> |
| 3264 | <title>test, [</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3265 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3266 | <para> |
| 3267 | Usage: test EXPRESSION |
| 3268 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3269 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3270 | <para> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3271 | or: [ EXPRESSION ] |
Pavel Roskin | d2d3aa3 | 2000-09-15 17:16:40 +0000 | [diff] [blame] | 3272 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3273 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3274 | <para> |
| 3275 | Check file types and compare values returning an exit |
| 3276 | code determined by the value of EXPRESSION. |
| 3277 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3278 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3279 | <para> |
| 3280 | Example: |
| 3281 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3282 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3283 | <para> |
| 3284 | <screen> |
| 3285 | $ test 1 -eq 2 |
| 3286 | $ echo $? |
| 3287 | 1 |
| 3288 | $ test 1 -eq 1 |
| 3289 | $ echo $? |
| 3290 | 0 |
| 3291 | $ [ -d /etc ] |
| 3292 | $ echo $? |
| 3293 | 0 |
| 3294 | $ [ -d /junk ] |
| 3295 | $ echo $? |
| 3296 | 1 |
| 3297 | </screen> |
| 3298 | </para> |
| 3299 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3300 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3301 | <sect1 id="touch"> |
| 3302 | <title>touch</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3303 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3304 | <para> |
| 3305 | Usage: touch [OPTION]... FILE... |
| 3306 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3307 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3308 | <para> |
| 3309 | Update the last-modified date on (or create) FILE(s). |
| 3310 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3311 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3312 | <para> |
| 3313 | Options: |
| 3314 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3315 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3316 | <para> |
| 3317 | <screen> |
| 3318 | -c Do not create files |
| 3319 | </screen> |
| 3320 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3321 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3322 | <para> |
| 3323 | Example: |
| 3324 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3325 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3326 | <para> |
| 3327 | <screen> |
| 3328 | $ ls -l /tmp/foo |
| 3329 | /bin/ls: /tmp/foo: No such file or directory |
| 3330 | $ touch /tmp/foo |
| 3331 | $ ls -l /tmp/foo |
| 3332 | -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo |
| 3333 | </screen> |
| 3334 | </para> |
| 3335 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3336 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3337 | <sect1 id="tr"> |
| 3338 | <title>tr</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3339 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3340 | <para> |
| 3341 | Usage: tr [OPTION]... STRING1 [STRING2] |
| 3342 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3343 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3344 | <para> |
| 3345 | Translate, squeeze, and/or delete characters from stdin, |
| 3346 | writing to stdout. |
| 3347 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3348 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3349 | <para> |
| 3350 | Options: |
| 3351 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3352 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3353 | <para> |
| 3354 | <screen> |
| 3355 | -c Take complement of STRING1 |
| 3356 | -d Delete input characters coded STRING1 |
| 3357 | -s Squeeze multiple output characters of STRING2 into one character |
| 3358 | </screen> |
| 3359 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3360 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3361 | <para> |
| 3362 | Example: |
| 3363 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3364 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3365 | <para> |
| 3366 | <screen> |
| 3367 | $ echo "gdkkn vnqkc" | tr [a-y] [b-z] |
| 3368 | hello world |
| 3369 | </screen> |
| 3370 | </para> |
| 3371 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3372 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3373 | <sect1 id="true"> |
| 3374 | <title>true</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3375 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3376 | <para> |
| 3377 | Usage: true |
| 3378 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3379 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3380 | <para> |
| 3381 | Return an exit code of TRUE (1). |
| 3382 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3383 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3384 | <para> |
| 3385 | Example: |
| 3386 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3387 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3388 | <para> |
| 3389 | <screen> |
| 3390 | $ true |
| 3391 | $ echo $? |
| 3392 | 0 |
| 3393 | </screen> |
| 3394 | </para> |
| 3395 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3396 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3397 | <sect1 id="tty"> |
| 3398 | <title>tty</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3399 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3400 | <para> |
| 3401 | Usage: tty |
| 3402 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3403 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3404 | <para> |
| 3405 | Print the file name of the terminal connected to stdin. |
| 3406 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3407 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3408 | <para> |
| 3409 | Options: |
| 3410 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3411 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3412 | <para> |
| 3413 | <screen> |
| 3414 | -s Print nothing, only return an exit status |
| 3415 | </screen> |
| 3416 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3417 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3418 | <para> |
| 3419 | Example: |
| 3420 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3421 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3422 | <para> |
| 3423 | <screen> |
| 3424 | $ tty |
| 3425 | /dev/tty2 |
| 3426 | </screen> |
| 3427 | </para> |
| 3428 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3429 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3430 | <sect1 id="umount"> |
| 3431 | <title>umount</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3432 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3433 | <para> |
| 3434 | Usage: umount [OPTION]... DEVICE|DIRECTORY |
| 3435 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3436 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3437 | <para> |
| 3438 | |
| 3439 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3440 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3441 | <para> |
| 3442 | Options: |
| 3443 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3444 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3445 | <para> |
| 3446 | <screen> |
| 3447 | -a Unmount all file systems |
| 3448 | -r Try to remount devices as read-only if mount is busy |
Eric Andersen | 77d9268 | 2001-05-23 20:32:09 +0000 | [diff] [blame] | 3449 | -f Force filesystem umount (i.e., unreachable NFS server) |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3450 | -l Do not free loop device (if a loop device has been used) |
| 3451 | </screen> |
| 3452 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3453 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3454 | <para> |
| 3455 | Example: |
| 3456 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3457 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3458 | <para> |
| 3459 | <screen> |
| 3460 | $ umount /dev/hdc1 |
| 3461 | </screen> |
| 3462 | </para> |
| 3463 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3464 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3465 | <sect1 id="uname"> |
| 3466 | <title>uname</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3467 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3468 | <para> |
| 3469 | Usage: uname [OPTION]... |
| 3470 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3471 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3472 | <para> |
| 3473 | Print certain system information. With no OPTION, same |
| 3474 | as -s. |
| 3475 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3476 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3477 | <para> |
| 3478 | Options: |
| 3479 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3480 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3481 | <para> |
| 3482 | <screen> |
| 3483 | -a Print all information |
| 3484 | -m Print the machine (hardware) type |
| 3485 | -n Print the machine's network node hostname |
| 3486 | -r Print the operating system release |
| 3487 | -s Print the operating system name |
| 3488 | -p Print the host processor type |
| 3489 | -v Print the operating system version |
| 3490 | </screen> |
| 3491 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3492 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3493 | <para> |
| 3494 | Example: |
| 3495 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3496 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3497 | <para> |
| 3498 | <screen> |
| 3499 | $ uname -a |
| 3500 | Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown |
| 3501 | </screen> |
| 3502 | </para> |
| 3503 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3504 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3505 | <sect1 id="uniq"> |
| 3506 | <title>uniq</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3507 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3508 | <para> |
| 3509 | Usage: uniq [INPUT [OUTPUT]] |
| 3510 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3511 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3512 | <para> |
| 3513 | Discard all but one of successive identical lines from |
| 3514 | INPUT (or stdin), writing to OUTPUT (or stdout). |
| 3515 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3516 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3517 | <para> |
Eric Andersen | 5b5db38 | 2000-12-09 16:37:53 +0000 | [diff] [blame] | 3518 | Options: |
| 3519 | </para> |
| 3520 | |
| 3521 | <para> |
| 3522 | <screen> |
| 3523 | -c prefix lines by the number of occurrences |
| 3524 | -d only print duplicate lines |
| 3525 | -u only print unique lines |
| 3526 | </screen> |
| 3527 | </para> |
| 3528 | |
| 3529 | <para> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3530 | Example: |
| 3531 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3532 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3533 | <para> |
| 3534 | <screen> |
| 3535 | $ echo -e "a\na\nb\nc\nc\na" | sort | uniq |
| 3536 | a |
| 3537 | b |
| 3538 | c |
| 3539 | </screen> |
| 3540 | </para> |
| 3541 | </sect1> |
Eric Andersen | cff3fe3 | 2000-09-20 19:22:26 +0000 | [diff] [blame] | 3542 | |
| 3543 | <sect1 id="unix2dos"> |
| 3544 | <title>unix2dos</title> |
| 3545 | |
| 3546 | <para> |
| 3547 | Usage: unix2dos < unixfile > dosfile |
| 3548 | </para> |
| 3549 | |
| 3550 | <para> |
| 3551 | Converts a text file from unix format to dos format. |
| 3552 | </para> |
| 3553 | |
| 3554 | </sect1> |
| 3555 | |
| 3556 | <sect1 id="unrpm"> |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 3557 | <title>unrpm</title> |
Eric Andersen | cff3fe3 | 2000-09-20 19:22:26 +0000 | [diff] [blame] | 3558 | |
| 3559 | <para> |
| 3560 | Usage: unrpm < package.rpm | gzip -d | cpio -idmuv |
| 3561 | </para> |
| 3562 | |
| 3563 | <para> |
| 3564 | Extracts an rpm archive. |
| 3565 | </para> |
| 3566 | |
| 3567 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3568 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3569 | <sect1 id="update"> |
| 3570 | <title>update</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3571 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3572 | <para> |
| 3573 | Usage: update [OPTION]... |
| 3574 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3575 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3576 | <para> |
| 3577 | Periodically flush filesystem buffers. |
| 3578 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3579 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3580 | <para> |
| 3581 | Options: |
| 3582 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3583 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3584 | <para> |
| 3585 | <screen> |
| 3586 | -S Force use of sync(2) instead of flushing |
| 3587 | -s SECS Call sync this often (default 30) |
| 3588 | -f SECS Flush some buffers this often (default 5) |
| 3589 | </screen> |
| 3590 | </para> |
| 3591 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3592 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3593 | <sect1 id="uptime"> |
| 3594 | <title>uptime</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3595 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3596 | <para> |
| 3597 | Usage: uptime |
| 3598 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3599 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3600 | <para> |
| 3601 | Display how long the system has been running since boot. |
| 3602 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3603 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3604 | <para> |
| 3605 | Example: |
| 3606 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3607 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3608 | <para> |
| 3609 | <screen> |
| 3610 | $ uptime |
| 3611 | 1:55pm up 2:30, load average: 0.09, 0.04, 0.00 |
| 3612 | </screen> |
| 3613 | </para> |
| 3614 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3615 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3616 | <sect1 id="usleep"> |
| 3617 | <title>usleep</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3618 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3619 | <para> |
| 3620 | Usage: usleep N |
| 3621 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3622 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3623 | <para> |
| 3624 | Pause for N microseconds. |
| 3625 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3626 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3627 | <para> |
| 3628 | Example: |
| 3629 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3630 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3631 | <para> |
| 3632 | <screen> |
| 3633 | $ usleep 1000000 |
| 3634 | [pauses for 1 second] |
| 3635 | </screen> |
| 3636 | </para> |
| 3637 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3638 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3639 | <sect1 id="uudecode"> |
| 3640 | <title>uudecode</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3641 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3642 | <para> |
| 3643 | Usage: uudecode [OPTION] [FILE] |
| 3644 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3645 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3646 | <para> |
| 3647 | Uudecode a uuencoded file. |
| 3648 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3649 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3650 | <para> |
| 3651 | Options: |
| 3652 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3653 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3654 | <para> |
| 3655 | <screen> |
| 3656 | -o FILE Direct output to FILE |
| 3657 | </screen> |
| 3658 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3659 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3660 | <para> |
| 3661 | Example: |
| 3662 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3663 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3664 | <para> |
| 3665 | <screen> |
| 3666 | $ uudecode -o busybox busybox.uu |
| 3667 | $ ls -l busybox |
| 3668 | -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox |
| 3669 | </screen> |
| 3670 | </para> |
| 3671 | </sect1> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3672 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3673 | <sect1 id="uuencode"> |
| 3674 | <title>uuencode</title> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3675 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3676 | <para> |
| 3677 | Usage: uuencode [OPTION] [INFILE] OUTFILE |
| 3678 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3679 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3680 | <para> |
| 3681 | Uuencode a file. |
| 3682 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3683 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3684 | <para> |
| 3685 | Options: |
| 3686 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3687 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3688 | <para> |
| 3689 | <screen> |
| 3690 | -m Use base64 encoding as of RFC1521 |
| 3691 | </screen> |
| 3692 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3693 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3694 | <para> |
| 3695 | Example: |
| 3696 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3697 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3698 | <para> |
| 3699 | <screen> |
| 3700 | $ uuencode busybox busybox |
| 3701 | begin 755 busybox |
| 3702 | M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``& |
| 3703 | ..... |
| 3704 | $ uudecode busybox busybox > busybox.uu |
| 3705 | $ |
| 3706 | </screen> |
| 3707 | </para> |
| 3708 | </sect1> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3709 | |
Eric Andersen | ffde867 | 2001-01-25 23:40:32 +0000 | [diff] [blame] | 3710 | <sect1 id="watchdog"> |
| 3711 | <title>watchdog</title> |
| 3712 | |
| 3713 | <para> |
| 3714 | Usage: watchdog device |
| 3715 | </para> |
| 3716 | |
| 3717 | <para> |
| 3718 | Periodically writes to watchdog device B<device>. |
| 3719 | </para> |
| 3720 | </sect1> |
| 3721 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3722 | <sect1 id="wc"> |
| 3723 | <title>wc</title> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3724 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3725 | <para> |
| 3726 | Usage: wc [OPTION]... [FILE]... |
| 3727 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3728 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3729 | <para> |
| 3730 | Print line, word, and byte counts for each FILE, and a |
| 3731 | total line if more than one FILE is specified. With no |
| 3732 | FILE, read stdin. |
| 3733 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3734 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3735 | <para> |
| 3736 | Options: |
| 3737 | </para> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 3738 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3739 | <para> |
| 3740 | <screen> |
| 3741 | -c Print the byte counts |
| 3742 | -l Print the newline counts |
| 3743 | -L Print the length of the longest line |
| 3744 | -w Print the word counts |
| 3745 | </screen> |
| 3746 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3747 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3748 | <para> |
| 3749 | Example: |
| 3750 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3751 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3752 | <para> |
| 3753 | <screen> |
| 3754 | $ wc /etc/passwd |
| 3755 | 31 46 1365 /etc/passwd |
| 3756 | </screen> |
| 3757 | </para> |
| 3758 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3759 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3760 | <sect1 id="which"> |
| 3761 | <title>which</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3762 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3763 | <para> |
| 3764 | Usage: which [COMMAND]... |
| 3765 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3766 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3767 | <para> |
| 3768 | Locate COMMAND(s). |
| 3769 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3770 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3771 | <para> |
| 3772 | Example: |
| 3773 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3774 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3775 | <para> |
| 3776 | <screen> |
| 3777 | $ which login |
| 3778 | /bin/login |
| 3779 | </screen> |
| 3780 | </para> |
| 3781 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3782 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3783 | <sect1 id="whoami"> |
| 3784 | <title>whoami</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3785 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3786 | <para> |
| 3787 | Usage: whoami |
| 3788 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3789 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3790 | <para> |
| 3791 | Print the user name associated with the current |
| 3792 | effective user id. |
| 3793 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3794 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3795 | <para> |
| 3796 | Example: |
| 3797 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3798 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3799 | <para> |
| 3800 | <screen> |
| 3801 | $ whoami |
| 3802 | andersen |
| 3803 | </screen> |
| 3804 | </para> |
| 3805 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3806 | |
Eric Andersen | 5b17693 | 2000-09-22 20:22:28 +0000 | [diff] [blame] | 3807 | <sect1 id="xargs"> |
| 3808 | <title>xargs</title> |
| 3809 | |
| 3810 | <para> |
| 3811 | Usage: xargs [OPTIONS] [COMMAND] [ARGS...] |
| 3812 | </para> |
| 3813 | |
| 3814 | <para> |
| 3815 | Executes COMMAND on every item given by standard input. |
| 3816 | </para> |
| 3817 | |
| 3818 | <para> |
| 3819 | Options: |
| 3820 | </para> |
| 3821 | |
| 3822 | <para> |
| 3823 | <screen> |
| 3824 | -t Print the command just before it is run |
Eric Andersen | 5b17693 | 2000-09-22 20:22:28 +0000 | [diff] [blame] | 3825 | </screen> |
| 3826 | </para> |
| 3827 | |
| 3828 | |
| 3829 | <para> |
| 3830 | Example: |
| 3831 | </para> |
| 3832 | |
| 3833 | <para> |
| 3834 | <screen> |
| 3835 | $ ls | xargs gzip |
| 3836 | $ find . -name '*.c' -print | xargs rm |
| 3837 | </screen> |
| 3838 | </para> |
| 3839 | </sect1> |
| 3840 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3841 | <sect1 id="yes"> |
| 3842 | <title>yes</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3843 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3844 | <para> |
| 3845 | Usage: yes [STRING]... |
| 3846 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3847 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3848 | <para> |
| 3849 | Repeatedly output a line with all specified STRING(s), |
| 3850 | or `y'. |
| 3851 | </para> |
| 3852 | </sect1> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3853 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3854 | <sect1 id="zcat"> |
| 3855 | <title>zcat</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3856 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3857 | <para> |
| 3858 | Usage: zcat [OPTION]... FILE |
| 3859 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3860 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3861 | <para> |
| 3862 | Uncompress FILE (or stdin if FILE is '-') to stdout. |
| 3863 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3864 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3865 | <para> |
| 3866 | Options: |
| 3867 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3868 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3869 | <para> |
| 3870 | <screen> |
| 3871 | -t Test compressed file integrity |
| 3872 | </screen> |
| 3873 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3874 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3875 | <para> |
| 3876 | Example: |
| 3877 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3878 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3879 | <para> |
| 3880 | <screen> |
| 3881 | </screen> |
| 3882 | </para> |
| 3883 | </sect1> |
| 3884 | </chapter> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3885 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3886 | <chapter id="LIBC-NSS"> |
| 3887 | <title>LIBC NSS</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3888 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3889 | <para> |
| 3890 | GNU Libc uses the Name Service Switch (NSS) to configure the |
| 3891 | behavior of the C library for the local environment, and to |
| 3892 | configure how it reads system data, such as passwords and group |
| 3893 | information. BusyBox has made it Policy that it will never use |
| 3894 | NSS, and will never use libc calls that make use of NSS. This |
| 3895 | allows you to run an embedded system without the need for |
| 3896 | installing an /etc/nsswitch.conf file and without /lib/libnss_* |
| 3897 | libraries installed. |
| 3898 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3899 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3900 | <para> |
| 3901 | If you are using a system that is using a remote LDAP server for |
| 3902 | authentication via GNU libc NSS, and you want to use BusyBox, |
| 3903 | then you will need to adjust the BusyBox source. Chances are |
| 3904 | though, that if you have enough space to install of that stuff |
| 3905 | on your system, then you probably want the full GNU utilities. |
| 3906 | </para> |
| 3907 | </chapter> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3908 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3909 | <chapter id="SEE-ALSO"> |
| 3910 | <title>SEE ALSO</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3911 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3912 | <para> |
| 3913 | <literal>textutils(1),</literal> |
| 3914 | <literal>shellutils(1),</literal> |
| 3915 | etc... |
| 3916 | </para> |
| 3917 | </chapter> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3918 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3919 | <chapter id="MAINTAINER"> |
| 3920 | <title>MAINTAINER</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3921 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3922 | <para> |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 3923 | Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3924 | </para> |
| 3925 | </chapter> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3926 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3927 | <chapter id="AUTHORS"> |
| 3928 | <title>AUTHORS</title> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3929 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3930 | <para> |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 3931 | The following people have made significant contributions to |
| 3932 | BusyBox -- whether they know it or not. |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3933 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3934 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3935 | <para> |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 3936 | Erik Andersen <andersen@codepoet.org> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3937 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3938 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3939 | <para> |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 3940 | Edward Betts <edward@debian.org> |
| 3941 | </para> |
| 3942 | |
| 3943 | <para> |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 3944 | John Beppu <beppu@codepoet.org> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3945 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3946 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3947 | <para> |
| 3948 | Brian Candler <B.Candler@pobox.com> |
| 3949 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3950 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3951 | <para> |
| 3952 | Randolph Chung <tausq@debian.org> |
| 3953 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3954 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3955 | <para> |
| 3956 | Dave Cinege <dcinege@psychosis.com> |
| 3957 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3958 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3959 | <para> |
| 3960 | Karl M. Hegbloom <karlheg@debian.org> |
| 3961 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3962 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3963 | <para> |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 3964 | Daniel Jacobowitz <dan@debian.org> |
| 3965 | </para> |
| 3966 | |
| 3967 | <para> |
| 3968 | Matt Kraai <kraai@alumni.carnegiemellon.edu> |
| 3969 | </para> |
| 3970 | |
| 3971 | <para> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3972 | John Lombardo <john@deltanet.com> |
| 3973 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3974 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3975 | <para> |
| 3976 | Glenn McGrath <bug1@netconnect.com.au> |
| 3977 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3978 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3979 | <para> |
| 3980 | Bruce Perens <bruce@perens.com> |
| 3981 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3982 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3983 | <para> |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 3984 | Chip Rosenthal <chip@unicom.com>, <crosenth@covad.com> |
| 3985 | </para> |
| 3986 | |
| 3987 | <para> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3988 | Pavel Roskin <proski@gnu.org> |
| 3989 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3990 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3991 | <para> |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 3992 | Gyepi Sam <gyepi@praxis-sw.com> |
| 3993 | </para> |
| 3994 | |
| 3995 | <para> |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 3996 | Linus Torvalds <torvalds@transmeta.com> |
| 3997 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 3998 | |
John Beppu | 2aee993 | 2000-09-15 08:04:42 +0000 | [diff] [blame] | 3999 | <para> |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 4000 | Mark Whitley <markw@codepoet.org> |
John Beppu | 2aee993 | 2000-09-15 08:04:42 +0000 | [diff] [blame] | 4001 | </para> |
| 4002 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 4003 | <para> |
| 4004 | Charles P. Wright <cpwright@villagenet.com> |
| 4005 | </para> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 4006 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 4007 | <para> |
| 4008 | Enrique Zanardi <ezanardi@ull.es> |
| 4009 | </para> |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 4010 | |
Eric Andersen | fb74a45 | 2001-12-18 14:06:03 +0000 | [diff] [blame] | 4011 | <para> |
| 4012 | Vladimir Oleynik <dzo@simtreas.ru> |
| 4013 | </para> |
| 4014 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 4015 | |
Eric Andersen | 2158092 | 2000-07-07 19:07:47 +0000 | [diff] [blame] | 4016 | </chapter> |
Mark Whitley | 83a949c | 2000-06-26 13:31:53 +0000 | [diff] [blame] | 4017 | </book> <!-- End of the book --> |