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