blob: 62ef4e325e46d58cf1c7561320c29b0f3d12e01e [file] [log] [blame]
Eric Andersencff3fe32000-09-20 19:22:26 +00001<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ ]>
Eric Andersen53310252000-07-04 19:42:23 +00002<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 Whitley83a949c2000-06-26 13:31:53 +000035
Eric Andersen53310252000-07-04 19:42:23 +000036<toc></toc>
37 <chapter id="Introduction">
38 <title>Introduction</title>
Mark Whitley83a949c2000-06-26 13:31:53 +000039
Eric Andersen53310252000-07-04 19:42:23 +000040 <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 Whitley83a949c2000-06-26 13:31:53 +000050
Eric Andersen53310252000-07-04 19:42:23 +000051 <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 Whitley83a949c2000-06-26 13:31:53 +000059
Eric Andersen53310252000-07-04 19:42:23 +000060 <chapter id="Syntax">
61 <title>How to use BusyBox</title>
Pavel Roskind2d3aa32000-09-15 17:16:40 +000062 <sect1 id="How-to-use-BusyBox">
63 <title>Syntax</title>
Mark Whitley83a949c2000-06-26 13:31:53 +000064
Eric Andersen53310252000-07-04 19:42:23 +000065 <para>
66 <screen>
67 BusyBox &lt;function&gt; [arguments...] # or
68 </screen>
69 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +000070
Eric Andersen53310252000-07-04 19:42:23 +000071 <para>
72 <screen>
73 &lt;function&gt; [arguments...] # if symlinked
74 </screen>
75 </para>
76 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +000077
Pavel Roskind2d3aa32000-09-15 17:16:40 +000078 <sect1 id="Invoking-BusyBox">
79 <title>Invoking BusyBox</title>
80
Eric Andersen53310252000-07-04 19:42:23 +000081 <para>
82 When you create a link to BusyBox for the function you wish to use, when
83 BusyBox is called using that link it will behave as if the command itself
84 has been invoked.
85 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +000086
Eric Andersen53310252000-07-04 19:42:23 +000087 <para>
88 For example, entering
89 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +000090
Eric Andersen53310252000-07-04 19:42:23 +000091 <para>
92 <screen>
93 ln -s ./BusyBox ls
94 ./ls
95 </screen>
96 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +000097
Eric Andersen53310252000-07-04 19:42:23 +000098 <para>
99 will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
100 into BusyBox).
101 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000102
Eric Andersen53310252000-07-04 19:42:23 +0000103 <para>
104 You can also invoke BusyBox by issuing the command as an argument on the
105 command line. For example, entering
106 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000107
Eric Andersen53310252000-07-04 19:42:23 +0000108 <para>
109 <screen>
110 ./BusyBox ls
111 </screen>
112 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000113
Eric Andersen53310252000-07-04 19:42:23 +0000114 <para>
115 will also cause BusyBox to behave as 'ls'.
116 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000117
Eric Andersen53310252000-07-04 19:42:23 +0000118 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000119
Pavel Roskind2d3aa32000-09-15 17:16:40 +0000120 <sect1 id="Common-options">
121 <title>Common options</title>
122
Eric Andersen53310252000-07-04 19:42:23 +0000123 <para>
124 Most BusyBox commands support the <emphasis>--help</emphasis> option to provide
125 a terse runtime description of their behavior.
126 </para>
127 </sect1>
128 </chapter>
Mark Whitley83a949c2000-06-26 13:31:53 +0000129
Eric Andersen53310252000-07-04 19:42:23 +0000130 <chapter id="Commands">
131 <title>BusyBox Commands</title>
Pavel Roskind2d3aa32000-09-15 17:16:40 +0000132 <sect1 id="Available-BusyBox-Commands">
Eric Andersen53310252000-07-04 19:42:23 +0000133 <title>Available BusyBox Commands</title>
134 <para>
135 Currently defined functions include:
136 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000137
Eric Andersen53310252000-07-04 19:42:23 +0000138 <para>
Eric Andersen61dc0572000-07-11 17:29:36 +0000139 ar, basename, cat, chgrp, chmod, chown, chroot, chvt, clear,
140 cp, cut, date, dc, dd, deallocvt, df, dirname, dmesg, du,
141 dumpkmap, dutmp, echo, false, fbset, fdflush, find, free,
142 freeramdisk, fsck.minix, grep, gunzip, gzip, halt, head,
143 hostid, hostname, id, init, insmod, kill, killall, length, ln,
144 loadacm, loadfont, loadkmap, logger, logname, ls, lsmod,
145 makedevs, mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp,
146 more, mount, mt, mv, nc, nslookup, ping, poweroff, printf, ps,
Eric Andersenfa405d02000-08-21 21:18:52 +0000147 pwd, reboot, renice, reset, rm, rmdir, rmmod, sed, setkeycodes, sh, sleep,
Eric Andersen61dc0572000-07-11 17:29:36 +0000148 sort, swapoff, swapon, sync, syslogd, tail, tar, tee, telnet,
149 test, touch, tr, true, tty, umount, uname, uniq, update,
150 uptime, usleep, uudecode, uuencode, wc, which, whoami, yes,
151 zcat, [
Eric Andersen53310252000-07-04 19:42:23 +0000152 </para>
153 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000154
Eric Andersen53310252000-07-04 19:42:23 +0000155 <sect1 id="ar">
156 <title>ar</title>
Mark Whitley83a949c2000-06-26 13:31:53 +0000157
Eric Andersen53310252000-07-04 19:42:23 +0000158 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000159 Usage: ar [OPTION] archive [FILENAME]...
Eric Andersen53310252000-07-04 19:42:23 +0000160 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000161
Eric Andersen53310252000-07-04 19:42:23 +0000162 <para>
163 Extract or list files from an ar archive.
164 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000165
Eric Andersen53310252000-07-04 19:42:23 +0000166 <para>
167 Options:
168 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000169
Eric Andersen53310252000-07-04 19:42:23 +0000170 <para>
171 <screen>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000172 o Preserve original dates
173 p Extract to stdout
174 t List
175 x Extract
176 v Verbosely list files processed
Eric Andersen53310252000-07-04 19:42:23 +0000177 </screen>
178 </para>
179 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000180
Eric Andersen53310252000-07-04 19:42:23 +0000181 <sect1 id="basename">
182 <title>basename</title>
183 <para>
184 Usage: basename FILE [SUFFIX]
185 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000186
Eric Andersen53310252000-07-04 19:42:23 +0000187 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000188 Strip directory path and suffixes from FILE. If specified, also removes
Eric Andersen53310252000-07-04 19:42:23 +0000189 any trailing SUFFIX.
190 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000191
Eric Andersen53310252000-07-04 19:42:23 +0000192 <para>
193 Example:
194 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000195
Eric Andersen53310252000-07-04 19:42:23 +0000196 <para>
197 <screen>
198 $ basename /usr/local/bin/foo
199 foo
200 $ basename /usr/local/bin/
201 bin
202 $ basename /foo/bar.txt .txt
203 bar
204 </screen>
205 </para>
206 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000207
Eric Andersen53310252000-07-04 19:42:23 +0000208 <sect1 id="cat">
209 <title>cat</title>
Mark Whitley83a949c2000-06-26 13:31:53 +0000210
Eric Andersen53310252000-07-04 19:42:23 +0000211 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000212 Usage: cat [FILE]...
Eric Andersen53310252000-07-04 19:42:23 +0000213 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000214
Eric Andersen53310252000-07-04 19:42:23 +0000215 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000216 Concatenate <literal>FILE(s)</literal> and prints them to the standard
Eric Andersen53310252000-07-04 19:42:23 +0000217 output.
218 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000219
Eric Andersen53310252000-07-04 19:42:23 +0000220 <para>
221 Example:
222 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000223
Eric Andersen53310252000-07-04 19:42:23 +0000224 <para>
225 <screen>
226 $ cat /proc/uptime
227 110716.72 17.67
228 </screen>
229 </para>
Eric Andersen53310252000-07-04 19:42:23 +0000230 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000231
Eric Andersen028fb622000-07-04 20:07:13 +0000232 <sect1 id="chgrp">
233 <title>chgrp</title>
Mark Whitley83a949c2000-06-26 13:31:53 +0000234
Eric Andersen028fb622000-07-04 20:07:13 +0000235 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000236 Usage: chgrp [OPTION]... GROUP FILE...
Eric Andersen028fb622000-07-04 20:07:13 +0000237 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000238
Eric Andersen028fb622000-07-04 20:07:13 +0000239 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000240 Change the group membership of each FILE to GROUP.
Eric Andersen028fb622000-07-04 20:07:13 +0000241 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000242
Eric Andersen028fb622000-07-04 20:07:13 +0000243 <para>
244 Options:
245 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000246
Eric Andersen028fb622000-07-04 20:07:13 +0000247 <para>
248 <screen>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000249 -R Change files and directories recursively
250 </screen>
251 </para>
252
253 <para>
254 Example:
255 </para>
256
257 <para>
258 <screen>
259 $ ls -l /tmp/foo
260 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
261 $ chgrp root /tmp/foo
262 $ ls -l /tmp/foo
263 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
264 </screen>
265 </para>
266 </sect1>
267
268 <sect1 id="chmod">
269 <title>chmod</title>
270
271 <para>
272 Usage: chmod [<emphasis>-R</emphasis>] MODE[,MODE]... FILE...
273 </para>
274
275 <para>
276 Change file access permissions for the specified
277 <literal>FILE(s)</literal> (or directories). Each MODE is defined by
278 combining the letters for WHO has access to the file, an OPERATOR for
279 selecting how the permissions should be changed, and a PERMISSION for
280 <literal>FILE(s)</literal> (or directories).
281 </para>
282
283 <para>
284 WHO may be chosen from
285 </para>
286
287 <para>
288 <screen>
289 u User who owns the file
290 g Users in the file's Group
291 o Other users not in the file's group
292 a All users
293 </screen>
294 </para>
295
296 <para>
297 OPERATOR may be chosen from
298 </para>
299
300 <para>
301 <screen>
302 + Add a permission
303 - Remove a permission
304 = Assign a permission
305 </screen>
306 </para>
307
308 <para>
309 PERMISSION may be chosen from
310 </para>
311
312 <para>
313 <screen>
314 r Read
315 w Write
316 x Execute (or access for directories)
317 s Set user (or group) ID bit
318 t Sticky bit (for directories prevents removing files by non-owners)
319 </screen>
320 </para>
321
322 <para>
323 Alternately, permissions can be set numerically where the first three
324 numbers are calculated by adding the octal values, such as
325 </para>
326
327 <para>
328 <screen>
329 4 Read
330 2 Write
331 1 Execute
332 </screen>
333 </para>
334
335 <para>
336 An optional fourth digit can also be used to specify
337 </para>
338
339 <para>
340 <screen>
341 4 Set user ID
342 2 Set group ID
343 1 Sticky bit
344 </screen>
345 </para>
346
347 <para>
348 Options:
349 </para>
350
351 <para>
352 <screen>
353 -R Change files and directories recursively.
354 </screen>
355 </para>
356
357 <para>
358 Example:
359 </para>
360
361 <para>
362 <screen>
363 $ ls -l /tmp/foo
364 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
365 $ chmod u+x /tmp/foo
366 $ ls -l /tmp/foo
367 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
368 $ chmod 444 /tmp/foo
369 $ ls -l /tmp/foo
370 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
371 </screen>
372 </para>
373 </sect1>
374
375 <sect1 id="chown">
376 <title>chown</title>
377 <para>
378 Usage: chown [OPTION]... OWNER[&lt;.|:&gt;[GROUP] FILE...
379 </para>
380
381 <para>
382 Change the owner and/or group of each FILE to OWNER and/or GROUP.
383 </para>
384
385 <para>
386 Options:
387 </para>
388
389 <para>
390 <screen>
391 -R Change files and directories recursively
Eric Andersen028fb622000-07-04 20:07:13 +0000392 </screen>
393 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000394
Eric Andersen028fb622000-07-04 20:07:13 +0000395 <para>
396 Example:
397 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000398
Eric Andersen028fb622000-07-04 20:07:13 +0000399 <para>
400 <screen>
401 $ ls -l /tmp/foo
402 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
403 $ chown root /tmp/foo
404 $ ls -l /tmp/foo
405 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
406 $ chown root.root /tmp/foo
407 ls -l /tmp/foo
408 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
409 </screen>
410 </para>
411 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000412
Eric Andersen028fb622000-07-04 20:07:13 +0000413 <sect1 id="chroot">
414 <title>chroot</title>
415 <para>
416 Usage: chroot NEWROOT [COMMAND...]
417 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000418
Eric Andersen028fb622000-07-04 20:07:13 +0000419 <para>
420 Run COMMAND with root directory set to NEWROOT.
421 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000422
Eric Andersen028fb622000-07-04 20:07:13 +0000423 <para>
424 Example:
425 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000426
Eric Andersen028fb622000-07-04 20:07:13 +0000427 <para>
428 <screen>
429 $ ls -l /bin/ls
430 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -&gt; /BusyBox
431 $ mount /dev/hdc1 /mnt -t minix
432 $ chroot /mnt
433 $ ls -l /bin/ls
434 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
435 </screen>
436 </para>
437 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000438
Eric Andersen028fb622000-07-04 20:07:13 +0000439 <sect1 id="chvt">
440 <title>chvt</title>
441 <para>
442 Usage: chvt N
443 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000444
Eric Andersen028fb622000-07-04 20:07:13 +0000445 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000446 Change the foreground virtual terminal to /dev/ttyN
Eric Andersen028fb622000-07-04 20:07:13 +0000447 </para>
448 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000449
Eric Andersen028fb622000-07-04 20:07:13 +0000450 <sect1 id="clear">
451 <title>clear</title>
Mark Whitley83a949c2000-06-26 13:31:53 +0000452
Eric Andersen028fb622000-07-04 20:07:13 +0000453 <para>
454 Usage: clear
455 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000456
Eric Andersen028fb622000-07-04 20:07:13 +0000457 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000458 Clear the screen.
Eric Andersen028fb622000-07-04 20:07:13 +0000459 </para>
460 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000461
Eric Andersen028fb622000-07-04 20:07:13 +0000462 <sect1 id="cp">
463 <title>cp</title>
Mark Whitley83a949c2000-06-26 13:31:53 +0000464
Eric Andersen028fb622000-07-04 20:07:13 +0000465 <para>
466 Usage: cp [OPTION]... SOURCE DEST
467 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000468
Eric Andersen028fb622000-07-04 20:07:13 +0000469 <para>
470 <screen>
471 or: cp [OPTION]... SOURCE... DIRECTORY
472 </screen>
473 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000474
Eric Andersen028fb622000-07-04 20:07:13 +0000475 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000476 Copy SOURCE to DEST, or multiple <literal>SOURCE(s)</literal> to
Eric Andersen028fb622000-07-04 20:07:13 +0000477 DIRECTORY.
478 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000479
Eric Andersen028fb622000-07-04 20:07:13 +0000480 <para>
481 Options:
482 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000483
Eric Andersen028fb622000-07-04 20:07:13 +0000484 <para>
485 <screen>
486 -a Same as -dpR
Eric Andersen6f5e2812000-07-06 16:58:45 +0000487 -d Preserve links
488 -p Preserve file attributes if possible
489 -R Copy directories recursively
Eric Andersen028fb622000-07-04 20:07:13 +0000490 </screen>
491 </para>
492 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000493
Eric Andersen028fb622000-07-04 20:07:13 +0000494 <sect1 id="cut">
495 <title>cut</title>
Mark Whitley83a949c2000-06-26 13:31:53 +0000496
Eric Andersen028fb622000-07-04 20:07:13 +0000497 <para>
498 Usage: cut [OPTION]... [FILE]...
499 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000500
Eric Andersen028fb622000-07-04 20:07:13 +0000501 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000502 Print selected fields from each input FILE to standard output.
Eric Andersen028fb622000-07-04 20:07:13 +0000503 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000504
Eric Andersen028fb622000-07-04 20:07:13 +0000505 <para>
506 Options:
507 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000508
Eric Andersen028fb622000-07-04 20:07:13 +0000509 <para>
510 <screen>
511 -b LIST Output only bytes from LIST
512 -c LIST Output only characters from LIST
513 -d CHAR Use CHAR instead of tab as the field delimiter
Pavel Roskin0010ee42000-07-21 15:10:57 +0000514 -s Output only the lines containing delimiter
Eric Andersen028fb622000-07-04 20:07:13 +0000515 -f N Print only these fields
516 -n Ignored
517 </screen>
518 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000519
Eric Andersen028fb622000-07-04 20:07:13 +0000520 <para>
521 Example:
522 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000523
Eric Andersen028fb622000-07-04 20:07:13 +0000524 <para>
525 <screen>
526 $ echo "Hello world" | cut -f 1 -d ' '
527 Hello
528 $ echo "Hello world" | cut -f 2 -d ' '
529 world
530 </screen>
531 </para>
532 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000533
Eric Andersen028fb622000-07-04 20:07:13 +0000534 <sect1 id="date">
535 <title>date</title>
Mark Whitley83a949c2000-06-26 13:31:53 +0000536
Eric Andersen028fb622000-07-04 20:07:13 +0000537 <para>
538 Usage: date [OPTION]... [+FORMAT]
539 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000540
Eric Andersen028fb622000-07-04 20:07:13 +0000541 <para>
542 <screen>
543 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
544 </screen>
545 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000546
Eric Andersen028fb622000-07-04 20:07:13 +0000547 <para>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000548 Display the current time in the given FORMAT, or set the system date.
Eric Andersen028fb622000-07-04 20:07:13 +0000549 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000550
Eric Andersen028fb622000-07-04 20:07:13 +0000551 <para>
552 Options:
553 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000554
Eric Andersen028fb622000-07-04 20:07:13 +0000555 <para>
556 <screen>
Eric Andersen6f5e2812000-07-06 16:58:45 +0000557 -R Output RFC-822 compliant date string
558 -s Set time described by STRING
559 -u Print or set Coordinated Universal Time
Eric Andersen028fb622000-07-04 20:07:13 +0000560 </screen>
561 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000562
Eric Andersen028fb622000-07-04 20:07:13 +0000563 <para>
564 Example:
565 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +0000566
Eric Andersen028fb622000-07-04 20:07:13 +0000567 <para>
568 <screen>
569 $ date
570 Wed Apr 12 18:52:41 MDT 2000
571 </screen>
572 </para>
573 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000574
Eric Andersen6f5e2812000-07-06 16:58:45 +0000575 <sect1 id="dc">
576 <title>dc</title>
Mark Whitley83a949c2000-06-26 13:31:53 +0000577
Eric Andersen6f5e2812000-07-06 16:58:45 +0000578 <para>
579 Usage: dc [EXPRESSION]
580 </para>
581
582 <para>
583 This is a Tiny RPN calculator that understands the
584 following operations: +, -, /, *, and, or, not, eor. If
585 no arguments are given, dc will process input from
586 stdin.
587 </para>
588
589 <para>
590 The behaviour of BusyBox/dc deviates (just a little ;-)
591 from GNU/dc, but this will be remedied in the future.
592 </para>
593
594 <para>
595 Example:
596 </para>
597
598 <para>
599 <screen>
600 $ dc 2 2 +
601 4
602 $ dc 8 8 \* 2 2 + /
603 16
604 $ dc 0 1 and
605 0
606 $ dc 0 1 or
607 1
608 $ echo 72 9 div 8 mul | dc
609 64
610 </screen>
611 </para>
612 </sect1>
613
614 <sect1 id="dd">
615 <title>dd</title>
616
617 <para>
618 Usage: dd [OPTION]...
619 </para>
620
621 <para>
622 Copy a file, converting and formatting according to
623 options.
624 </para>
625
626 <para>
627 Options:
628 </para>
629
630 <para>
631 <screen>
632 if=FILE Read from FILE instead of stdin
633 of=FILE Write to FILE instead of stdout
634 bs=N Read and write N bytes at a time
635 count=N Copy only N input blocks
636 skip=N Skip N input blocks
637 seek=N Skip N output blocks
638 </screen>
639 </para>
640
641 <para>
642 Numbers may be suffixed by w (x2), k (x1024), b (x512),
643 or M (x1024^2).
644 </para>
645
646 <para>
647 Example:
648 </para>
649
650 <para>
651 <screen>
652 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
653 4+0 records in
654 4+0 records out
655 </screen>
656 </para>
657 </sect1>
658
659 <sect1 id="deallocvt">
660 <title>deallocvt</title>
661
662 <para>
663 Usage: deallocvt N
664 </para>
665
666 <para>
667 Deallocate unused virtual terminal /dev/ttyN.
668 </para>
669 </sect1>
670
671 <sect1 id="df">
672 <title>df</title>
673
674 <para>
675 Usage: df [FILE]...
676 </para>
677
678 <para>
679 Print the filesystem space used and space available.
680 </para>
681
682 <para>
683 Example:
684 </para>
685
686 <para>
687 <screen>
688 $ df
689 Filesystem 1k-blocks Used Available Use% Mounted on
690 /dev/sda3 8690864 8553540 137324 98% /
691 /dev/sda1 64216 36364 27852 57% /boot
692 $ df /dev/sda3
693 Filesystem 1k-blocks Used Available Use% Mounted on
694 /dev/sda3 8690864 8553540 137324 98% /
695 </screen>
696 </para>
697 </sect1>
698
699 <sect1 id="dirname">
700 <title>dirname</title>
701
702 <para>
703 Usage: dirname NAME
704 </para>
705
706 <para>
707 Strip non-directory suffix from NAME.
708 </para>
709
710 <para>
711 Example:
712 </para>
713
714 <para>
715 <screen>
716 $ dirname /tmp/foo
717 /tmp
718 $ dirname /tmp/foo/
719 /tmp
720 </screen>
721 </para>
722 </sect1>
723
724 <sect1 id="dmesg">
725 <title>dmesg</title>
726
727 <para>
728 Usage: dmesg [OPTION]...
729 </para>
730
731 <para>
732 Print or control the kernel ring buffer.
733 </para>
734
735 <para>
736 Options:
737 </para>
738
739 <para>
740 <screen>
741 -c Clear the ring buffer after printing
742 -n LEVEL Set the console logging level to LEVEL
743 -s BUFSIZE Query ring buffer using a buffer of BUFSIZE
744 </screen>
745 </para>
746 </sect1>
747
Eric Andersencff3fe32000-09-20 19:22:26 +0000748 <sect1 id="dos2unix">
749 <title>dos2unix</title>
750
751 <para>
752 Usage: dos2unix < dosfile > unixfile
753 </para>
754
755 <para>
756 Converts a text file from dos format to unix format.
757 </para>
758
759 </sect1>
760
Eric Andersen6f5e2812000-07-06 16:58:45 +0000761 <sect1 id="du">
762 <title>du</title>
763
764 <para>
765 Usage: du [OPTION]... [FILE]...
766 </para>
767
768 <para>
769 Summarize the disk space used for each FILE or current
770 directory. Disk space printed in units of 1k (i.e.
771 1024 bytes).
772 </para>
773
774 <para>
775 Options:
776 </para>
777
778 <para>
779 <screen>
780 -l Count sizes many times if hard linked
781 -s Display only a total for each argument
782 </screen>
783 </para>
784
785 <para>
786 Example:
787 </para>
788
789 <para>
790 <screen>
791 $ du
792 16 ./CVS
793 12 ./kernel-patches/CVS
794 80 ./kernel-patches
795 12 ./tests/CVS
796 36 ./tests
797 12 ./scripts/CVS
798 16 ./scripts
799 12 ./docs/CVS
800 104 ./docs
801 2417 .
802 </screen>
803 </para>
804 </sect1>
805
Eric Andersen61dc0572000-07-11 17:29:36 +0000806 <sect1 id="dumpkmap">
807 <title>dumpkmap</title>
808
809 <para>
810 Usage: dumpkmap
811 </para>
812
813 <para>
Eric Andersen337ec1b2000-11-17 17:23:16 +0000814 Prints out a binary keyboard translation table to standard output.
Eric Andersen61dc0572000-07-11 17:29:36 +0000815 </para>
Eric Andersen18a10142000-09-01 16:12:57 +0000816
817 <para>
818 Example:
819 </para>
820
821 <para>
822 <screen>
823 $ dumpkmap &lt; keymap
824 </screen>
825 </para>
Eric Andersen61dc0572000-07-11 17:29:36 +0000826 </sect1>
827
Eric Andersen6f5e2812000-07-06 16:58:45 +0000828 <sect1 id="dutmp">
829 <title>dutmp</title>
830
831 <para>
832 Usage: dutmp [FILE]
833 </para>
834
835 <para>
836 Dump utmp file format (pipe delimited) from FILE or
837 stdin to stdout.
838 </para>
839
840 <para>
841 Example:
842 </para>
843
844 <para>
845 <screen>
846 $ dutmp /var/run/utmp
847 8|7||si|||0|0|0|955637625|760097|0
848 2|0|~|~~|reboot||0|0|0|955637625|782235|0
849 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
850 8|125||l4|||0|0|0|955637629|998367|0
851 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
852 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
853 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
854 </screen>
855 </para>
856 </sect1>
857
858 <sect1 id="echo">
859 <title>echo</title>
860
861 <para>
862 Usage: echo [OPTION]... [ARG]...
863 </para>
864
865 <para>
866 Print ARGs to stdout.
867 </para>
868
869 <para>
870 Options:
871 </para>
872
873 <para>
874 <screen>
875 -n Suppress trailing newline
876 -e Enable interpretation of escaped characters
877 -E Disable interpretation of escaped characters
878 </screen>
879 </para>
880
881 <para>
882 Example:
883 </para>
884
885 <para>
886 <screen>
887 $ echo "Erik is cool"
888 Erik is cool
889 $ echo -e "Erik\nis\ncool"
890 Erik
891 is
892 cool
893 $ echo "Erik\nis\ncool"
894 Erik\nis\ncool
895 </screen>
896 </para>
897 </sect1>
898
Eric Andersen1b355eb2000-09-05 17:37:48 +0000899 <sect1 id="expr">
900 <title>expr</title>
901
902 <para>
903 Usage: expr EXPRESSION
904 </para>
905
906 <para>
907 Prints the value of EXPRESSION to standard output.
908 </para>
909
910 <para>
911 EXPRESSION may be:
912 </para>
913
914 <para>
915 <screen>
916 ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2
917 ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0
918 ARG1 &lt ARG2 ARG1 is less than ARG2
919 ARG1 &lt= ARG2 ARG1 is less than or equal to ARG2
920 ARG1 = ARG2 ARG1 is equal to ARG2
921 ARG1 != ARG2 ARG1 is unequal to ARG2
922 ARG1 &gt= ARG2 ARG1 is greater than or equal to ARG2
923 ARG1 &gt ARG2 ARG1 is greater than ARG2
924 ARG1 + ARG2 arithmetic sum of ARG1 and ARG2
925 ARG1 - ARG2 arithmetic difference of ARG1 and ARG2
926 ARG1 * ARG2 arithmetic product of ARG1 and ARG2
927 ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2
928 ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2
929 STRING : REGEXP anchored pattern match of REGEXP in STRING
930 match STRING REGEXP same as STRING : REGEXP
931 substr STRING POS LENGTH substring of STRING, POS counted from 1
932 index STRING CHARS index in STRING where any CHARS is found, or 0
933 length STRING length of STRING
934 quote TOKEN interpret TOKEN as a string, even if it is a
935 keyword like `match' or an operator like `/'
936 ( EXPRESSION ) value of EXPRESSION
937 </screen>
938 </para>
939
940 <para>
941 Beware that many operators need to be escaped or quoted for shells.
942 Comparisons are arithmetic if both ARGs are numbers, else
943 lexicographical. Pattern matches return the string matched between
944 \( and \) or null; if \( and \) are not used, they return the number
945 of characters matched or 0.
946 </para>
947
948 </sect1>
949
950
Eric Andersen6f5e2812000-07-06 16:58:45 +0000951 <sect1 id="false">
952 <title>false</title>
953
954 <para>
955 Usage: false
956 </para>
957
958 <para>
Eric Andersen21580922000-07-07 19:07:47 +0000959 Return an exit code of FALSE (1).
Eric Andersen6f5e2812000-07-06 16:58:45 +0000960 </para>
961
962 <para>
963 Example:
964 </para>
965
966 <para>
967 <screen>
968 $ false
969 $ echo $?
970 1
971 </screen>
972 </para>
973 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +0000974
Eric Andersene5cec4e2000-07-06 19:59:22 +0000975 <sect1 id="fbset">
976 <title>fbset</title>
977
978 <para>
979 Usage: fbset [OPTION]... [MODE]
980 </para>
981
982 <para>
983 Show and modify frame buffer device settings.
984 </para>
985
986 <para>
987 Options:
988 </para>
989
990 <para>
991 <screen>
992 -h Display option summary
993 -fb DEVICE Operate on DEVICE
994 -db FILE Use FILE for mode database
995 -g XRES YRES VXRES VYRES DEPTH Set all geometry parameters
996 -t PIXCLOCK LEFT RIGHT UPPER LOWER HSLEN VSLEN Set all timing parameters
997 -xres RES Set visible horizontal resolution
998 -yres RES Set visible vertical resolution
999 </screen>
1000 </para>
1001
1002 <para>
1003 Example:
1004 </para>
1005
1006 <para>
1007 <screen>
1008 $ fbset
1009 mode "1024x768-76"
1010 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
1011 geometry 1024 768 1024 768 16
1012 timings 12714 128 32 16 4 128 4
1013 accel false
1014 rgba 5/11,6/5,5/0,0/0
1015 endmode
1016 </screen>
1017 </para>
1018 </sect1>
1019
1020 <sect1 id="fdflush">
1021 <title>fdflush</title>
1022
1023 <para>
1024 Usage: fdflush DEVICE
1025 </para>
1026
1027 <para>
1028 Force floppy disk drive to detect disk change on DEVICE.
1029 </para>
1030 </sect1>
1031
1032 <sect1 id="find">
1033 <title>find</title>
1034
1035 <para>
1036 Usage: find [PATH]... [EXPRESSION]
1037 </para>
1038
1039 <para>
1040 Search for files in a directory hierarchy. The default
1041 PATH is the current directory; default EXPRESSION is
1042 '-print'.
1043 </para>
1044
1045 <para>
1046 EXPRESSION may consist of:
1047 </para>
1048
1049 <para>
1050 <screen>
1051 -follow Dereference symbolic links
1052 -name PATTERN File name (leading directories removed) matches PATTERN
1053 -print Print the full file name followed by a newline to stdout
1054 </screen>
1055 </para>
1056
1057 <para>
1058 Example:
1059 </para>
1060
1061 <para>
1062 <screen>
1063 $ find / -name /etc/passwd
1064 /etc/passwd
1065 </screen>
1066 </para>
1067 </sect1>
1068
1069 <sect1 id="free">
1070 <title>free</title>
1071
1072 <para>
1073 Usage: free
1074 </para>
1075
1076 <para>
1077 Displays the amount of free and used system memory.
1078 </para>
1079
1080 <para>
1081 Example:
1082 </para>
1083
1084 <para>
1085 <screen>
1086 $ free
1087 total used free shared buffers
1088 Mem: 257628 248724 8904 59644 93124
1089 Swap: 128516 8404 120112
1090 Total: 386144 257128 129016
1091 </screen>
1092 </para>
1093 </sect1>
1094
1095 <sect1 id="freeramdisk">
1096 <title>freeramdisk</title>
1097
1098 <para>
1099 Usage: freeramdisk DEVICE
1100 </para>
1101
1102 <para>
1103 Free all memory used by the ramdisk DEVICE.
1104 </para>
1105
1106 <para>
1107 Example:
1108 </para>
1109
1110 <para>
1111 <screen>
1112 $ freeramdisk /dev/ram2
1113 </screen>
1114 </para>
1115 </sect1>
1116
1117 <sect1 id="fsck.minix">
1118 <title>fsck.minix</title>
1119
1120 <para>
1121 Usage: fsck.minix [OPTION]... DEVICE
1122 </para>
1123
1124 <para>
1125 Perform a consistency check on the MINIX filesystem on
1126 DEVICE.
1127 </para>
1128
1129 <para>
1130 Options:
1131 </para>
1132
1133 <para>
1134 <screen>
1135 -l List all filenames
1136 -r Perform interactive repairs
1137 -a Perform automatic repairs
1138 -v Verbose
1139 -s Output super-block information
1140 -m Activate MINIX-like "mode not cleared" warnings
1141 -f Force file system check.
1142 </screen>
1143 </para>
1144 </sect1>
Eric Andersena1f16bb2000-08-21 22:02:34 +00001145
1146 <sect1 id="getopt">
1147 <title>getopt</title>
1148
1149 <para>
1150 Usage: getopt [OPTIONS]...
1151 </para>
1152
1153 <para>
1154 Parse command options
1155 </para>
1156
1157 <para>
1158 <screen>
1159 -a, --alternative Allow long options starting with single -\n"
1160 -l, --longoptions=longopts Long options to be recognized\n"
1161 -n, --name=progname The name under which errors are reported\n"
1162 -o, --options=optstring Short options to be recognized\n"
1163 -q, --quiet Disable error reporting by getopt(3)\n"
1164 -Q, --quiet-output No normal output\n"
1165 -s, --shell=shell Set shell quoting conventions\n"
1166 -T, --test Test for getopt(1) version\n"
1167 -u, --unqote Do not quote the output\n"
1168 </screen>
1169 </para>
1170
1171
1172 <para>
1173 Example:
1174 </para>
1175
1176 <para>
1177 <screen>
1178 $ cat getopt.test
1179 #!/bin/sh
1180 GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
1181 -n 'example.busybox' -- "$@"`
1182 if [ $? != 0 ] ; then exit 1 ; fi
1183 eval set -- "$GETOPT"
1184 while true ; do
1185 case $1 in
1186 -a|--a-long) echo "Option a" ; shift ;;
1187 -b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;;
1188 -c|--c-long)
1189 case "$2" in
1190 "") echo "Option c, no argument"; shift 2 ;;
1191 *) echo "Option c, argument \`$2'" ; shift 2 ;;
1192 esac ;;
1193 --) shift ; break ;;
1194 *) echo "Internal error!" ; exit 1 ;;
1195 esac
1196 done
1197 </screen>
1198 </para>
1199 </sect1>
Eric Andersene5cec4e2000-07-06 19:59:22 +00001200
1201 <sect1 id="grep">
1202 <title>grep</title>
1203
1204 <para>
1205 Usage: grep [OPTIONS]... PATTERN [FILE]...
1206 </para>
1207
1208 <para>
1209 Search for PATTERN in each FILE or stdin.
1210 </para>
1211
1212 <para>
1213 Options:
1214 </para>
1215
1216 <para>
1217 <screen>
1218 -h Suppress the prefixing filename on output
1219 -i Ignore case distinctions
1220 -n Print line number with output lines
1221 -q Be quiet. Returns 0 if result was found, 1 otherwise
1222 -v Select non-matching lines
1223 </screen>
1224 </para>
1225
1226 <para>
1227 This version of grep matches full regular expressions.
1228 </para>
1229
1230 <para>
1231 Example:
1232 </para>
1233
1234 <para>
1235 <screen>
1236 $ grep root /etc/passwd
1237 root:x:0:0:root:/root:/bin/bash
1238 $ grep ^[rR]oo. /etc/passwd
1239 root:x:0:0:root:/root:/bin/bash
1240 </screen>
1241 </para>
1242 </sect1>
1243
1244 <sect1 id="gunzip">
1245 <title>gunzip</title>
1246
1247 <para>
1248 Usage: gunzip [OPTION]... FILE
1249 </para>
1250
1251 <para>
1252 Uncompress FILE (or stdin if FILE is '-').
1253 </para>
1254
1255 <para>
1256 Options:
1257 </para>
1258
1259 <para>
1260 <screen>
1261 -c Write output to standard output
1262 -t Test compressed file integrity
1263 </screen>
1264 </para>
1265
1266 <para>
1267 Example:
1268 </para>
1269
1270 <para>
1271 <screen>
1272 $ ls -la /tmp/BusyBox*
1273 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
1274 $ gunzip /tmp/BusyBox-0.43.tar.gz
1275 $ ls -la /tmp/BusyBox*
1276 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1277 </screen>
1278 </para>
1279 </sect1>
1280
Pavel Roskind2d3aa32000-09-15 17:16:40 +00001281 <sect1 id="gzip">
Eric Andersene5cec4e2000-07-06 19:59:22 +00001282 <title>gzip</title>
1283
1284 <para>
1285 Usage: gzip [OPTION]... FILE
1286 </para>
1287
1288 <para>
1289 Compress FILE (or stdin if FILE is '-') with maximum
1290 compression to FILE.gz (or stdout if FILE is '-').
1291 </para>
1292
1293 <para>
1294 Options:
1295 </para>
1296
1297 <para>
1298 <screen>
1299 -c Write output to standard output
Eric Andersend0fa0a12000-12-13 17:59:37 +00001300 -d decompress
Eric Andersene5cec4e2000-07-06 19:59:22 +00001301 </screen>
1302 </para>
1303
1304 <para>
1305 Example:
1306 </para>
1307
1308 <para>
1309 <screen>
1310 $ ls -la /tmp/BusyBox*
1311 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1312 $ gzip /tmp/BusyBox-0.43.tar
1313 $ ls -la /tmp/BusyBox*
1314 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
1315 </screen>
1316 </para>
1317 </sect1>
1318
1319 <sect1 id="halt">
1320 <title>halt</title>
1321
1322 <para>
1323 Usage: halt
1324 </para>
1325
1326 <para>
1327 Halt the system.
1328 </para>
1329 </sect1>
1330
1331 <sect1 id="head">
1332 <title>head</title>
1333
1334 <para>
1335 Usage: head [OPTION] FILE...
1336 </para>
1337
1338 <para>
1339 Print first 10 lines of each FILE to standard output.
1340 With more than one FILE, precede each with a header
1341 giving the file name. With no FILE, or when FILE is -,
1342 read standard input.
1343 </para>
1344
1345 <para>
1346 Options:
1347 </para>
1348
1349 <para>
1350 <screen>
1351 -n NUM Print first NUM lines instead of first 10
1352 </screen>
1353 </para>
1354
1355 <para>
1356 Example:
1357 </para>
1358
1359 <para>
1360 <screen>
1361 $ head -n 2 /etc/passwd
1362 root:x:0:0:root:/root:/bin/bash
1363 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
1364 </screen>
1365 </para>
1366 </sect1>
1367
1368 <sect1 id="hostid">
1369 <title>hostid</title>
1370
1371 <para>
1372 Usage: hostid
1373 </para>
1374
1375 <para>
1376 Prints out a unique 32-bit identifier for the current
1377 machine. The 32-bit identifier is intended to be unique
1378 among all UNIX systems in existence.
1379 </para>
1380 </sect1>
1381
1382 <sect1 id="hostname">
1383 <title>hostname</title>
1384
1385 <para>
1386 Usage: hostname [OPTION]... [HOSTNAME|-F FILE]
1387 </para>
1388
1389 <para>
1390 Get or set the hostname or DNS domain name. If a
1391 hostname is given (or a file with the -F parameter), the
1392 host name will be set.
1393 </para>
1394
1395 <para>
1396 Options:
1397 </para>
1398
1399 <para>
1400 <screen>
Eric Andersen0d5835a2000-10-12 22:30:31 +00001401 -s Short
1402 -i Addresses for the hostname
1403 -d DNS domain name
1404 -F, --file FILE Use the contents of FILE to specify the hostname
Eric Andersene5cec4e2000-07-06 19:59:22 +00001405 </screen>
1406 </para>
1407
1408 <para>
1409 Example:
1410 </para>
1411
1412 <para>
1413 <screen>
1414 $ hostname
1415 slag
1416 </screen>
1417 </para>
1418 </sect1>
1419
1420 <sect1 id="id">
1421 <title>id</title>
1422
1423 <para>
1424 Usage: id [OPTION]... [USERNAME]
1425 </para>
1426
1427 <para>
1428 Print information for USERNAME or the current user.
1429 </para>
1430
1431 <para>
1432 Options:
1433 </para>
1434
1435 <para>
1436 <screen>
1437 -g Print only the group ID
1438 -u Print only the user ID
1439 -r Print the real user ID instead of the effective ID (with -ug)
1440 </screen>
1441 </para>
1442
1443 <para>
1444 Example:
1445 </para>
1446
1447 <para>
1448 <screen>
1449 $ id
1450 uid=1000(andersen) gid=1000(andersen)
1451 </screen>
1452 </para>
1453 </sect1>
1454
1455 <sect1 id="init">
1456 <title>init</title>
1457
1458 <para>
1459 Usage: init
1460 </para>
1461
1462 <para>
1463 Init is the parent of all processes.
1464 </para>
1465
1466 <para>
1467 This version of init is designed to be run only by the
1468 kernel.
1469 </para>
1470
1471 <para>
1472 BusyBox init doesn't support multiple runlevels. The
1473 runlevels field of the /etc/inittab file is completely
1474 ignored by BusyBox init. If you want runlevels, use
1475 sysvinit.
1476 </para>
1477
1478 <para>
1479 BusyBox init works just fine without an inittab. If no
1480 inittab is found, it has the following default behavior:
1481 </para>
1482
1483 <para>
1484 <screen>
1485 ::sysinit:/etc/init.d/rcS
1486 ::askfirst:/bin/sh
1487 </screen>
1488 </para>
1489
1490 <para>
1491 If it detects that /dev/console is _not_ a serial
1492 console, it will also run:
1493 </para>
1494
1495 <para>
1496 <screen>
1497 tty2::askfirst:/bin/sh
1498 </screen>
1499 </para>
1500
1501 <para>
1502 If you choose to use an /etc/inittab file, the inittab
1503 entry format is as follows:
1504 </para>
1505
1506 <para>
1507 <screen>
1508 &lt;id&gt;:&lt;runlevels&gt;:&lt;action&gt;:&lt;process&gt;
1509 </screen>
Pavel Roskind2d3aa32000-09-15 17:16:40 +00001510 </para>
Eric Andersene5cec4e2000-07-06 19:59:22 +00001511
1512 <sect2>
1513 <title>id</title>
1514 <para>
Eric Andersen0d2acb02000-12-18 20:36:02 +00001515
1516 WARNING: This field has a non-traditional meaning for BusyBox init!
1517 The id field is used by BusyBox init to specify the controlling tty
1518 for the specified process to run on. The contents of this field
1519 are appended to "/dev/" and used as-is. There is no need for this
1520 field to be unique, although if it isn't you may have strange
1521 results. If this field is left blank, the controlling tty is set
1522 to the console. Also note that if BusyBox detects that a serial
1523 console is in use, then only entries whose controlling tty is
1524 either the serial console or /dev/null will be run. BusyBox init
1525 does nothing with utmp. We don't need no stinkin' utmp.
1526
Eric Andersene5cec4e2000-07-06 19:59:22 +00001527 </para>
1528 </sect2>
1529
1530 <sect2>
1531 <title>runlevels</title>
1532
1533 <para>
1534 The runlevels field is completely ignored.
1535 </para>
1536 </sect2>
1537
1538 <sect2>
1539 <title>action</title>
1540
Eric Anderseneb4218d2000-12-08 20:38:00 +00001541
Eric Andersene5cec4e2000-07-06 19:59:22 +00001542 <para>
Eric Anderseneb4218d2000-12-08 20:38:00 +00001543 Valid actions include: sysinit, respawn, askfirst, wait,
1544 once, and ctrlaltdel.
1545 </para>
1546
1547
1548 <para>
1549 The available actions can be classified into two groups: actions
1550 that are run only once, and actions that are re-run when the specified
1551 process exits.
Eric Andersene5cec4e2000-07-06 19:59:22 +00001552 </para>
1553
1554 <para>
Eric Anderseneb4218d2000-12-08 20:38:00 +00001555 Run only-once actions:
Eric Andersene5cec4e2000-07-06 19:59:22 +00001556 </para>
1557
1558 <para>
Eric Anderseneb4218d2000-12-08 20:38:00 +00001559 'sysinit' is the first item run on boot. init waits until all
1560 sysinit actions are completed before continuing. Following the
1561 completion of all sysinit actions, all 'wait' actions are run.
1562 'wait' actions, like 'sysinit' actions, cause init to wait until
1563 the specified task completes. 'once' actions are asyncronous,
1564 therefore, init does not wait for them to complete. 'ctrlaltdel'
1565 actions are run immediately before init causes the system to reboot
1566 (unmounting filesystems with a 'ctrlaltdel' action is a very good
1567 idea).
Eric Andersene5cec4e2000-07-06 19:59:22 +00001568 </para>
Eric Anderseneb4218d2000-12-08 20:38:00 +00001569
1570 <para>
1571 Run repeatedly actions:
1572 </para>
1573
1574 <para>
1575 'respawn' actions are run after the 'once' actions. When a process
1576 started with a 'respawn' action exits, init automatically restarts
1577 it. Unlike sysvinit, BusyBox init does not stop processes from
1578 respawning out of control. The 'askfirst' actions acts just like
1579 respawn, except that before running the specified process it
1580 displays the line "Please press Enter to activate this console."
1581 and then waits for the user to press enter before starting the
1582 specified process.
1583 </para>
1584
1585 <para>
1586 Unrecognized actions (like initdefault) will cause init to emit an
1587 error message, and then go along with its business. All actions are
1588 run in the reverse order from how they appear in /etc/inittab.
1589 </para>
1590
Eric Andersene5cec4e2000-07-06 19:59:22 +00001591 </sect2>
1592
1593 <sect2>
1594 <title>process</title>
1595
1596 <para>
1597 Specifies the process to be executed and its
1598 command line.
1599 </para>
1600 </sect2>
1601
Pavel Roskind2d3aa32000-09-15 17:16:40 +00001602 <sect2>
1603 <title>Example /etc/inittab file</title>
Eric Andersene5cec4e2000-07-06 19:59:22 +00001604
Eric Andersen57f83ff2000-09-24 02:41:44 +00001605 <para>
1606 <screen>
1607 # This is run first except when booting in single-user mode.
1608 #
1609 ::sysinit:/etc/init.d/rcS
Eric Andersene5cec4e2000-07-06 19:59:22 +00001610
Eric Andersen57f83ff2000-09-24 02:41:44 +00001611 # /bin/sh invocations on selected ttys
1612 #
1613 # Start an "askfirst" shell on the console (whatever that may be)
1614 ::askfirst:-/bin/sh
1615 # Start an "askfirst" shell on /dev/tty2-4
1616 tty2::askfirst:-/bin/sh
1617 tty2::askfirst:-/bin/sh
1618 tty2::askfirst:-/bin/sh
Eric Andersene5cec4e2000-07-06 19:59:22 +00001619
Eric Andersen57f83ff2000-09-24 02:41:44 +00001620 # /sbin/getty invocations for selected ttys
1621 #
1622 tty4::respawn:/sbin/getty 38400 tty5
1623 tty5::respawn:/sbin/getty 38400 tty6
Eric Andersene5cec4e2000-07-06 19:59:22 +00001624
Eric Andersen57f83ff2000-09-24 02:41:44 +00001625 # Example of how to put a getty on a serial line (for a terminal)
1626 #
Eric Andersen8ce85ce2000-09-26 22:20:06 +00001627 #::respawn:/sbin/getty -L ttyS0 9600 vt100
1628 #::respawn:/sbin/getty -L ttyS1 9600 vt100
Eric Andersen57f83ff2000-09-24 02:41:44 +00001629 #
1630 # Example how to put a getty on a modem line.
Eric Andersen8ce85ce2000-09-26 22:20:06 +00001631 #::respawn:/sbin/getty 57600 ttyS2
Eric Andersene5cec4e2000-07-06 19:59:22 +00001632
Eric Andersen57f83ff2000-09-24 02:41:44 +00001633 # Stuff to do before rebooting
1634 ::ctrlaltdel:/bin/umount -a -r
1635 ::ctrlaltdel:/sbin/swapoff
1636 </screen>
1637 </para>
Pavel Roskind2d3aa32000-09-15 17:16:40 +00001638 </sect2>
Eric Andersene5cec4e2000-07-06 19:59:22 +00001639 </sect1>
1640
1641 <sect1 id="insmod">
1642 <title>insmod</title>
1643
1644 <para>
1645 Usage: insmod [OPTION]... MODULE [symbol=value]...
1646 </para>
1647
1648 <para>
Eric Andersen21580922000-07-07 19:07:47 +00001649 Load MODULE into the kernel.
Eric Andersene5cec4e2000-07-06 19:59:22 +00001650 </para>
1651
1652 <para>
1653 Options:
1654 </para>
1655
1656 <para>
1657 <screen>
1658 -f Force module to load into the wrong kernel version.
1659 -k Make module autoclean-able.
1660 -v Verbose output
1661 -x Do not export externs
1662 </screen>
1663 </para>
1664 </sect1>
1665
1666 <sect1 id="kill">
1667 <title>kill</title>
1668
1669 <para>
1670 Usage: kill [OPTION] PID...
1671 </para>
1672
1673 <para>
1674 Send a signal (default is SIGTERM) to the specified
1675 PID(s).
1676 </para>
1677
1678 <para>
1679 Options:
1680 </para>
1681
1682 <para>
1683 <screen>
1684 -l List all signal names and numbers
1685 -SIG Send signal SIG
1686 </screen>
1687 </para>
1688
1689 <para>
1690 Example:
1691 </para>
1692
1693 <para>
1694 <screen>
1695 $ ps | grep apache
1696 252 root root S [apache]
1697 263 www-data www-data S [apache]
1698 264 www-data www-data S [apache]
1699 265 www-data www-data S [apache]
1700 266 www-data www-data S [apache]
1701 267 www-data www-data S [apache]
1702 $ kill 252
1703 </screen>
1704 </para>
1705 </sect1>
1706
1707 <sect1 id="killall">
1708 <title>killall</title>
1709
1710 <para>
1711 Usage: killall [OPTION] NAME...
1712 </para>
1713
1714 <para>
1715 Send a signal (default is SIGTERM) to the specified
1716 NAME(s).
1717 </para>
1718
1719 <para>
1720 Options:
1721 </para>
1722
1723 <para>
1724 <screen>
1725 -l List all signal names and numbers
1726 -SIG Send signal SIG
1727 </screen>
1728 </para>
1729
1730 <para>
1731 Example:
1732 </para>
1733
1734 <para>
1735 <screen>
1736 $ killall apache
1737 </screen>
1738 </para>
1739 </sect1>
1740
1741 <sect1 id="length">
1742 <title>length</title>
1743
1744 <para>
1745 Usage: length STRING
1746 </para>
1747
1748 <para>
1749 Print the length of STRING.
1750 </para>
1751
1752 <para>
1753 Example:
1754 </para>
1755
1756 <para>
1757 <screen>
1758 $ length "Hello"
1759 5
1760 </screen>
1761 </para>
1762 </sect1>
1763
1764 <sect1 id="ln">
1765 <title>ln</title>
1766
1767 <para>
1768 Usage: ln [OPTION]... TARGET FILE|DIRECTORY
1769 </para>
1770
1771 <para>
1772 Create a link named FILE or DIRECTORY to the specified
1773 TARGET. You may use '--' to indicate that all following
1774 arguments are non-options.
1775 </para>
1776
1777 <para>
1778 Options:
1779 </para>
1780
1781 <para>
1782 <screen>
1783 -s Make symbolic link instead of hard link
1784 -f Remove existing destination file
1785 </screen>
1786 </para>
1787
1788 <para>
1789 Example:
1790 </para>
1791
1792 <para>
1793 <screen>
1794 $ ln -s BusyBox /tmp/ls
1795 $ ls -l /tmp/ls
1796 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -&gt; BusyBox*
1797 </screen>
1798 </para>
1799 </sect1>
1800
1801 <sect1 id="loadacm">
1802 <title>loadacm</title>
1803
1804 <para>
1805 Usage: loadacm
1806 </para>
1807
1808 <para>
1809 Load an acm from stdin.
1810 </para>
1811
1812 <para>
1813 Example:
1814 </para>
1815
1816 <para>
1817 <screen>
1818 $ loadacm &lt; /etc/i18n/acmname
1819 </screen>
1820 </para>
1821 </sect1>
1822
1823 <sect1 id="loadfont">
1824 <title>loadfont</title>
1825
1826 <para>
1827 Usage: loadfont
1828 </para>
1829
1830 <para>
1831 Load a console font from stdin.
1832 </para>
1833
1834 <para>
1835 Example:
1836 </para>
1837
1838 <para>
1839 <screen>
1840 $ loadfont &lt; /etc/i18n/fontname
1841 </screen>
1842 </para>
1843 </sect1>
1844
1845 <sect1 id="loadkmap">
1846 <title>loadkmap</title>
1847
1848 <para>
1849 Usage: loadkmap
1850 </para>
1851
1852 <para>
1853 Load a binary keyboard translation table from stdin.
1854 </para>
1855
1856 <para>
1857 Example:
1858 </para>
1859
1860 <para>
1861 <screen>
1862 $ loadkmap &lt; /etc/i18n/lang-keymap
1863 </screen>
1864 </para>
1865 </sect1>
1866
1867 <sect1 id="logger">
1868 <title>logger</title>
1869
1870 <para>
1871 Usage: logger [OPTION]... [MESSAGE]
1872 </para>
1873
1874 <para>
Matt Kraai004827d2001-01-02 22:54:12 +00001875 Write MESSAGE to the system log. If MESSAGE is omitted, log
Eric Andersene5cec4e2000-07-06 19:59:22 +00001876 stdin.
1877 </para>
1878
1879 <para>
1880 Options:
1881 </para>
1882
1883 <para>
1884 <screen>
1885 -s Log to stderr as well as the system log
1886 -t Log using the specified tag (defaults to user name)
1887 -p Enter the message with the specified priority
1888 This may be numerical or a ``facility.level'' pair
1889 </screen>
1890 </para>
1891
1892 <para>
1893 Example:
1894 </para>
1895
1896 <para>
1897 <screen>
1898 $ logger "hello"
1899 </screen>
1900 </para>
1901 </sect1>
1902
1903 <sect1 id="logname">
1904 <title>logname</title>
1905
1906 <para>
1907 Usage: logname
1908 </para>
1909
1910 <para>
1911 Print the name of the current user.
1912 </para>
1913
1914 <para>
1915 Example:
1916 </para>
1917
1918 <para>
1919 <screen>
1920 $ logname
1921 root
1922 </screen>
1923 </para>
1924 </sect1>
1925
1926 <sect1 id="ls">
1927 <title>ls</title>
1928
1929 <para>
1930 Usage: ls [OPTION]... [FILE]...
1931 </para>
1932
1933 <para>
1934
1935 </para>
1936
1937 <para>
1938 Options:
1939 </para>
1940
1941 <para>
1942 <screen>
1943 -a Do not hide entries starting with .
1944 -c With -l: show ctime (the time of last
1945 modification of file status information)
1946 -d List directory entries instead of contents
1947 -e List both full date and full time
1948 -l Use a long listing format
1949 -n List numeric UIDs and GIDs instead of names
1950 -p Append indicator (one of /=@|) to entries
1951 -u With -l: show access time (the time of last
1952 access of the file)
1953 -x List entries by lines instead of by columns
1954 -A Do not list implied . and ..
1955 -C List entries by columns
1956 -F Append indicator (one of */=@|) to entries
Eric Andersen5b176932000-09-22 20:22:28 +00001957 -L list entries pointed to by symbolic links
Eric Andersene5cec4e2000-07-06 19:59:22 +00001958 -R List subdirectories recursively
1959 </screen>
1960 </para>
1961
1962 <para>
1963 Example:
1964 </para>
1965
1966 <para>
1967 <screen>
1968 </screen>
1969 </para>
1970 </sect1>
1971
1972 <sect1 id="lsmod">
1973 <title>lsmod</title>
1974
1975 <para>
1976 Usage: lsmod
1977 </para>
1978
1979 <para>
1980 List currently loaded kernel modules.
1981 </para>
1982 </sect1>
1983
1984 <sect1 id="makedevs">
1985 <title>makedevs</title>
1986
1987 <para>
1988 Usage: makedevsf NAME TYPE MAJOR MINOR FIRST LAST [s]
1989 </para>
1990
1991 <para>
1992 Create a range of block or character special files.
1993 </para>
1994
1995 <para>
1996 TYPE may be:
1997 </para>
1998
1999 <para>
2000 <screen>
2001 b Make a block (buffered) device
2002 c or u Make a character (un-buffered) device
2003 p Make a named pipe. MAJOR and MINOR are ignored for named pipes
2004 </screen>
2005 </para>
2006
2007 <para>
2008 FIRST specifies the number appended to NAME to create
2009 the first device. LAST specifies the number of the last
2010 item that should be created. If 's' is the last
2011 argument, the base device is created as well.
2012 </para>
2013
2014 <para>
2015 Example:
2016 </para>
2017
2018 <para>
2019 <screen>
2020 $ makedevs /dev/ttyS c 4 66 2 63
2021 [creates ttyS2-ttyS63]
2022 $ makedevs /dev/hda b 3 0 0 8 s
2023 [creates hda,hda1-hda8]
2024 </screen>
2025 </para>
2026 </sect1>
2027
Eric Andersenb9eb0232000-07-07 05:04:24 +00002028 <sect1 id="md5sum">
2029 <title>md5sum</title>
2030
2031 <para>
2032 Usage: md5sum [OPTION]... FILE...
2033 </para>
2034
2035 <para>
2036 Print or check MD5 checksums.
2037 </para>
2038
2039 <para>
2040 Options:
2041 </para>
2042
2043 <para>
2044 <screen>
2045 -b Read files in binary mode
2046 -c Check MD5 sums against given list
2047 -t Read files in text mode (default)
2048 -g Read a string
2049 </screen>
2050 </para>
2051
2052 <para>
2053 The following two options are useful only when verifying
2054 checksums:
2055 </para>
2056
2057 <para>
2058 <screen>
2059 -s Don't output anything, status code shows success
2060 -w Warn about improperly formated MD5 checksum lines
2061 </screen>
2062 </para>
2063
2064 <para>
2065 Example:
2066 </para>
2067
2068 <para>
2069 <screen>
2070 $ md5sum busybox
2071 6fd11e98b98a58f64ff3398d7b324003 busybox
2072 $ md5sum -c
2073 6fd11e98b98a58f64ff3398d7b324003 busybox
2074 6fd11e98b98a58f64ff3398d7b324002 busybox
2075 md5sum: MD5 check failed for 'busybox'
2076 ^D
2077 </screen>
2078 </para>
2079 </sect1>
2080
2081 <sect1 id="mkdir">
2082 <title>mkdir</title>
2083
2084 <para>
2085 Usage: mkdir [OPTION]... DIRECTORY...
2086 </para>
2087
2088 <para>
2089 Create the DIRECTORY(s), if they do not already exist.
2090 </para>
2091
2092 <para>
2093 Options:
2094 </para>
2095
2096 <para>
2097 <screen>
2098 -m Set permission mode (as in chmod), not rwxrwxrwx - umask
2099 -p No error if directory exists, make parent directories as needed
2100 </screen>
2101 </para>
2102
2103 <para>
2104 Example:
2105 </para>
2106
2107 <para>
2108 <screen>
2109 $ mkdir /tmp/foo
2110 $ mkdir /tmp/foo
2111 /tmp/foo: File exists
2112 $ mkdir /tmp/foo/bar/baz
2113 /tmp/foo/bar/baz: No such file or directory
2114 $ mkdir -p /tmp/foo/bar/baz
2115 </screen>
2116 </para>
2117 </sect1>
2118
2119 <sect1 id="mkfifo">
2120 <title>mkfifo</title>
2121
2122 <para>
2123 Usage: mkfifo [OPTION] NAME
2124 </para>
2125
2126 <para>
2127 Create a named pipe (identical to 'mknod NAME p').
2128 </para>
2129
2130 <para>
2131 Options:
2132 </para>
2133
2134 <para>
2135 <screen>
2136 -m MODE Create the pipe using the specified mode (default a=rw)
2137 </screen>
2138 </para>
2139 </sect1>
2140
2141 <sect1 id="mkfs.minix">
2142 <title>mkfs.minix</title>
2143
2144 <para>
2145 Usage: mkfs.minix [OPTION]... NAME [BLOCKS]
2146 </para>
2147
2148 <para>
2149 Make a MINIX filesystem.
2150 </para>
2151
2152 <para>
2153 Options:
2154 </para>
2155
2156 <para>
2157 <screen>
2158 -c Check the device for bad blocks
2159 -n [14|30] Specify the maximum length of filenames
2160 -i Specify the number of inodes for the filesystem
2161 -l FILENAME Read the bad blocks list from FILENAME
2162 -v Make a Minix version 2 filesystem
2163 </screen>
2164 </para>
2165 </sect1>
2166
2167 <sect1 id="mknod">
2168 <title>mknod</title>
2169
2170 <para>
2171 Usage: mknod [OPTION]... NAME TYPE MAJOR MINOR
2172 </para>
2173
2174 <para>
2175 Create a special file (block, character, or pipe).
2176 </para>
2177
2178 <para>
2179 Options:
2180 </para>
2181
2182 <para>
2183 <screen>
2184 -m Create the special file using the specified mode (default a=rw)
2185 </screen>
2186 </para>
2187
2188 <para>
2189 TYPE may be:
2190 </para>
2191
2192 <para>
2193 <screen>
2194 b Make a block (buffered) device
2195 c or u Make a character (un-buffered) device
2196 p Make a named pipe. MAJOR and MINOR are ignored for named pipes
2197 </screen>
2198 </para>
2199
2200 <para>
2201 Example:
2202 </para>
2203
2204 <para>
2205 <screen>
2206 $ mknod /dev/fd0 b 2 0
2207 $ mknod -m 644 /tmp/pipe p
2208 </screen>
2209 </para>
2210 </sect1>
2211
2212 <sect1 id="mkswap">
2213 <title>mkswap</title>
2214
2215 <para>
2216 Usage: mkswap [OPTION]... DEVICE [BLOCKS]
2217 </para>
2218
2219 <para>
2220 Prepare a disk partition to be used as a swap partition.
2221 </para>
2222
2223 <para>
2224 Options:
2225 </para>
2226
2227 <para>
2228 <screen>
2229 -c Check for read-ability.
2230 -v0 Make version 0 swap [max 128 Megs].
2231 -v1 Make version 1 swap [big!] (default for kernels &gt; 2.1.117).
2232 BLOCKS Number of block to use (default is entire partition).
2233 </screen>
2234 </para>
2235 </sect1>
2236
2237 <sect1 id="mktemp">
2238 <title>mktemp</title>
2239
2240 <para>
2241 Usage: mktemp TEMPLATE
2242 </para>
2243
2244 <para>
2245 Creates a temporary file with its name based on
2246 TEMPLATE. TEMPLATE is any name with six `Xs' (i.e.
2247 /tmp/temp.XXXXXX).
2248 </para>
2249
2250 <para>
2251 Example:
2252 </para>
2253
2254 <para>
2255 <screen>
2256 $ mktemp /tmp/temp.XXXXXX
2257 /tmp/temp.mWiLjM
2258 $ ls -la /tmp/temp.mWiLjM
2259 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
2260 </screen>
2261 </para>
2262 </sect1>
2263
2264 <sect1 id="more">
2265 <title>more</title>
2266
2267 <para>
2268 Usage: more [FILE]...
2269 </para>
2270
2271 <para>
2272 Page through text one screenful at a time.
2273 </para>
2274
2275 <para>
2276 Example:
2277 </para>
2278
2279 <para>
2280 <screen>
2281 $ dmesg | more
2282 </screen>
2283 </para>
2284 </sect1>
2285
2286 <sect1 id="mount">
2287 <title>mount</title>
2288
2289 <para>
2290 Usage: mount [OPTION]...
2291 </para>
2292
2293 <para>
2294 <screen>
2295 or: mount [OPTION]... DEVICE DIRECTORY
2296 </screen>
2297 </para>
2298
2299 <para>
2300 Mount filesystems.
2301 </para>
2302
2303 <para>
2304 Options:
2305 </para>
2306
2307 <para>
2308 <screen>
2309 -a Mount all filesystems in /etc/fstab
2310 -o One of the many filesystem options listed below
2311 -r Mount the filesystem read-only
2312 -t TYPE Specify the filesystem type
2313 -w Mount the filesystem read-write
2314 </screen>
2315 </para>
2316
2317 <para>
2318 Options for use with the -o flag:
2319 </para>
2320
2321 <para>
2322 <screen>
2323 async/sync Writes are asynchronous / synchronous
2324 atime/noatime Enable / disable updates to inode access times
2325 dev/nodev Allow / disallow use of special device files
2326 exec/noexec Allow / disallow use of executable files
2327 loop Mount a file via loop device
2328 suid/nosuid Allow / disallow set-user-id-root programs
2329 remount Remount a currently mounted filesystem
2330 ro/rw Mount filesystem read-only / read-write
2331 </screen>
2332 </para>
2333
2334 <para>
2335 There are even more flags that are filesystem specific.
2336 You'll have to see the written documentation for those.
2337 </para>
2338
2339 <para>
2340 Example:
2341 </para>
2342
2343 <para>
2344 <screen>
2345 $ mount
2346 /dev/hda3 on / type minix (rw)
2347 proc on /proc type proc (rw)
2348 devpts on /dev/pts type devpts (rw)
2349 $ mount /dev/fd0 /mnt -t msdos -o ro
2350 $ mount /tmp/diskimage /opt -t ext2 -o loop
2351 </screen>
2352 </para>
2353 </sect1>
2354
2355 <sect1 id="mt">
2356 <title>mt</title>
2357
2358 <para>
2359 Usage: mt [OPTION] OPCODE VALUE
2360 </para>
2361
2362 <para>
2363 Control magnetic tape drive operation.
2364 </para>
2365
2366 <para>
2367 Options:
2368 </para>
2369
2370 <para>
2371 <screen>
2372 -f DEVICE Control DEVICE
2373 </screen>
2374 </para>
2375 </sect1>
2376
2377 <sect1 id="mv">
2378 <title>mv</title>
2379
2380 <para>
2381 Usage: mv SOURCE DEST
2382 </para>
2383
2384 <para>
2385 <screen>
2386 or: mv SOURCE... DIRECTORY
2387 </screen>
2388 </para>
2389
2390 <para>
2391 Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
2392 </para>
2393
2394 <para>
2395 Example:
2396 </para>
2397
2398 <para>
2399 <screen>
2400 $ mv /tmp/foo /bin/bar
2401 </screen>
2402 </para>
2403 </sect1>
2404
2405 <sect1 id="nc">
2406 <title>nc</title>
2407
2408 <para>
2409 Usage: nc HOST PORT
2410 </para>
2411
2412 <para>
2413 Open a pipe to HOST:PORT.
2414 </para>
2415
2416 <para>
2417 Example:
2418 </para>
2419
2420 <para>
2421 <screen>
2422 $ nc foobar.somedomain.com 25
2423 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
2424 help
2425 214-Commands supported:
2426 214- HELO EHLO MAIL RCPT DATA AUTH
2427 214 NOOP QUIT RSET HELP
2428 quit
2429 221 foobar closing connection
2430 </screen>
2431 </para>
2432 </sect1>
2433
2434 <sect1 id="nslookup">
2435 <title>nslookup</title>
2436
2437 <para>
2438 Usage: nslookup [HOST]
2439 </para>
2440
2441 <para>
2442 Query the nameserver for the IP address of the given
2443 HOST.
2444 </para>
2445
2446 <para>
2447 Example:
2448 </para>
2449
2450 <para>
2451 <screen>
2452 $ nslookup localhost
2453 Server: default
2454 Address: default
2455
2456 Name: debian
2457 Address: 127.0.0.1
2458 </screen>
2459 </para>
2460 </sect1>
2461
2462 <sect1 id="ping">
2463 <title>ping</title>
2464
2465 <para>
2466 Usage: ping [OPTION]... HOST
2467 </para>
2468
2469 <para>
2470 Send ICMP ECHO_REQUEST packets to HOST.
2471 </para>
2472
2473 <para>
2474 Options:
2475 </para>
2476
2477 <para>
2478 <screen>
2479 -c COUNT Send only COUNT pings
2480 -s SIZE Send SIZE data bytes in packets (default=56)
2481 -q Quiet mode, only displays output at start and when finished
2482 </screen>
2483 </para>
2484
2485 <para>
2486 Example:
2487 </para>
2488
2489 <para>
2490 <screen>
2491 $ ping localhost
2492 PING slag (127.0.0.1): 56 data bytes
2493 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
2494
2495 --- debian ping statistics ---
2496 1 packets transmitted, 1 packets received, 0% packet loss
2497 round-trip min/avg/max = 20.1/20.1/20.1 ms
2498 </screen>
2499 </para>
2500 </sect1>
2501
2502 <sect1 id="poweroff">
2503 <title>poweroff</title>
2504
2505 <para>
2506 Usage: poweroff
2507 </para>
2508
2509 <para>
2510 Shut down the system, and request that the kernel turn
2511 off power upon halting.
2512 </para>
2513 </sect1>
2514
2515 <sect1 id="printf">
2516 <title>printf</title>
2517
2518 <para>
2519 Usage: printf FORMAT [ARGUMENT]...
2520 </para>
2521
2522 <para>
2523 Format and print the given data in a manner similar to
2524 the C printf command.
2525 </para>
2526
2527 <para>
2528 Example:
2529 </para>
2530
2531 <para>
2532 <screen>
2533 $ printf "Val=%d\n" 5
2534 Val=5
2535 </screen>
2536 </para>
2537 </sect1>
2538
Eric Andersen21580922000-07-07 19:07:47 +00002539 <sect1 id="ps">
2540 <title>ps</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002541
Eric Andersen21580922000-07-07 19:07:47 +00002542 <para>
2543 Usage: ps
2544 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002545
Eric Andersen21580922000-07-07 19:07:47 +00002546 <para>
2547 Report process status. This version of ps accepts no
2548 options.
2549 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002550
Eric Andersen21580922000-07-07 19:07:47 +00002551 <para>
2552 Options:
2553 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002554
Eric Andersen21580922000-07-07 19:07:47 +00002555 <para>
2556 <screen>
2557 </screen>
2558 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002559
Eric Andersen21580922000-07-07 19:07:47 +00002560 <para>
2561 Example:
2562 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002563
Eric Andersen21580922000-07-07 19:07:47 +00002564 <para>
2565 <screen>
2566 $ ps
2567 PID Uid Gid State Command
2568 1 root root S init
2569 2 root root S [kflushd]
2570 3 root root S [kupdate]
2571 4 root root S [kpiod]
2572 5 root root S [kswapd]
2573 742 andersen andersen S [bash]
2574 743 andersen andersen S -bash
2575 745 root root S [getty]
2576 2990 andersen andersen R ps
2577 </screen>
2578 </para>
2579 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002580
Eric Andersen21580922000-07-07 19:07:47 +00002581 <sect1 id="pwd">
2582 <title>pwd</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002583
Eric Andersen21580922000-07-07 19:07:47 +00002584 <para>
2585 Usage: pwd
2586 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002587
Eric Andersen21580922000-07-07 19:07:47 +00002588 <para>
2589 Print the full filename of the current working
2590 directory.
2591 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002592
Eric Andersen21580922000-07-07 19:07:47 +00002593 <para>
2594 Example:
2595 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002596
Eric Andersen21580922000-07-07 19:07:47 +00002597 <para>
2598 <screen>
2599 $ pwd
2600 /root
2601 </screen>
2602 </para>
2603 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002604
Eric Andersen918507e2000-08-21 22:46:33 +00002605 <sect1 id="rdate">
2606 <title>rdate</title>
2607
2608 <para>
2609 Usage: rdate [OPTION] HOST
2610 </para>
2611
2612 <para>
2613 Get and possibly set the system date and time from a remote HOST.
2614 </para>
2615
2616 <para>
2617 Options:
2618 </para>
2619
2620 <para>
2621 <screen>
2622 -s Set the system date and time (default).
2623 -p Print the date and time.
2624 </screen>
2625 </para>
2626 </sect1>
2627
Eric Andersen21580922000-07-07 19:07:47 +00002628 <sect1 id="reboot">
2629 <title>reboot</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002630
Eric Andersen21580922000-07-07 19:07:47 +00002631 <para>
2632 Usage: reboot
2633 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002634
Eric Andersen21580922000-07-07 19:07:47 +00002635 <para>
2636 Reboot the system.
2637 </para>
2638 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002639
Eric Andersenbf960f52000-07-21 21:32:12 +00002640 <sect1 id="renice">
2641 <title>renice</title>
2642
2643 <para>
2644 Usage: renice priority pid [pid ...]
2645 </para>
2646
2647 <para>
2648 Changes priority of running processes. Allowed priorities range
2649 from 20 (the process runs only when nothing else is running) to 0
2650 (default priority) to -20 (almost nothing else ever gets to run).
2651 </para>
2652 </sect1>
2653
Eric Andersenfa405d02000-08-21 21:18:52 +00002654 <sect1 id="reset">
2655 <title>reset</title>
2656
2657 <para>
2658 Usage: reset
2659 </para>
2660
2661 <para>
2662 Resets the screen.
2663 </para>
2664 </sect1>
2665
Eric Andersen21580922000-07-07 19:07:47 +00002666 <sect1 id="rm">
2667 <title>rm</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002668
Eric Andersen21580922000-07-07 19:07:47 +00002669 <para>
2670 Usage: rm [OPTION]... FILE...
2671 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002672
Eric Andersen21580922000-07-07 19:07:47 +00002673 <para>
2674 Remove (unlink) the FILE(s). You may use '--' to
2675 indicate that all following arguments are non-options.
2676 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002677
Eric Andersen21580922000-07-07 19:07:47 +00002678 <para>
2679 Options:
2680 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002681
Eric Andersen21580922000-07-07 19:07:47 +00002682 <para>
2683 <screen>
2684 -f Remove existing destinations, never prompt
2685 -r or -R Remove the contents of directories recursively
2686 </screen>
2687 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002688
Eric Andersen21580922000-07-07 19:07:47 +00002689 <para>
2690 Example:
2691 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002692
Eric Andersen21580922000-07-07 19:07:47 +00002693 <para>
2694 <screen>
2695 $ rm -rf /tmp/foo
2696 </screen>
2697 </para>
2698 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002699
Eric Andersen21580922000-07-07 19:07:47 +00002700 <sect1 id="rmdir">
2701 <title>rmdir</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002702
Eric Andersen21580922000-07-07 19:07:47 +00002703 <para>
2704 Usage: rmdir DIRECTORY...
2705 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002706
Eric Andersen21580922000-07-07 19:07:47 +00002707 <para>
2708 Remove DIRECTORY(s) if they are empty.
2709 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002710
Eric Andersen21580922000-07-07 19:07:47 +00002711 <para>
2712 Example:
2713 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002714
Eric Andersen21580922000-07-07 19:07:47 +00002715 <para>
2716 <screen>
2717 $ rmdir /tmp/foo
2718 </screen>
2719 </para>
2720 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002721
Eric Andersen21580922000-07-07 19:07:47 +00002722 <sect1 id="rmmod">
2723 <title>rmmod</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002724
Eric Andersen21580922000-07-07 19:07:47 +00002725 <para>
2726 Usage: rmmod [OPTION]... [MODULE]...
2727 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002728
Eric Andersen21580922000-07-07 19:07:47 +00002729 <para>
2730 Unload MODULE(s) from the kernel.
2731 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002732
Eric Andersen21580922000-07-07 19:07:47 +00002733 <para>
2734 Options:
2735 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002736
Eric Andersen21580922000-07-07 19:07:47 +00002737 <para>
2738 <screen>
2739 -a Try to remove all unused kernel modules
2740 </screen>
2741 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002742
Eric Andersen21580922000-07-07 19:07:47 +00002743 <para>
2744 Example:
2745 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002746
Eric Andersen21580922000-07-07 19:07:47 +00002747 <para>
2748 <screen>
2749 $ rmmod tulip
2750 </screen>
2751 </para>
2752 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002753
Eric Andersen21580922000-07-07 19:07:47 +00002754 <sect1 id="sed">
2755 <title>sed</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002756
Eric Andersen21580922000-07-07 19:07:47 +00002757 <para>
2758 Usage: sed [OPTION]... SCRIPT [FILE]...
2759 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002760
Eric Andersen21580922000-07-07 19:07:47 +00002761 <para>
2762 Allowed sed scripts come in the following form:
2763 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002764
Eric Andersen21580922000-07-07 19:07:47 +00002765 <para>
2766 <screen>
2767 ADDR [!] COMMAND
2768 </screen>
2769 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002770
Eric Andersen21580922000-07-07 19:07:47 +00002771 <para>
2772 ADDR can be:
2773 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002774
Eric Andersen21580922000-07-07 19:07:47 +00002775 <para>
2776 <screen>
2777 NUMBER Match specified line number
2778 $ Match last line
2779 /REGEXP/ Match specified regexp
2780 </screen>
2781 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002782
Eric Andersen21580922000-07-07 19:07:47 +00002783 <para>
2784 ! inverts the meaning of the match
2785 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002786
Eric Andersen21580922000-07-07 19:07:47 +00002787 <para>
2788 COMMAND can be:
2789 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002790
Eric Andersen21580922000-07-07 19:07:47 +00002791 <para>
2792 <screen>
2793 s/regexp/replacement/[igp]
2794 which attempt to match regexp against the pattern space
2795 and if successful replaces the matched portion with replacement.
2796 aTEXT
2797 which appends TEXT after the pattern space
2798 </screen>
2799 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002800
Eric Andersen21580922000-07-07 19:07:47 +00002801 <para>
2802 This version of sed matches full regular expressions.
2803 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002804
Eric Andersen21580922000-07-07 19:07:47 +00002805 <para>
2806 Options:
2807 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002808
Eric Andersen21580922000-07-07 19:07:47 +00002809 <para>
2810 <screen>
2811 -e Add the script to the commands to be executed
2812 -n Suppress automatic printing of pattern space
2813 </screen>
2814 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002815
Eric Andersen21580922000-07-07 19:07:47 +00002816 <para>
2817 Example:
2818 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002819
Eric Andersen21580922000-07-07 19:07:47 +00002820 <para>
2821 <screen>
2822 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
2823 bar
2824 </screen>
2825 </para>
2826 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002827
Eric Andersen21580922000-07-07 19:07:47 +00002828 <sect1 id="setkeycodes">
2829 <title>setkeycodes</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002830
Eric Andersen21580922000-07-07 19:07:47 +00002831 <para>
2832 Usage: setkeycodes SCANCODE KEYCODE ...
2833 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002834
Eric Andersen21580922000-07-07 19:07:47 +00002835 <para>
2836 Set entries into the kernel's scancode-to-keycode map,
2837 allowing unusual keyboards to generate usable keycodes.
2838 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002839
Eric Andersen21580922000-07-07 19:07:47 +00002840 <para>
2841 SCANCODE may be either xx or e0xx (hexadecimal), and
2842 KEYCODE is given in decimal.
2843 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002844
Eric Andersen21580922000-07-07 19:07:47 +00002845 <para>
2846 Example:
2847 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002848
Eric Andersen21580922000-07-07 19:07:47 +00002849 <para>
2850 <screen>
2851 $ setkeycodes e030 127
2852 </screen>
2853 </para>
2854 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002855
Mark Whitley83a949c2000-06-26 13:31:53 +00002856
Eric Andersen21580922000-07-07 19:07:47 +00002857 <sect1 id="sh">
2858 <title>sh</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002859
Eric Andersen21580922000-07-07 19:07:47 +00002860 <para>
2861 Usage: sh
2862 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002863
Eric Andersen21580922000-07-07 19:07:47 +00002864 <para>
2865 lash -- the BusyBox LAme SHell (command interpreter)
2866 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002867
Eric Andersen21580922000-07-07 19:07:47 +00002868 <para>
2869 This command does not yet have proper documentation.
2870 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002871
Eric Andersen21580922000-07-07 19:07:47 +00002872 <para>
2873 Use lash just as you would use any other shell. It
2874 properly handles pipes, redirects, job control, can be
2875 used as the shell for scripts (#!/bin/sh), and has a
2876 sufficient set of builtins to do what is needed. It does
2877 not (yet) support Bourne Shell syntax. If you need
2878 things like ``if-then-else'', ``while'', and such, use
2879 ash or bash. If you just need a very simple and
2880 extremely small shell, this will do the job.
2881 </para>
2882 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002883
Eric Andersen21580922000-07-07 19:07:47 +00002884 <sect1 id="sleep">
2885 <title>sleep</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002886
Eric Andersen21580922000-07-07 19:07:47 +00002887 <para>
2888 Usage: sleep N
2889 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002890
Eric Andersen21580922000-07-07 19:07:47 +00002891 <para>
2892 Pause for N seconds.
2893 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002894
Eric Andersen21580922000-07-07 19:07:47 +00002895 <para>
2896 Example:
2897 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002898
Eric Andersen21580922000-07-07 19:07:47 +00002899 <para>
2900 <screen>
2901 $ sleep 2
2902 [2 second delay results]
2903 </screen>
2904 </para>
2905 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002906
Eric Andersen21580922000-07-07 19:07:47 +00002907 <sect1 id="sort">
2908 <title>sort</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002909
Eric Andersen21580922000-07-07 19:07:47 +00002910 <para>
2911 Usage: sort [OPTION]... [FILE]...
2912 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002913
Eric Andersen21580922000-07-07 19:07:47 +00002914 <para>
2915 Sort lines of text in FILE(s).
2916 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002917
Eric Andersen21580922000-07-07 19:07:47 +00002918 <para>
2919 Options:
2920 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002921
Eric Andersen21580922000-07-07 19:07:47 +00002922 <para>
2923 <screen>
2924 -n Compare numerically
2925 -r Reverse after sorting
2926 </screen>
2927 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002928
Eric Andersen21580922000-07-07 19:07:47 +00002929 <para>
2930 Example:
2931 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002932
Eric Andersen21580922000-07-07 19:07:47 +00002933 <para>
2934 <screen>
2935 $ echo -e "e\nf\nb\nd\nc\na" | sort
2936 a
2937 b
2938 c
2939 d
2940 e
2941 f
2942 </screen>
2943 </para>
2944 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002945
Eric Andersen21580922000-07-07 19:07:47 +00002946 <sect1 id="swapoff">
2947 <title>swapoff</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002948
Eric Andersen21580922000-07-07 19:07:47 +00002949 <para>
2950 Usage: swapoff [OPTION] [DEVICE]
2951 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002952
Eric Andersen21580922000-07-07 19:07:47 +00002953 <para>
2954 Stop swapping virtual memory pages on DEVICE.
2955 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002956
Eric Andersen21580922000-07-07 19:07:47 +00002957 <para>
2958 Options:
2959 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002960
Eric Andersen21580922000-07-07 19:07:47 +00002961 <para>
2962 <screen>
2963 -a Stop swapping on all swap devices
2964 </screen>
2965 </para>
2966 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002967
Eric Andersen21580922000-07-07 19:07:47 +00002968 <sect1 id="swapon">
2969 <title>swapon</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002970
Eric Andersen21580922000-07-07 19:07:47 +00002971 <para>
2972 Usage: swapon [OPTION] [DEVICE]
2973 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002974
Eric Andersen21580922000-07-07 19:07:47 +00002975 <para>
2976 Start swapping virtual memory pages on the given device.
2977 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002978
Eric Andersen21580922000-07-07 19:07:47 +00002979 <para>
2980 Options:
2981 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002982
Eric Andersen21580922000-07-07 19:07:47 +00002983 <para>
2984 <screen>
2985 -a Start swapping on all swap devices
2986 </screen>
2987 </para>
2988 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00002989
Eric Andersen21580922000-07-07 19:07:47 +00002990 <sect1 id="sync">
2991 <title>sync</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00002992
Eric Andersen21580922000-07-07 19:07:47 +00002993 <para>
2994 Usage: sync
2995 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00002996
Eric Andersen21580922000-07-07 19:07:47 +00002997 <para>
2998 Write all buffered filesystem blocks to disk.
2999 </para>
3000 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003001
Eric Andersen21580922000-07-07 19:07:47 +00003002 <sect1 id="syslogd">
3003 <title>syslogd</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003004
Eric Andersen21580922000-07-07 19:07:47 +00003005 <para>
3006 Usage: syslogd [OPTION]...
3007 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003008
Eric Andersen21580922000-07-07 19:07:47 +00003009 <para>
3010 Linux system and kernel (provides klogd) logging
3011 utility. Note that this version of syslogd/klogd ignores
3012 /etc/syslog.conf.
3013 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003014
Eric Andersen21580922000-07-07 19:07:47 +00003015 <para>
3016 Options:
3017 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003018
Eric Andersen21580922000-07-07 19:07:47 +00003019 <para>
3020 <screen>
3021 -m NUM Interval between MARK lines (default=20min, 0=off)
3022 -n Run as a foreground process
3023 -K Do not start up the klogd process
3024 -O FILE Use an alternate log file (default=/var/log/messages)
Eric Andersen70d09ed2000-12-11 16:24:16 +00003025 -R HOST[:PORT] Log remotely to IP or hostname on PORT (default PORT=514/UDP)
Eric Andersen20c2bdd2000-12-11 19:39:25 +00003026 -L Log locally as well as network logging (default is network only)
Eric Andersen21580922000-07-07 19:07:47 +00003027 </screen>
3028 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003029
Eric Andersen21580922000-07-07 19:07:47 +00003030 <para>
3031 Example:
3032 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003033
Eric Andersen21580922000-07-07 19:07:47 +00003034 <para>
3035 <screen>
Eric Andersenced2cef2000-07-20 23:41:24 +00003036 $ syslogd -R masterlog:514
3037 $ syslogd -R 192.168.1.1:601
Eric Andersen21580922000-07-07 19:07:47 +00003038 </screen>
3039 </para>
3040 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003041
Eric Andersen21580922000-07-07 19:07:47 +00003042 <sect1 id="tail">
3043 <title>tail</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003044
Eric Andersen21580922000-07-07 19:07:47 +00003045 <para>
3046 Usage: tail [OPTION] [FILE]...
3047 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003048
Eric Andersen21580922000-07-07 19:07:47 +00003049 <para>
3050 Print last 10 lines of each FILE to standard output.
3051 With more than one FILE, precede each with a header
3052 giving the file name. With no FILE, or when FILE is -,
3053 read stdin.
3054 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003055
Eric Andersen21580922000-07-07 19:07:47 +00003056 <para>
3057 Options:
3058 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003059
Eric Andersen21580922000-07-07 19:07:47 +00003060 <para>
3061 <screen>
3062 -n NUM Print last NUM lines instead of last 10
3063 -f Output data as the file grows. This version
3064 of 'tail -f' supports only one file at a time.
3065 </screen>
3066 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003067
Eric Andersen21580922000-07-07 19:07:47 +00003068 <para>
3069 Example:
3070 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003071
Eric Andersen21580922000-07-07 19:07:47 +00003072 <para>
3073 <screen>
3074 $ tail -n 1 /etc/resolv.conf
3075 nameserver 10.0.0.1
3076 </screen>
3077 </para>
3078 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003079
Eric Andersen21580922000-07-07 19:07:47 +00003080 <sect1 id="tar">
3081 <title>tar</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003082
Eric Andersen21580922000-07-07 19:07:47 +00003083 <para>
3084 Usage: tar [MODE] [OPTION] [FILE]...
3085 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003086
Eric Andersen21580922000-07-07 19:07:47 +00003087 <para>
3088
3089 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003090
Eric Andersen21580922000-07-07 19:07:47 +00003091 <para>
3092 MODE may be chosen from
3093 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003094
Eric Andersen21580922000-07-07 19:07:47 +00003095 <para>
3096 <screen>
3097 c Create
3098 x Extract
3099 t List
3100 </screen>
3101 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003102
Eric Andersen21580922000-07-07 19:07:47 +00003103 <para>
3104 Options:
3105 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003106
Eric Andersen21580922000-07-07 19:07:47 +00003107 <para>
3108 <screen>
Eric Andersenfdd51032000-08-02 18:48:26 +00003109 f FILE Use FILE for tarfile (or stdin if '-')
3110 O Extract to stdout
3111 exclude FILE File to exclude
3112 v List files processed
Eric Andersen21580922000-07-07 19:07:47 +00003113 </screen>
3114 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003115
Eric Andersen21580922000-07-07 19:07:47 +00003116 <para>
3117 Example:
3118 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003119
Eric Andersen21580922000-07-07 19:07:47 +00003120 <para>
3121 <screen>
3122 $ zcat /tmp/tarball.tar.gz | tar -xf -
3123 $ tar -cf /tmp/tarball.tar /usr/local
3124 </screen>
3125 </para>
3126 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003127
Eric Andersen21580922000-07-07 19:07:47 +00003128 <sect1 id="tee">
3129 <title>tee</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003130
Eric Andersen21580922000-07-07 19:07:47 +00003131 <para>
3132 Usage: tee [OPTION]... [FILE]...
3133 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003134
Eric Andersen21580922000-07-07 19:07:47 +00003135 <para>
3136 Copy stdin to FILE(s), and also to stdout.
3137 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003138
Eric Andersen21580922000-07-07 19:07:47 +00003139 <para>
3140 Options:
3141 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003142
Eric Andersen21580922000-07-07 19:07:47 +00003143 <para>
3144 <screen>
3145 -a Append to the given FILEs, do not overwrite
3146 </screen>
3147 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003148
Eric Andersen21580922000-07-07 19:07:47 +00003149 <para>
3150 Example:
3151 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003152
Eric Andersen21580922000-07-07 19:07:47 +00003153 <para>
3154 <screen>
3155 $ echo "Hello" | tee /tmp/foo
3156 Hello
3157 $ cat /tmp/foo
3158 Hello
3159 </screen>
3160 </para>
3161 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003162
Eric Andersen21580922000-07-07 19:07:47 +00003163 <sect1 id="telnet">
3164 <title>telnet</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003165
Eric Andersen21580922000-07-07 19:07:47 +00003166 <para>
3167 Usage: telnet HOST [PORT]
3168 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003169
Eric Andersen21580922000-07-07 19:07:47 +00003170 <para>
3171 Establish interactive communication with another
3172 computer over a network using the TELNET protocol.
3173 </para>
3174 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003175
Eric Andersen21580922000-07-07 19:07:47 +00003176 <sect1 id="test">
3177 <title>test, [</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003178
Eric Andersen21580922000-07-07 19:07:47 +00003179 <para>
3180 Usage: test EXPRESSION
3181 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003182
Eric Andersen21580922000-07-07 19:07:47 +00003183 <para>
Eric Andersen21580922000-07-07 19:07:47 +00003184 or: [ EXPRESSION ]
Pavel Roskind2d3aa32000-09-15 17:16:40 +00003185 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003186
Eric Andersen21580922000-07-07 19:07:47 +00003187 <para>
3188 Check file types and compare values returning an exit
3189 code determined by the value of EXPRESSION.
3190 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003191
Eric Andersen21580922000-07-07 19:07:47 +00003192 <para>
3193 Example:
3194 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003195
Eric Andersen21580922000-07-07 19:07:47 +00003196 <para>
3197 <screen>
3198 $ test 1 -eq 2
3199 $ echo $?
3200 1
3201 $ test 1 -eq 1
3202 $ echo $?
3203 0
3204 $ [ -d /etc ]
3205 $ echo $?
3206 0
3207 $ [ -d /junk ]
3208 $ echo $?
3209 1
3210 </screen>
3211 </para>
3212 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003213
Eric Andersen21580922000-07-07 19:07:47 +00003214 <sect1 id="touch">
3215 <title>touch</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003216
Eric Andersen21580922000-07-07 19:07:47 +00003217 <para>
3218 Usage: touch [OPTION]... FILE...
3219 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003220
Eric Andersen21580922000-07-07 19:07:47 +00003221 <para>
3222 Update the last-modified date on (or create) FILE(s).
3223 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003224
Eric Andersen21580922000-07-07 19:07:47 +00003225 <para>
3226 Options:
3227 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003228
Eric Andersen21580922000-07-07 19:07:47 +00003229 <para>
3230 <screen>
3231 -c Do not create files
3232 </screen>
3233 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003234
Eric Andersen21580922000-07-07 19:07:47 +00003235 <para>
3236 Example:
3237 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003238
Eric Andersen21580922000-07-07 19:07:47 +00003239 <para>
3240 <screen>
3241 $ ls -l /tmp/foo
3242 /bin/ls: /tmp/foo: No such file or directory
3243 $ touch /tmp/foo
3244 $ ls -l /tmp/foo
3245 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
3246 </screen>
3247 </para>
3248 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003249
Eric Andersen21580922000-07-07 19:07:47 +00003250 <sect1 id="tr">
3251 <title>tr</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003252
Eric Andersen21580922000-07-07 19:07:47 +00003253 <para>
3254 Usage: tr [OPTION]... STRING1 [STRING2]
3255 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003256
Eric Andersen21580922000-07-07 19:07:47 +00003257 <para>
3258 Translate, squeeze, and/or delete characters from stdin,
3259 writing to stdout.
3260 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003261
Eric Andersen21580922000-07-07 19:07:47 +00003262 <para>
3263 Options:
3264 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003265
Eric Andersen21580922000-07-07 19:07:47 +00003266 <para>
3267 <screen>
3268 -c Take complement of STRING1
3269 -d Delete input characters coded STRING1
3270 -s Squeeze multiple output characters of STRING2 into one character
3271 </screen>
3272 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003273
Eric Andersen21580922000-07-07 19:07:47 +00003274 <para>
3275 Example:
3276 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003277
Eric Andersen21580922000-07-07 19:07:47 +00003278 <para>
3279 <screen>
3280 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
3281 hello world
3282 </screen>
3283 </para>
3284 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003285
Eric Andersen21580922000-07-07 19:07:47 +00003286 <sect1 id="true">
3287 <title>true</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003288
Eric Andersen21580922000-07-07 19:07:47 +00003289 <para>
3290 Usage: true
3291 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003292
Eric Andersen21580922000-07-07 19:07:47 +00003293 <para>
3294 Return an exit code of TRUE (1).
3295 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003296
Eric Andersen21580922000-07-07 19:07:47 +00003297 <para>
3298 Example:
3299 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003300
Eric Andersen21580922000-07-07 19:07:47 +00003301 <para>
3302 <screen>
3303 $ true
3304 $ echo $?
3305 0
3306 </screen>
3307 </para>
3308 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003309
Eric Andersen21580922000-07-07 19:07:47 +00003310 <sect1 id="tty">
3311 <title>tty</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003312
Eric Andersen21580922000-07-07 19:07:47 +00003313 <para>
3314 Usage: tty
3315 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003316
Eric Andersen21580922000-07-07 19:07:47 +00003317 <para>
3318 Print the file name of the terminal connected to stdin.
3319 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003320
Eric Andersen21580922000-07-07 19:07:47 +00003321 <para>
3322 Options:
3323 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003324
Eric Andersen21580922000-07-07 19:07:47 +00003325 <para>
3326 <screen>
3327 -s Print nothing, only return an exit status
3328 </screen>
3329 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003330
Eric Andersen21580922000-07-07 19:07:47 +00003331 <para>
3332 Example:
3333 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003334
Eric Andersen21580922000-07-07 19:07:47 +00003335 <para>
3336 <screen>
3337 $ tty
3338 /dev/tty2
3339 </screen>
3340 </para>
3341 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003342
Eric Andersen21580922000-07-07 19:07:47 +00003343 <sect1 id="umount">
3344 <title>umount</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003345
Eric Andersen21580922000-07-07 19:07:47 +00003346 <para>
3347 Usage: umount [OPTION]... DEVICE|DIRECTORY
3348 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003349
Eric Andersen21580922000-07-07 19:07:47 +00003350 <para>
3351
3352 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003353
Eric Andersen21580922000-07-07 19:07:47 +00003354 <para>
3355 Options:
3356 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003357
Eric Andersen21580922000-07-07 19:07:47 +00003358 <para>
3359 <screen>
3360 -a Unmount all file systems
3361 -r Try to remount devices as read-only if mount is busy
3362 -f Force filesystem umount (i.e. unreachable NFS server)
3363 -l Do not free loop device (if a loop device has been used)
3364 </screen>
3365 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003366
Eric Andersen21580922000-07-07 19:07:47 +00003367 <para>
3368 Example:
3369 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003370
Eric Andersen21580922000-07-07 19:07:47 +00003371 <para>
3372 <screen>
3373 $ umount /dev/hdc1
3374 </screen>
3375 </para>
3376 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003377
Eric Andersen21580922000-07-07 19:07:47 +00003378 <sect1 id="uname">
3379 <title>uname</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003380
Eric Andersen21580922000-07-07 19:07:47 +00003381 <para>
3382 Usage: uname [OPTION]...
3383 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003384
Eric Andersen21580922000-07-07 19:07:47 +00003385 <para>
3386 Print certain system information. With no OPTION, same
3387 as -s.
3388 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003389
Eric Andersen21580922000-07-07 19:07:47 +00003390 <para>
3391 Options:
3392 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003393
Eric Andersen21580922000-07-07 19:07:47 +00003394 <para>
3395 <screen>
3396 -a Print all information
3397 -m Print the machine (hardware) type
3398 -n Print the machine's network node hostname
3399 -r Print the operating system release
3400 -s Print the operating system name
3401 -p Print the host processor type
3402 -v Print the operating system version
3403 </screen>
3404 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003405
Eric Andersen21580922000-07-07 19:07:47 +00003406 <para>
3407 Example:
3408 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003409
Eric Andersen21580922000-07-07 19:07:47 +00003410 <para>
3411 <screen>
3412 $ uname -a
3413 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
3414 </screen>
3415 </para>
3416 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003417
Eric Andersen21580922000-07-07 19:07:47 +00003418 <sect1 id="uniq">
3419 <title>uniq</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003420
Eric Andersen21580922000-07-07 19:07:47 +00003421 <para>
3422 Usage: uniq [INPUT [OUTPUT]]
3423 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003424
Eric Andersen21580922000-07-07 19:07:47 +00003425 <para>
3426 Discard all but one of successive identical lines from
3427 INPUT (or stdin), writing to OUTPUT (or stdout).
3428 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003429
Eric Andersen21580922000-07-07 19:07:47 +00003430 <para>
Eric Andersen5b5db382000-12-09 16:37:53 +00003431 Options:
3432 </para>
3433
3434 <para>
3435 <screen>
3436 -c prefix lines by the number of occurrences
3437 -d only print duplicate lines
3438 -u only print unique lines
3439 </screen>
3440 </para>
3441
3442 <para>
Eric Andersen21580922000-07-07 19:07:47 +00003443 Example:
3444 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003445
Eric Andersen21580922000-07-07 19:07:47 +00003446 <para>
3447 <screen>
3448 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
3449 a
3450 b
3451 c
3452 </screen>
3453 </para>
3454 </sect1>
Eric Andersencff3fe32000-09-20 19:22:26 +00003455
3456 <sect1 id="unix2dos">
3457 <title>unix2dos</title>
3458
3459 <para>
3460 Usage: unix2dos < unixfile > dosfile
3461 </para>
3462
3463 <para>
3464 Converts a text file from unix format to dos format.
3465 </para>
3466
3467 </sect1>
3468
3469 <sect1 id="unrpm">
Eric Andersen57f83ff2000-09-24 02:41:44 +00003470 <title>unrpm</title>
Eric Andersencff3fe32000-09-20 19:22:26 +00003471
3472 <para>
3473 Usage: unrpm < package.rpm | gzip -d | cpio -idmuv
3474 </para>
3475
3476 <para>
3477 Extracts an rpm archive.
3478 </para>
3479
3480 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003481
Eric Andersen21580922000-07-07 19:07:47 +00003482 <sect1 id="update">
3483 <title>update</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003484
Eric Andersen21580922000-07-07 19:07:47 +00003485 <para>
3486 Usage: update [OPTION]...
3487 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003488
Eric Andersen21580922000-07-07 19:07:47 +00003489 <para>
3490 Periodically flush filesystem buffers.
3491 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003492
Eric Andersen21580922000-07-07 19:07:47 +00003493 <para>
3494 Options:
3495 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003496
Eric Andersen21580922000-07-07 19:07:47 +00003497 <para>
3498 <screen>
3499 -S Force use of sync(2) instead of flushing
3500 -s SECS Call sync this often (default 30)
3501 -f SECS Flush some buffers this often (default 5)
3502 </screen>
3503 </para>
3504 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003505
Eric Andersen21580922000-07-07 19:07:47 +00003506 <sect1 id="uptime">
3507 <title>uptime</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003508
Eric Andersen21580922000-07-07 19:07:47 +00003509 <para>
3510 Usage: uptime
3511 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003512
Eric Andersen21580922000-07-07 19:07:47 +00003513 <para>
3514 Display how long the system has been running since boot.
3515 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003516
Eric Andersen21580922000-07-07 19:07:47 +00003517 <para>
3518 Example:
3519 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003520
Eric Andersen21580922000-07-07 19:07:47 +00003521 <para>
3522 <screen>
3523 $ uptime
3524 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
3525 </screen>
3526 </para>
3527 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003528
Eric Andersen21580922000-07-07 19:07:47 +00003529 <sect1 id="usleep">
3530 <title>usleep</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003531
Eric Andersen21580922000-07-07 19:07:47 +00003532 <para>
3533 Usage: usleep N
3534 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003535
Eric Andersen21580922000-07-07 19:07:47 +00003536 <para>
3537 Pause for N microseconds.
3538 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003539
Eric Andersen21580922000-07-07 19:07:47 +00003540 <para>
3541 Example:
3542 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003543
Eric Andersen21580922000-07-07 19:07:47 +00003544 <para>
3545 <screen>
3546 $ usleep 1000000
3547 [pauses for 1 second]
3548 </screen>
3549 </para>
3550 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003551
Eric Andersen21580922000-07-07 19:07:47 +00003552 <sect1 id="uudecode">
3553 <title>uudecode</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003554
Eric Andersen21580922000-07-07 19:07:47 +00003555 <para>
3556 Usage: uudecode [OPTION] [FILE]
3557 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003558
Eric Andersen21580922000-07-07 19:07:47 +00003559 <para>
3560 Uudecode a uuencoded file.
3561 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003562
Eric Andersen21580922000-07-07 19:07:47 +00003563 <para>
3564 Options:
3565 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003566
Eric Andersen21580922000-07-07 19:07:47 +00003567 <para>
3568 <screen>
3569 -o FILE Direct output to FILE
3570 </screen>
3571 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003572
Eric Andersen21580922000-07-07 19:07:47 +00003573 <para>
3574 Example:
3575 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003576
Eric Andersen21580922000-07-07 19:07:47 +00003577 <para>
3578 <screen>
3579 $ uudecode -o busybox busybox.uu
3580 $ ls -l busybox
3581 -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
3582 </screen>
3583 </para>
3584 </sect1>
Eric Andersen028fb622000-07-04 20:07:13 +00003585
Eric Andersen21580922000-07-07 19:07:47 +00003586 <sect1 id="uuencode">
3587 <title>uuencode</title>
Eric Andersen028fb622000-07-04 20:07:13 +00003588
Eric Andersen21580922000-07-07 19:07:47 +00003589 <para>
3590 Usage: uuencode [OPTION] [INFILE] OUTFILE
3591 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003592
Eric Andersen21580922000-07-07 19:07:47 +00003593 <para>
3594 Uuencode a file.
3595 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003596
Eric Andersen21580922000-07-07 19:07:47 +00003597 <para>
3598 Options:
3599 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003600
Eric Andersen21580922000-07-07 19:07:47 +00003601 <para>
3602 <screen>
3603 -m Use base64 encoding as of RFC1521
3604 </screen>
3605 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003606
Eric Andersen21580922000-07-07 19:07:47 +00003607 <para>
3608 Example:
3609 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003610
Eric Andersen21580922000-07-07 19:07:47 +00003611 <para>
3612 <screen>
3613 $ uuencode busybox busybox
3614 begin 755 busybox
3615 M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&amp;
3616 .....
3617 $ uudecode busybox busybox &gt; busybox.uu
3618 $
3619 </screen>
3620 </para>
3621 </sect1>
Eric Andersen028fb622000-07-04 20:07:13 +00003622
Eric Andersen21580922000-07-07 19:07:47 +00003623 <sect1 id="wc">
3624 <title>wc</title>
Eric Andersen028fb622000-07-04 20:07:13 +00003625
Eric Andersen21580922000-07-07 19:07:47 +00003626 <para>
3627 Usage: wc [OPTION]... [FILE]...
3628 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003629
Eric Andersen21580922000-07-07 19:07:47 +00003630 <para>
3631 Print line, word, and byte counts for each FILE, and a
3632 total line if more than one FILE is specified. With no
3633 FILE, read stdin.
3634 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003635
Eric Andersen21580922000-07-07 19:07:47 +00003636 <para>
3637 Options:
3638 </para>
Eric Andersen028fb622000-07-04 20:07:13 +00003639
Eric Andersen21580922000-07-07 19:07:47 +00003640 <para>
3641 <screen>
3642 -c Print the byte counts
3643 -l Print the newline counts
3644 -L Print the length of the longest line
3645 -w Print the word counts
3646 </screen>
3647 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003648
Eric Andersen21580922000-07-07 19:07:47 +00003649 <para>
3650 Example:
3651 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003652
Eric Andersen21580922000-07-07 19:07:47 +00003653 <para>
3654 <screen>
3655 $ wc /etc/passwd
3656 31 46 1365 /etc/passwd
3657 </screen>
3658 </para>
3659 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003660
Eric Andersen21580922000-07-07 19:07:47 +00003661 <sect1 id="which">
3662 <title>which</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003663
Eric Andersen21580922000-07-07 19:07:47 +00003664 <para>
3665 Usage: which [COMMAND]...
3666 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003667
Eric Andersen21580922000-07-07 19:07:47 +00003668 <para>
3669 Locate COMMAND(s).
3670 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003671
Eric Andersen21580922000-07-07 19:07:47 +00003672 <para>
3673 Example:
3674 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003675
Eric Andersen21580922000-07-07 19:07:47 +00003676 <para>
3677 <screen>
3678 $ which login
3679 /bin/login
3680 </screen>
3681 </para>
3682 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003683
Eric Andersen21580922000-07-07 19:07:47 +00003684 <sect1 id="whoami">
3685 <title>whoami</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003686
Eric Andersen21580922000-07-07 19:07:47 +00003687 <para>
3688 Usage: whoami
3689 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003690
Eric Andersen21580922000-07-07 19:07:47 +00003691 <para>
3692 Print the user name associated with the current
3693 effective user id.
3694 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003695
Eric Andersen21580922000-07-07 19:07:47 +00003696 <para>
3697 Example:
3698 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003699
Eric Andersen21580922000-07-07 19:07:47 +00003700 <para>
3701 <screen>
3702 $ whoami
3703 andersen
3704 </screen>
3705 </para>
3706 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003707
Eric Andersen5b176932000-09-22 20:22:28 +00003708 <sect1 id="xargs">
3709 <title>xargs</title>
3710
3711 <para>
3712 Usage: xargs [OPTIONS] [COMMAND] [ARGS...]
3713 </para>
3714
3715 <para>
3716 Executes COMMAND on every item given by standard input.
3717 </para>
3718
3719 <para>
3720 Options:
3721 </para>
3722
3723 <para>
3724 <screen>
3725 -t Print the command just before it is run
Eric Andersen5b176932000-09-22 20:22:28 +00003726 </screen>
3727 </para>
3728
3729
3730 <para>
3731 Example:
3732 </para>
3733
3734 <para>
3735 <screen>
3736 $ ls | xargs gzip
3737 $ find . -name '*.c' -print | xargs rm
3738 </screen>
3739 </para>
3740 </sect1>
3741
Eric Andersen21580922000-07-07 19:07:47 +00003742 <sect1 id="yes">
3743 <title>yes</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003744
Eric Andersen21580922000-07-07 19:07:47 +00003745 <para>
3746 Usage: yes [STRING]...
3747 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003748
Eric Andersen21580922000-07-07 19:07:47 +00003749 <para>
3750 Repeatedly output a line with all specified STRING(s),
3751 or `y'.
3752 </para>
3753 </sect1>
Mark Whitley83a949c2000-06-26 13:31:53 +00003754
Eric Andersen21580922000-07-07 19:07:47 +00003755 <sect1 id="zcat">
3756 <title>zcat</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003757
Eric Andersen21580922000-07-07 19:07:47 +00003758 <para>
3759 Usage: zcat [OPTION]... FILE
3760 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003761
Eric Andersen21580922000-07-07 19:07:47 +00003762 <para>
3763 Uncompress FILE (or stdin if FILE is '-') to stdout.
3764 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003765
Eric Andersen21580922000-07-07 19:07:47 +00003766 <para>
3767 Options:
3768 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003769
Eric Andersen21580922000-07-07 19:07:47 +00003770 <para>
3771 <screen>
3772 -t Test compressed file integrity
3773 </screen>
3774 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003775
Eric Andersen21580922000-07-07 19:07:47 +00003776 <para>
3777 Example:
3778 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003779
Eric Andersen21580922000-07-07 19:07:47 +00003780 <para>
3781 <screen>
3782 </screen>
3783 </para>
3784 </sect1>
3785 </chapter>
Mark Whitley83a949c2000-06-26 13:31:53 +00003786
Eric Andersen21580922000-07-07 19:07:47 +00003787 <chapter id="LIBC-NSS">
3788 <title>LIBC NSS</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003789
Eric Andersen21580922000-07-07 19:07:47 +00003790 <para>
3791 GNU Libc uses the Name Service Switch (NSS) to configure the
3792 behavior of the C library for the local environment, and to
3793 configure how it reads system data, such as passwords and group
3794 information. BusyBox has made it Policy that it will never use
3795 NSS, and will never use libc calls that make use of NSS. This
3796 allows you to run an embedded system without the need for
3797 installing an /etc/nsswitch.conf file and without /lib/libnss_*
3798 libraries installed.
3799 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003800
Eric Andersen21580922000-07-07 19:07:47 +00003801 <para>
3802 If you are using a system that is using a remote LDAP server for
3803 authentication via GNU libc NSS, and you want to use BusyBox,
3804 then you will need to adjust the BusyBox source. Chances are
3805 though, that if you have enough space to install of that stuff
3806 on your system, then you probably want the full GNU utilities.
3807 </para>
3808 </chapter>
Mark Whitley83a949c2000-06-26 13:31:53 +00003809
Eric Andersen21580922000-07-07 19:07:47 +00003810 <chapter id="SEE-ALSO">
3811 <title>SEE ALSO</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003812
Eric Andersen21580922000-07-07 19:07:47 +00003813 <para>
3814 <literal>textutils(1),</literal>
3815 <literal>shellutils(1),</literal>
3816 etc...
3817 </para>
3818 </chapter>
Mark Whitley83a949c2000-06-26 13:31:53 +00003819
Eric Andersen21580922000-07-07 19:07:47 +00003820 <chapter id="MAINTAINER">
3821 <title>MAINTAINER</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003822
Eric Andersen21580922000-07-07 19:07:47 +00003823 <para>
3824 Erik Andersen &lt;andersee@debian.org&gt; &lt;andersen@lineo.com&gt;
3825 </para>
3826 </chapter>
Mark Whitley83a949c2000-06-26 13:31:53 +00003827
Eric Andersen21580922000-07-07 19:07:47 +00003828 <chapter id="AUTHORS">
3829 <title>AUTHORS</title>
Mark Whitley83a949c2000-06-26 13:31:53 +00003830
Eric Andersen21580922000-07-07 19:07:47 +00003831 <para>
Eric Andersen57f83ff2000-09-24 02:41:44 +00003832 The following people have made significant contributions to
3833 BusyBox -- whether they know it or not.
Eric Andersen21580922000-07-07 19:07:47 +00003834 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003835
Eric Andersen21580922000-07-07 19:07:47 +00003836 <para>
3837 Erik Andersen &lt;andersee@debian.org&gt;
3838 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003839
Eric Andersen21580922000-07-07 19:07:47 +00003840 <para>
Eric Andersen57f83ff2000-09-24 02:41:44 +00003841 Edward Betts &lt;edward@debian.org&gt;
3842 </para>
3843
3844 <para>
Eric Andersen21580922000-07-07 19:07:47 +00003845 John Beppu &lt;beppu@lineo.com&gt;
3846 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003847
Eric Andersen21580922000-07-07 19:07:47 +00003848 <para>
3849 Brian Candler &lt;B.Candler@pobox.com&gt;
3850 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003851
Eric Andersen21580922000-07-07 19:07:47 +00003852 <para>
3853 Randolph Chung &lt;tausq@debian.org&gt;
3854 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003855
Eric Andersen21580922000-07-07 19:07:47 +00003856 <para>
3857 Dave Cinege &lt;dcinege@psychosis.com&gt;
3858 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003859
Eric Andersen21580922000-07-07 19:07:47 +00003860 <para>
3861 Karl M. Hegbloom &lt;karlheg@debian.org&gt;
3862 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003863
Eric Andersen21580922000-07-07 19:07:47 +00003864 <para>
Eric Andersen57f83ff2000-09-24 02:41:44 +00003865 Daniel Jacobowitz &lt;dan@debian.org&gt;
3866 </para>
3867
3868 <para>
3869 Matt Kraai &lt;kraai@alumni.carnegiemellon.edu&gt;
3870 </para>
3871
3872 <para>
Eric Andersen21580922000-07-07 19:07:47 +00003873 John Lombardo &lt;john@deltanet.com&gt;
3874 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003875
Eric Andersen21580922000-07-07 19:07:47 +00003876 <para>
3877 Glenn McGrath &lt;bug1@netconnect.com.au&gt;
3878 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003879
Eric Andersen21580922000-07-07 19:07:47 +00003880 <para>
3881 Bruce Perens &lt;bruce@perens.com&gt;
3882 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003883
Eric Andersen21580922000-07-07 19:07:47 +00003884 <para>
Eric Andersen57f83ff2000-09-24 02:41:44 +00003885 Chip Rosenthal &lt;chip@unicom.com&gt;, &lt;crosenth@covad.com&gt;
3886 </para>
3887
3888 <para>
Eric Andersen21580922000-07-07 19:07:47 +00003889 Pavel Roskin &lt;proski@gnu.org&gt;
3890 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003891
Eric Andersen21580922000-07-07 19:07:47 +00003892 <para>
Eric Andersen57f83ff2000-09-24 02:41:44 +00003893 Gyepi Sam &lt;gyepi@praxis-sw.com&gt;
3894 </para>
3895
3896 <para>
Eric Andersen21580922000-07-07 19:07:47 +00003897 Linus Torvalds &lt;torvalds@transmeta.com&gt;
3898 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003899
John Beppu2aee9932000-09-15 08:04:42 +00003900 <para>
3901 Mark Whitley &lt;markw@lineo.com&gt;
3902 </para>
3903
Eric Andersen21580922000-07-07 19:07:47 +00003904 <para>
3905 Charles P. Wright &lt;cpwright@villagenet.com&gt;
3906 </para>
Mark Whitley83a949c2000-06-26 13:31:53 +00003907
Eric Andersen21580922000-07-07 19:07:47 +00003908 <para>
3909 Enrique Zanardi &lt;ezanardi@ull.es&gt;
3910 </para>
Eric Andersen57f83ff2000-09-24 02:41:44 +00003911
3912
Eric Andersen21580922000-07-07 19:07:47 +00003913 </chapter>
Mark Whitley83a949c2000-06-26 13:31:53 +00003914</book> <!-- End of the book -->