864dbe0aca83448a1dc4d02c5034c6f439b1ccdc
[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, reset, 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="reset">
2463             <title>reset</title>
2464
2465                 <para>
2466                 Usage: reset
2467                 </para>
2468
2469                 <para>
2470                 Resets the screen.
2471                 </para>
2472         </sect1>
2473
2474         <sect1 id="rm">
2475             <title>rm</title>
2476
2477                 <para>
2478                 Usage: rm [OPTION]... FILE...
2479                 </para>
2480
2481                 <para>
2482                 Remove (unlink) the FILE(s).  You may use '--' to
2483                 indicate that all following arguments are non-options.
2484                 </para>
2485
2486                 <para>
2487                 Options:
2488                 </para>
2489
2490                 <para>
2491                 <screen>
2492                         -f              Remove existing destinations, never prompt
2493                         -r or -R        Remove the contents of directories recursively
2494                 </screen>
2495                 </para>
2496
2497                 <para>
2498                 Example:
2499                 </para>
2500
2501                 <para>
2502                 <screen>
2503                         $ rm -rf /tmp/foo
2504                 </screen>
2505                 </para>
2506         </sect1>
2507
2508         <sect1 id="rmdir">
2509             <title>rmdir</title>
2510
2511                 <para>
2512                 Usage: rmdir DIRECTORY...
2513                 </para>
2514
2515                 <para>
2516                 Remove DIRECTORY(s) if they are empty.
2517                 </para>
2518
2519                 <para>
2520                 Example:
2521                 </para>
2522
2523                 <para>
2524                 <screen>
2525                         $ rmdir /tmp/foo
2526                 </screen>
2527                 </para>
2528         </sect1>
2529
2530         <sect1 id="rmmod">
2531             <title>rmmod</title>
2532
2533                 <para>
2534                 Usage: rmmod [OPTION]... [MODULE]...
2535                 </para>
2536
2537                 <para>
2538                 Unload MODULE(s) from the kernel.
2539                 </para>
2540
2541                 <para>
2542                 Options:
2543                 </para>
2544
2545                 <para>
2546                 <screen>
2547                         -a      Try to remove all unused kernel modules
2548                 </screen>
2549                 </para>
2550
2551                 <para>
2552                 Example:
2553                 </para>
2554
2555                 <para>
2556                 <screen>
2557                         $ rmmod tulip
2558                 </screen>
2559                 </para>
2560         </sect1>
2561
2562         <sect1 id="sed">
2563             <title>sed</title>
2564
2565                 <para>
2566                 Usage: sed [OPTION]... SCRIPT [FILE]...
2567                 </para>
2568
2569                 <para>
2570                 Allowed sed scripts come in the following form:
2571                 </para>
2572
2573                 <para>
2574                 <screen>
2575                 ADDR [!] COMMAND
2576                 </screen>
2577                 </para>
2578
2579                 <para>
2580                 ADDR can be:
2581                 </para>
2582
2583                 <para>
2584                 <screen>
2585                         NUMBER    Match specified line number
2586                         $         Match last line
2587                         /REGEXP/  Match specified regexp
2588                 </screen>
2589                 </para>
2590
2591                 <para>
2592                 ! inverts the meaning of the match
2593                 </para>
2594
2595                 <para>
2596                 COMMAND can be:
2597                 </para>
2598
2599                 <para>
2600                 <screen>
2601                         s/regexp/replacement/[igp]
2602                                 which attempt to match regexp against the pattern space
2603                                 and if successful replaces the matched portion with replacement.
2604                         aTEXT
2605                                 which appends TEXT after the pattern space
2606                 </screen>
2607                 </para>
2608
2609                 <para>
2610                 This version of sed matches full regular expressions.
2611                 </para>
2612
2613                 <para>
2614                 Options:
2615                 </para>
2616
2617                 <para>
2618                 <screen>
2619                         -e      Add the script to the commands to be executed
2620                         -n      Suppress automatic printing of pattern space
2621                 </screen>
2622                 </para>
2623
2624                 <para>
2625                 Example:
2626                 </para>
2627
2628                 <para>
2629                 <screen>
2630                         $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
2631                         bar
2632                 </screen>
2633                 </para>
2634         </sect1>
2635
2636         <sect1 id="setkeycodes">
2637             <title>setkeycodes</title>
2638
2639                 <para>
2640                 Usage: setkeycodes SCANCODE KEYCODE ...
2641                 </para>
2642
2643                 <para>
2644                 Set entries into the kernel's scancode-to-keycode map,
2645                 allowing unusual keyboards to generate usable keycodes.
2646                 </para>
2647
2648                 <para>
2649                 SCANCODE may be either xx or e0xx (hexadecimal), and
2650                 KEYCODE is given in decimal.
2651                 </para>
2652
2653                 <para>
2654                 Example:
2655                 </para>
2656
2657                 <para>
2658                 <screen>
2659                         $ setkeycodes e030 127
2660                 </screen>
2661                 </para>
2662         </sect1>
2663
2664
2665         <sect1 id="sh">
2666             <title>sh</title>
2667
2668                 <para>
2669                 Usage: sh
2670                 </para>
2671
2672                 <para>
2673                 lash -- the BusyBox LAme SHell (command interpreter)
2674                 </para>
2675
2676                 <para>
2677                 This command does not yet have proper documentation.  
2678                 </para>
2679
2680                 <para>
2681                 Use lash just as you would use any other shell. It
2682                 properly handles pipes, redirects, job control, can be
2683                 used as the shell for scripts (#!/bin/sh), and has a
2684                 sufficient set of builtins to do what is needed. It does
2685                 not (yet) support Bourne Shell syntax. If you need
2686                 things like ``if-then-else'', ``while'', and such, use
2687                 ash or bash. If you just need a very simple and
2688                 extremely small shell, this will do the job.
2689                 </para>
2690         </sect1>
2691
2692         <sect1 id="sleep">
2693             <title>sleep</title>
2694
2695                 <para>
2696                 Usage: sleep N
2697                 </para>
2698
2699                 <para>
2700                 Pause for N seconds.
2701                 </para>
2702
2703                 <para>
2704                 Example:
2705                 </para>
2706
2707                 <para>
2708                 <screen>
2709                         $ sleep 2
2710                         [2 second delay results]
2711                 </screen>
2712                 </para>
2713         </sect1>
2714
2715         <sect1 id="sort">
2716             <title>sort</title>
2717
2718                 <para>
2719                 Usage: sort [OPTION]... [FILE]...
2720                 </para>
2721
2722                 <para>
2723                 Sort lines of text in FILE(s).
2724                 </para>
2725
2726                 <para>
2727                 Options:
2728                 </para>
2729
2730                 <para>
2731                 <screen>
2732                         -n      Compare numerically
2733                         -r      Reverse after sorting
2734                 </screen>
2735                 </para>
2736
2737                 <para>
2738                 Example:
2739                 </para>
2740
2741                 <para>
2742                 <screen>
2743                         $ echo -e "e\nf\nb\nd\nc\na" | sort
2744                         a
2745                         b
2746                         c
2747                         d
2748                         e
2749                         f
2750                 </screen>
2751                 </para>
2752         </sect1>
2753
2754         <sect1 id="swapoff">
2755             <title>swapoff</title>
2756
2757                 <para>
2758                 Usage: swapoff [OPTION] [DEVICE]
2759                 </para>
2760
2761                 <para>
2762                 Stop swapping virtual memory pages on DEVICE.
2763                 </para>
2764
2765                 <para>
2766                 Options:
2767                 </para>
2768
2769                 <para>
2770                 <screen>
2771                         -a      Stop swapping on all swap devices
2772                 </screen>
2773                 </para>
2774         </sect1>
2775
2776         <sect1 id="swapon">
2777             <title>swapon</title>
2778
2779                 <para>
2780                 Usage: swapon [OPTION] [DEVICE]
2781                 </para>
2782
2783                 <para>
2784                 Start swapping virtual memory pages on the given device.
2785                 </para>
2786
2787                 <para>
2788                 Options:
2789                 </para>
2790
2791                 <para>
2792                 <screen>
2793                         -a      Start swapping on all swap devices
2794                 </screen>
2795                 </para>
2796         </sect1>
2797
2798         <sect1 id="sync">
2799             <title>sync</title>
2800
2801                 <para>
2802                 Usage: sync
2803                 </para>
2804
2805                 <para>
2806                 Write all buffered filesystem blocks to disk.
2807                 </para>
2808         </sect1>
2809
2810         <sect1 id="syslogd">
2811             <title>syslogd</title>
2812
2813                 <para>
2814                 Usage: syslogd [OPTION]...
2815                 </para>
2816
2817                 <para>
2818                 Linux system and kernel (provides klogd) logging
2819                 utility. Note that this version of syslogd/klogd ignores
2820                 /etc/syslog.conf.
2821                 </para>
2822
2823                 <para>
2824                 Options:
2825                 </para>
2826
2827                 <para>
2828                 <screen>
2829                         -m NUM  Interval between MARK lines (default=20min, 0=off)
2830                         -n      Run as a foreground process
2831                         -K      Do not start up the klogd process
2832                         -O FILE Use an alternate log file (default=/var/log/messages)
2833                         -R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
2834                 </screen>
2835                 </para>
2836
2837                 <para>
2838                 Example:
2839                 </para>
2840
2841                 <para>
2842                 <screen>
2843                 $ syslogd -R masterlog:514
2844                 $ syslogd -R 192.168.1.1:601
2845                 </screen>
2846                 </para>
2847         </sect1>
2848
2849         <sect1 id="tail">
2850             <title>tail</title>
2851
2852                 <para>
2853                 Usage: tail [OPTION] [FILE]...
2854                 </para>
2855
2856                 <para>
2857                 Print last 10 lines of each FILE to standard output.
2858                 With more than one FILE, precede each with a header
2859                 giving the file name. With no FILE, or when FILE is -,
2860                 read stdin.
2861                 </para>
2862
2863                 <para>
2864                 Options:
2865                 </para>
2866
2867                 <para>
2868                 <screen>
2869                         -n NUM  Print last NUM lines instead of last 10
2870                         -f      Output data as the file grows.  This version
2871                                 of 'tail -f' supports only one file at a time.
2872                 </screen>
2873                 </para>
2874
2875                 <para>
2876                 Example:
2877                 </para>
2878
2879                 <para>
2880                 <screen>
2881                         $ tail -n 1 /etc/resolv.conf
2882                         nameserver 10.0.0.1
2883                 </screen>
2884                 </para>
2885         </sect1>
2886
2887         <sect1 id="tar">
2888             <title>tar</title>
2889
2890                 <para>
2891                 Usage: tar [MODE] [OPTION] [FILE]...
2892                 </para>
2893
2894                 <para>
2895                 
2896                 </para>
2897
2898                 <para>
2899                 MODE may be chosen from
2900                 </para>
2901
2902                 <para>
2903                 <screen>
2904                         c       Create
2905                         x       Extract
2906                         t       List
2907                 </screen>
2908                 </para>
2909
2910                 <para>
2911                 Options:
2912                 </para>
2913
2914                 <para>
2915                 <screen>
2916                         f FILE                  Use FILE for tarfile (or stdin if '-')
2917                         O                               Extract to stdout
2918                         exclude FILE    File to exclude
2919                         v                               List files processed
2920                 </screen>
2921                 </para>
2922
2923                 <para>
2924                 Example:
2925                 </para>
2926
2927                 <para>
2928                 <screen>
2929                         $ zcat /tmp/tarball.tar.gz | tar -xf -
2930                         $ tar -cf /tmp/tarball.tar /usr/local
2931                 </screen>
2932                 </para>
2933         </sect1>
2934
2935         <sect1 id="tee">
2936             <title>tee</title>
2937
2938                 <para>
2939                 Usage: tee [OPTION]... [FILE]...
2940                 </para>
2941
2942                 <para>
2943                 Copy stdin to FILE(s), and also to stdout.
2944                 </para>
2945
2946                 <para>
2947                 Options:
2948                 </para>
2949
2950                 <para>
2951                 <screen>
2952                         -a      Append to the given FILEs, do not overwrite
2953                 </screen>
2954                 </para>
2955
2956                 <para>
2957                 Example:
2958                 </para>
2959
2960                 <para>
2961                 <screen>
2962                         $ echo "Hello" | tee /tmp/foo
2963                         Hello
2964                         $ cat /tmp/foo
2965                         Hello
2966                 </screen>
2967                 </para>
2968         </sect1>
2969
2970         <sect1 id="telnet">
2971             <title>telnet</title>
2972
2973                 <para>
2974                 Usage: telnet HOST [PORT]
2975                 </para>
2976
2977                 <para>
2978                 Establish interactive communication with another
2979                 computer over a network using the TELNET protocol.
2980                 </para>
2981         </sect1>
2982
2983         <sect1 id="test">
2984             <title>test, [</title>
2985
2986                 <para>
2987                 Usage: test EXPRESSION
2988                 </para>
2989
2990                 <para>
2991                 <screen>
2992                    or: [ EXPRESSION ]
2993
2994                 <para>
2995                 Check file types and compare values returning an exit
2996                 code determined by the value of EXPRESSION.
2997                 </para>
2998
2999                 <para>
3000                 Example:
3001                 </para>
3002
3003                 <para>
3004                 <screen>
3005                         $ test 1 -eq 2
3006                         $ echo $?
3007                         1
3008                         $ test 1 -eq 1
3009                         $ echo $?
3010                         0
3011                         $ [ -d /etc ]
3012                         $ echo $?
3013                         0
3014                         $ [ -d /junk ]
3015                         $ echo $?
3016                         1
3017                 </screen>
3018                 </para>
3019         </sect1>
3020
3021         <sect1 id="touch">
3022             <title>touch</title>
3023
3024                 <para>
3025                 Usage: touch [OPTION]... FILE...
3026                 </para>
3027
3028                 <para>
3029                 Update the last-modified date on (or create) FILE(s).
3030                 </para>
3031
3032                 <para>
3033                 Options:
3034                 </para>
3035
3036                 <para>
3037                 <screen>
3038                         -c      Do not create files
3039                 </screen>
3040                 </para>
3041
3042                 <para>
3043                 Example:
3044                 </para>
3045
3046                 <para>
3047                 <screen>
3048                         $ ls -l /tmp/foo
3049                         /bin/ls: /tmp/foo: No such file or directory
3050                         $ touch /tmp/foo
3051                         $ ls -l /tmp/foo
3052                         -rw-rw-r--    1 andersen andersen        0 Apr 15 01:11 /tmp/foo
3053                 </screen>
3054                 </para>
3055         </sect1>
3056
3057         <sect1 id="tr">
3058             <title>tr</title>
3059
3060                 <para>
3061                 Usage: tr [OPTION]... STRING1 [STRING2]
3062                 </para>
3063
3064                 <para>
3065                 Translate, squeeze, and/or delete characters from stdin,
3066                 writing to stdout.
3067                 </para>
3068
3069                 <para>
3070                 Options:
3071                 </para>
3072
3073                 <para>
3074                 <screen>
3075                         -c      Take complement of STRING1
3076                         -d      Delete input characters coded STRING1
3077                         -s      Squeeze multiple output characters of STRING2 into one character
3078                 </screen>
3079                 </para>
3080
3081                 <para>
3082                 Example:
3083                 </para>
3084
3085                 <para>
3086                 <screen>
3087                         $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
3088                         hello world
3089                 </screen>
3090                 </para>
3091         </sect1>
3092
3093         <sect1 id="true">
3094             <title>true</title>
3095
3096                 <para>
3097                 Usage: true
3098                 </para>
3099
3100                 <para>
3101                 Return an exit code of TRUE (1).
3102                 </para>
3103
3104                 <para>
3105                 Example:
3106                 </para>
3107
3108                 <para>
3109                 <screen>
3110                         $ true
3111                         $ echo $?
3112                         0
3113                 </screen>
3114                 </para>
3115         </sect1>
3116
3117         <sect1 id="tty">
3118             <title>tty</title>
3119
3120                 <para>
3121                 Usage: tty
3122                 </para>
3123
3124                 <para>
3125                 Print the file name of the terminal connected to stdin.
3126                 </para>
3127
3128                 <para>
3129                 Options:
3130                 </para>
3131
3132                 <para>
3133                 <screen>
3134                         -s      Print nothing, only return an exit status
3135                 </screen>
3136                 </para>
3137
3138                 <para>
3139                 Example:
3140                 </para>
3141
3142                 <para>
3143                 <screen>
3144                         $ tty
3145                         /dev/tty2
3146                 </screen>
3147                 </para>
3148         </sect1>
3149
3150         <sect1 id="umount">
3151             <title>umount</title>
3152
3153                 <para>
3154                 Usage: umount [OPTION]... DEVICE|DIRECTORY
3155                 </para>
3156
3157                 <para>
3158                 
3159                 </para>
3160
3161                 <para>
3162                 Options:
3163                 </para>
3164
3165                 <para>
3166                 <screen>
3167                         -a      Unmount all file systems
3168                         -r      Try to remount devices as read-only if mount is busy
3169                         -f      Force filesystem umount (i.e. unreachable NFS server)
3170                         -l      Do not free loop device (if a loop device has been used)
3171                 </screen>
3172                 </para>
3173
3174                 <para>
3175                 Example:
3176                 </para>
3177
3178                 <para>
3179                 <screen>
3180                         $ umount /dev/hdc1 
3181                 </screen>
3182                 </para>
3183         </sect1>
3184
3185         <sect1 id="uname">
3186             <title>uname</title>
3187
3188                 <para>
3189                 Usage: uname [OPTION]...
3190                 </para>
3191
3192                 <para>
3193                 Print certain system information. With no OPTION, same
3194                 as -s.
3195                 </para>
3196
3197                 <para>
3198                 Options:
3199                 </para>
3200
3201                 <para>
3202                 <screen>
3203                         -a      Print all information
3204                         -m      Print the machine (hardware) type
3205                         -n      Print the machine's network node hostname
3206                         -r      Print the operating system release
3207                         -s      Print the operating system name
3208                         -p      Print the host processor type
3209                         -v      Print the operating system version
3210                 </screen>
3211                 </para>
3212
3213                 <para>
3214                 Example:
3215                 </para>
3216
3217                 <para>
3218                 <screen>
3219                         $ uname -a
3220                         Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
3221                 </screen>
3222                 </para>
3223         </sect1>
3224
3225         <sect1 id="uniq">
3226             <title>uniq</title>
3227
3228                 <para>
3229                 Usage: uniq [INPUT [OUTPUT]]
3230                 </para>
3231
3232                 <para>
3233                 Discard all but one of successive identical lines from
3234                 INPUT (or stdin), writing to OUTPUT (or stdout).
3235                 </para>
3236
3237                 <para>
3238                 Example:
3239                 </para>
3240
3241                 <para>
3242                 <screen>
3243                         $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
3244                         a
3245                         b
3246                         c
3247                 </screen>
3248                 </para>
3249         </sect1>
3250
3251         <sect1 id="update">
3252             <title>update</title>
3253
3254                 <para>
3255                 Usage: update [OPTION]...
3256                 </para>
3257
3258                 <para>
3259                 Periodically flush filesystem buffers.
3260                 </para>
3261
3262                 <para>
3263                 Options:
3264                 </para>
3265
3266                 <para>
3267                 <screen>
3268                         -S      Force use of sync(2) instead of flushing
3269                         -s SECS Call sync this often (default 30)
3270                         -f SECS Flush some buffers this often (default 5)
3271                 </screen>
3272                 </para>
3273         </sect1>
3274
3275         <sect1 id="uptime">
3276             <title>uptime</title>
3277
3278                 <para>
3279                 Usage: uptime
3280                 </para>
3281
3282                 <para>
3283                 Display how long the system has been running since boot.
3284                 </para>
3285
3286                 <para>
3287                 Example:
3288                 </para>
3289
3290                 <para>
3291                 <screen>
3292                         $ uptime
3293                           1:55pm  up  2:30, load average: 0.09, 0.04, 0.00
3294                 </screen>
3295                 </para>
3296         </sect1>
3297
3298         <sect1 id="usleep">
3299             <title>usleep</title>
3300
3301                 <para>
3302                 Usage: usleep N
3303                 </para>
3304
3305                 <para>
3306                 Pause for N microseconds.
3307                 </para>
3308
3309                 <para>
3310                 Example:
3311                 </para>
3312
3313                 <para>
3314                 <screen>
3315                         $ usleep 1000000
3316                         [pauses for 1 second]
3317                 </screen>
3318                 </para>
3319         </sect1>
3320
3321         <sect1 id="uudecode">
3322             <title>uudecode</title>
3323
3324                 <para>
3325                 Usage: uudecode [OPTION] [FILE]
3326                 </para>
3327
3328                 <para>
3329                 Uudecode a uuencoded file.
3330                 </para>
3331
3332                 <para>
3333                 Options:
3334                 </para>
3335
3336                 <para>
3337                 <screen>
3338                         -o FILE Direct output to FILE
3339                 </screen>
3340                 </para>
3341
3342                 <para>
3343                 Example:
3344                 </para>
3345
3346                 <para>
3347                 <screen>
3348                         $ uudecode -o busybox busybox.uu
3349                         $ ls -l busybox
3350                         -rwxr-xr-x   1 ams      ams        245264 Jun  7 21:35 busybox
3351                 </screen>
3352                 </para>
3353         </sect1>
3354
3355         <sect1 id="uuencode">
3356             <title>uuencode</title>
3357
3358                 <para>
3359                 Usage: uuencode [OPTION] [INFILE] OUTFILE
3360                 </para>
3361
3362                 <para>
3363                 Uuencode a file.
3364                 </para>
3365
3366                 <para>
3367                 Options:
3368                 </para>
3369
3370                 <para>
3371                 <screen>
3372                         -m      Use base64 encoding as of RFC1521
3373                 </screen>
3374                 </para>
3375
3376                 <para>
3377                 Example:
3378                 </para>
3379
3380                 <para>
3381                 <screen>
3382                         $ uuencode busybox busybox
3383                         begin 755 busybox
3384                         M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&amp;
3385                         .....
3386                         $ uudecode busybox busybox &gt; busybox.uu
3387                         $
3388                 </screen>
3389                 </para>
3390         </sect1>
3391
3392         <sect1 id="wc">
3393             <title>wc</title>
3394
3395                 <para>
3396                 Usage: wc [OPTION]... [FILE]...
3397                 </para>
3398
3399                 <para>
3400                 Print line, word, and byte counts for each FILE, and a
3401                 total line if more than one FILE is specified. With no
3402                 FILE, read stdin.
3403                 </para>
3404
3405                 <para>
3406                 Options:
3407                 </para>
3408
3409                 <para>
3410                 <screen>
3411                         -c      Print the byte counts
3412                         -l      Print the newline counts
3413                         -L      Print the length of the longest line
3414                         -w      Print the word counts
3415                 </screen>
3416                 </para>
3417
3418                 <para>
3419                 Example:
3420                 </para>
3421
3422                 <para>
3423                 <screen>
3424                         $ wc /etc/passwd
3425                              31      46    1365 /etc/passwd
3426                 </screen>
3427                 </para>
3428         </sect1>
3429
3430         <sect1 id="which">
3431             <title>which</title>
3432
3433                 <para>
3434                 Usage: which [COMMAND]...
3435                 </para>
3436
3437                 <para>
3438                 Locate COMMAND(s).
3439                 </para>
3440
3441                 <para>
3442                 Example:
3443                 </para>
3444
3445                 <para>
3446                 <screen>
3447                         $ which login
3448                         /bin/login
3449                 </screen>
3450                 </para>
3451         </sect1>
3452
3453         <sect1 id="whoami">
3454             <title>whoami</title>
3455
3456                 <para>
3457                 Usage: whoami
3458                 </para>
3459
3460                 <para>
3461                 Print the user name associated with the current
3462                 effective user id.
3463                 </para>
3464
3465                 <para>
3466                 Example:
3467                 </para>
3468
3469                 <para>
3470                 <screen>
3471                         $ whoami
3472                         andersen
3473                 </screen>
3474                 </para>
3475         </sect1>
3476
3477         <sect1 id="yes">
3478             <title>yes</title>
3479
3480                 <para>
3481                 Usage: yes [STRING]...
3482                 </para>
3483
3484                 <para>
3485                 Repeatedly output a line with all specified STRING(s),
3486                 or `y'.
3487                 </para>
3488         </sect1>
3489
3490         <sect1 id="zcat">
3491             <title>zcat</title>
3492
3493                 <para>
3494                 Usage: zcat [OPTION]... FILE
3495                 </para>
3496
3497                 <para>
3498                 Uncompress FILE (or stdin if FILE is '-') to stdout.  
3499                 </para>
3500
3501                 <para>
3502                 Options:
3503                 </para>
3504
3505                 <para>
3506                 <screen>
3507                         -t      Test compressed file integrity
3508                 </screen>
3509                 </para>
3510
3511                 <para>
3512                 Example:
3513                 </para>
3514
3515                 <para>
3516                 <screen>
3517                 </screen>
3518                 </para>
3519         </sect1>
3520   </chapter>
3521
3522   <chapter id="LIBC-NSS">
3523     <title>LIBC NSS</title>
3524
3525         <para>
3526         GNU Libc uses the Name Service Switch (NSS) to configure the
3527         behavior of the C library for the local environment, and to
3528         configure how it reads system data, such as passwords and group
3529         information. BusyBox has made it Policy that it will never use
3530         NSS, and will never use libc calls that make use of NSS. This
3531         allows you to run an embedded system without the need for
3532         installing an /etc/nsswitch.conf file and without /lib/libnss_*
3533         libraries installed.
3534         </para>
3535
3536         <para>
3537         If you are using a system that is using a remote LDAP server for
3538         authentication via GNU libc NSS, and you want to use BusyBox,
3539         then you will need to adjust the BusyBox source. Chances are
3540         though, that if you have enough space to install of that stuff
3541         on your system, then you probably want the full GNU utilities.
3542         </para>
3543   </chapter>
3544
3545   <chapter id="SEE-ALSO">
3546     <title>SEE ALSO</title>
3547
3548         <para>
3549         <literal>textutils(1),</literal>
3550         <literal>shellutils(1),</literal>
3551         etc...
3552         </para>
3553   </chapter>
3554
3555   <chapter id="MAINTAINER">
3556     <title>MAINTAINER</title>
3557
3558         <para>
3559         Erik Andersen &lt;andersee@debian.org&gt; &lt;andersen@lineo.com&gt;
3560         </para>
3561   </chapter>
3562
3563   <chapter id="AUTHORS">
3564     <title>AUTHORS</title>
3565
3566         <para>
3567         The following people have contributed code to BusyBox whether
3568         they know it or not.
3569         </para>
3570
3571         <para>
3572         Erik Andersen &lt;andersee@debian.org&gt;
3573         </para>
3574
3575         <para>
3576         John Beppu &lt;beppu@lineo.com&gt;
3577         </para>
3578
3579         <para>
3580         Brian Candler &lt;B.Candler@pobox.com&gt;
3581         </para>
3582
3583         <para>
3584         Randolph Chung &lt;tausq@debian.org&gt;
3585         </para>
3586
3587         <para>
3588         Dave Cinege &lt;dcinege@psychosis.com&gt;       
3589         </para>
3590
3591         <para>
3592         Karl M. Hegbloom &lt;karlheg@debian.org&gt;
3593         </para>
3594
3595         <para>
3596         John Lombardo &lt;john@deltanet.com&gt; 
3597         </para>
3598
3599         <para>
3600         Glenn McGrath &lt;bug1@netconnect.com.au&gt;
3601         </para>
3602
3603         <para>
3604         Bruce Perens &lt;bruce@perens.com&gt;
3605         </para>
3606
3607         <para>
3608         Pavel Roskin &lt;proski@gnu.org&gt;
3609         </para>
3610
3611         <para>
3612         Linus Torvalds &lt;torvalds@transmeta.com&gt;
3613         </para>
3614
3615         <para>
3616         Charles P. Wright &lt;cpwright@villagenet.com&gt;
3617         </para>
3618
3619         <para>
3620         Enrique Zanardi &lt;ezanardi@ull.es&gt;
3621         </para>
3622   </chapter>
3623 </book>    <!-- End of the book -->