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