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