f53be8d6f9f47be96bf9b5cc2674cd2f0b60db02
[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="getopt">
1068             <title>getopt</title>
1069
1070                 <para>
1071                 Usage: getopt [OPTIONS]...
1072                 </para>
1073
1074                 <para>
1075                 Parse command options
1076                 </para>
1077
1078                 <para>
1079                 <screen>
1080                    -a, --alternative            Allow long options starting with single -\n"
1081                    -l, --longoptions=longopts   Long options to be recognized\n"
1082                    -n, --name=progname          The name under which errors are reported\n"
1083                    -o, --options=optstring      Short options to be recognized\n"
1084                    -q, --quiet                  Disable error reporting by getopt(3)\n"
1085                    -Q, --quiet-output           No normal output\n"
1086                    -s, --shell=shell            Set shell quoting conventions\n"
1087                    -T, --test                   Test for getopt(1) version\n"
1088                    -u, --unqote                 Do not quote the output\n"
1089                 </screen>
1090                 </para>
1091
1092
1093                 <para>
1094                 Example:
1095                 </para>
1096
1097                 <para>
1098                 <screen>
1099                         $ cat getopt.test
1100                         #!/bin/sh
1101                         GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
1102                                 -n 'example.busybox' -- "$@"`
1103                         if [ $? != 0 ] ; then  exit 1 ; fi
1104                         eval set -- "$GETOPT"
1105                         while true ; do
1106                           case $1 in
1107                             -a|--a-long) echo "Option a" ; shift ;;
1108                             -b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;;
1109                             -c|--c-long)
1110                               case "$2" in
1111                                 "") echo "Option c, no argument"; shift 2 ;;
1112                                 *)  echo "Option c, argument \`$2'" ; shift 2 ;;
1113                               esac ;;
1114                             --) shift ; break ;;
1115                             *) echo "Internal error!" ; exit 1 ;;
1116                           esac
1117                         done
1118                 </screen>
1119                 </para>
1120         </sect1>
1121
1122         <sect1 id="grep">
1123             <title>grep</title>
1124
1125                 <para>
1126                 Usage: grep [OPTIONS]... PATTERN [FILE]...
1127                 </para>
1128
1129                 <para>
1130                 Search for PATTERN in each FILE or stdin.
1131                 </para>
1132
1133                 <para>
1134                 Options:
1135                 </para>
1136
1137                 <para>
1138                 <screen>
1139                         -h      Suppress the prefixing filename on output
1140                         -i      Ignore case distinctions
1141                         -n      Print line number with output lines
1142                         -q      Be quiet. Returns 0 if result was found, 1 otherwise
1143                         -v      Select non-matching lines
1144                 </screen>
1145                 </para>
1146
1147                 <para>
1148                 This version of grep matches full regular expressions.
1149                 </para>
1150
1151                 <para>
1152                 Example:
1153                 </para>
1154
1155                 <para>
1156                 <screen>
1157                         $ grep root /etc/passwd
1158                         root:x:0:0:root:/root:/bin/bash
1159                         $ grep ^[rR]oo. /etc/passwd
1160                         root:x:0:0:root:/root:/bin/bash
1161                 </screen>
1162                 </para>
1163         </sect1>
1164
1165         <sect1 id="gunzip">
1166             <title>gunzip</title>
1167
1168                 <para>
1169                 Usage: gunzip [OPTION]... FILE
1170                 </para>
1171
1172                 <para>
1173                 Uncompress FILE (or stdin if FILE is '-').
1174                 </para>
1175
1176                 <para>
1177                 Options:
1178                 </para>
1179
1180                 <para>
1181                 <screen>
1182                         -c      Write output to standard output
1183                         -t      Test compressed file integrity
1184                 </screen>
1185                 </para>
1186
1187                 <para>
1188                 Example:
1189                 </para>
1190
1191                 <para>
1192                 <screen>
1193                         $ ls -la /tmp/BusyBox*
1194                         -rw-rw-r--    1 andersen andersen   557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
1195                         $ gunzip /tmp/BusyBox-0.43.tar.gz
1196                         $ ls -la /tmp/BusyBox*
1197                         -rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1198                 </screen>
1199                 </para>
1200         </sect1>
1201
1202 <       <sect1 id="gzip">
1203             <title>gzip</title>
1204
1205                 <para>
1206                 Usage: gzip [OPTION]... FILE
1207                 </para>
1208
1209                 <para>
1210                 Compress FILE (or stdin if FILE is '-') with maximum
1211                 compression to FILE.gz (or stdout if FILE is '-').
1212                 </para>
1213
1214                 <para>
1215                 Options:
1216                 </para>
1217
1218                 <para>
1219                 <screen>
1220                         -c      Write output to standard output
1221                 </screen>
1222                 </para>
1223
1224                 <para>
1225                 Example:
1226                 </para>
1227
1228                 <para>
1229                 <screen>
1230                         $ ls -la /tmp/BusyBox*
1231                         -rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1232                         $ gzip /tmp/BusyBox-0.43.tar
1233                         $ ls -la /tmp/BusyBox*
1234                         -rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
1235                 </screen>
1236                 </para>
1237         </sect1>
1238
1239         <sect1 id="halt">
1240             <title>halt</title>
1241
1242                 <para>
1243                 Usage: halt
1244                 </para>
1245
1246                 <para>
1247                 Halt the system.
1248                 </para>
1249         </sect1>
1250
1251         <sect1 id="head">
1252             <title>head</title>
1253
1254                 <para>
1255                 Usage: head [OPTION] FILE...
1256                 </para>
1257
1258                 <para>
1259                 Print first 10 lines of each FILE to standard output.
1260                 With more than one FILE, precede each with a header
1261                 giving the file name. With no FILE, or when FILE is -,
1262                 read standard input.
1263                 </para>
1264
1265                 <para>
1266                 Options:
1267                 </para>
1268
1269                 <para>
1270                 <screen>
1271                         -n NUM  Print first NUM lines instead of first 10
1272                 </screen>
1273                 </para>
1274
1275                 <para>
1276                 Example:
1277                 </para>
1278
1279                 <para>
1280                 <screen>
1281                         $ head -n 2 /etc/passwd
1282                         root:x:0:0:root:/root:/bin/bash
1283                         daemon:x:1:1:daemon:/usr/sbin:/bin/sh
1284                 </screen>
1285                 </para>
1286         </sect1>
1287
1288         <sect1 id="hostid">
1289             <title>hostid</title>
1290
1291                 <para>
1292                 Usage: hostid
1293                 </para>
1294
1295                 <para>
1296                 Prints out a unique 32-bit identifier for the current
1297                 machine. The 32-bit identifier is intended to be unique
1298                 among all UNIX systems in existence. 
1299                 </para>
1300         </sect1>
1301
1302         <sect1 id="hostname">
1303             <title>hostname</title>
1304
1305                 <para>
1306                 Usage: hostname [OPTION]... [HOSTNAME|-F FILE]
1307                 </para>
1308
1309                 <para>
1310                 Get or set the hostname or DNS domain name. If a
1311                 hostname is given (or a file with the -F parameter), the
1312                 host name will be set.
1313                 </para>
1314
1315                 <para>
1316                 Options:
1317                 </para>
1318
1319                 <para>
1320                 <screen>
1321                         -s      Short
1322                         -i      Addresses for the hostname
1323                         -d      DNS domain name
1324                         -F FILE Use the contents of FILE to specify the hostname
1325                 </screen>
1326                 </para>
1327
1328                 <para>
1329                 Example:
1330                 </para>
1331
1332                 <para>
1333                 <screen>
1334                         $ hostname
1335                         slag
1336                 </screen>
1337                 </para>
1338         </sect1>
1339
1340         <sect1 id="id">
1341             <title>id</title>
1342
1343                 <para>
1344                 Usage: id [OPTION]... [USERNAME]
1345                 </para>
1346
1347                 <para>
1348                 Print information for USERNAME or the current user.
1349                 </para>
1350
1351                 <para>
1352                 Options:
1353                 </para>
1354
1355                 <para>
1356                 <screen>
1357                         -g      Print only the group ID
1358                         -u      Print only the user ID
1359                         -r      Print the real user ID instead of the effective ID (with -ug)
1360                 </screen>
1361                 </para>
1362
1363                 <para>
1364                 Example:
1365                 </para>
1366
1367                 <para>
1368                 <screen>
1369                         $ id
1370                         uid=1000(andersen) gid=1000(andersen)
1371                 </screen>
1372                 </para>
1373         </sect1>
1374
1375         <sect1 id="init">
1376             <title>init</title>
1377
1378                 <para>
1379                 Usage: init
1380                 </para>
1381
1382                 <para>
1383                 Init is the parent of all processes.
1384                 </para>
1385
1386                 <para>
1387                 This version of init is designed to be run only by the
1388                 kernel.
1389                 </para>
1390
1391                 <para>
1392                 BusyBox init doesn't support multiple runlevels. The
1393                 runlevels field of the /etc/inittab file is completely
1394                 ignored by BusyBox init. If you want runlevels, use
1395                 sysvinit.
1396                 </para>
1397
1398                 <para>
1399                 BusyBox init works just fine without an inittab. If no
1400                 inittab is found, it has the following default behavior:
1401                 </para>
1402
1403                 <para>
1404                 <screen>
1405                         ::sysinit:/etc/init.d/rcS
1406                         ::askfirst:/bin/sh
1407                 </screen>
1408                 </para>
1409
1410                 <para>
1411                 If it detects that /dev/console is _not_ a serial
1412                 console, it will also run:
1413                 </para>
1414
1415                 <para>
1416                 <screen>
1417                         tty2::askfirst:/bin/sh
1418                 </screen>
1419                 </para>
1420
1421                 <para>
1422                 If you choose to use an /etc/inittab file, the inittab
1423                 entry format is as follows:
1424                 </para>
1425
1426                 <para>
1427                 <screen>
1428                         &lt;id&gt;:&lt;runlevels&gt;:&lt;action&gt;:&lt;process&gt;
1429                 </screen>
1430                 <para>
1431
1432                 <sect2>
1433                     <title>id</title>
1434                         <para>
1435                         WARNING: This field has a non-traditional
1436                         meaning for BusyBox init!  The id field is used
1437                         by BusyBox init to specify the controlling tty
1438                         for the specified process to run on.  The
1439                         contents of this field are appended to "/dev/"
1440                         and used as-is.  There is no need for this field
1441                         to be unique, although if it isn't you may have
1442                         strange results.  If this field is left blank,
1443                         it is completely ignored.  Also note that if
1444                         BusyBox detects that a serial console is in use,
1445                         then all entries containing non-empty id fields
1446                         will _not_ be run.  BusyBox init does nothing
1447                         with utmp.  We don't need no stinkin' utmp.
1448                         </para>
1449                 </sect2>
1450
1451                 <sect2>
1452                     <title>runlevels</title>
1453
1454                         <para>
1455                         The runlevels field is completely ignored.
1456                         </para>
1457                 </sect2>
1458
1459                 <sect2>
1460                     <title>action</title>
1461
1462                         <para>
1463                         Valid actions include: sysinit, respawn,
1464                         askfirst, wait, once, and ctrlaltdel.
1465                         </para>
1466
1467                         <para>
1468                         askfirst acts just like respawn, but before
1469                         running the specified process it displays the
1470                         line "Please press Enter to activate this
1471                         console." and then waits for the user to press
1472                         enter before starting the specified process.
1473                         </para>
1474
1475                         <para>
1476                         Unrecognized actions (like initdefault) will
1477                         cause init to emit an error message, and then go
1478                         along with its business.
1479                         </para>
1480                 </sect2>
1481
1482                 <sect2>
1483                     <title>process</title>
1484
1485                         <para>
1486                         Specifies the process to be executed and its
1487                         command line.
1488                         </para>
1489                 </sect2>
1490
1491                 <para>
1492                 Example /etc/inittab file:
1493                 </para>
1494
1495                 <para>
1496                 <screen>
1497                         # This is run first except when booting in single-user mode.
1498                         #
1499                         ::sysinit:/etc/init.d/rcS
1500
1501                         # /bin/sh invocations on selected ttys
1502                         #
1503                         # Start an "askfirst" shell on the console (whatever that may be)
1504                         ::askfirst:/bin/sh
1505                         # Start an "askfirst" shell on /dev/tty2
1506                         tty2::askfirst:/bin/sh
1507
1508                         # /sbin/getty invocations for selected ttys
1509                         #
1510                         tty4::respawn:/sbin/getty 38400 tty4
1511                         tty5::respawn:/sbin/getty 38400 tty5
1512
1513                         # Example of how to put a getty on a serial line (for a terminal)
1514                         #
1515                         #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
1516                         #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
1517                         #
1518                         # Example how to put a getty on a modem line.
1519                         #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
1520
1521                         # Stuff to do before rebooting
1522                         ::ctrlaltdel:/bin/umount -a -r &gt; /dev/null 2&gt;&amp;1
1523                         ::ctrlaltdel:/sbin/swapoff -a &gt; /dev/null 2&gt;&amp;1
1524                 </screen>
1525                 </para>
1526         </sect1>
1527
1528         <sect1 id="insmod">
1529             <title>insmod</title>
1530
1531                 <para>
1532                 Usage: insmod [OPTION]... MODULE [symbol=value]...
1533                 </para>
1534
1535                 <para>
1536                 Load MODULE into the kernel.
1537                 </para>
1538
1539                 <para>
1540                 Options:
1541                 </para>
1542
1543                 <para>
1544                 <screen>
1545                         -f      Force module to load into the wrong kernel version.
1546                         -k      Make module autoclean-able.
1547                         -v      Verbose output
1548                         -x      Do not export externs
1549                 </screen>
1550                 </para>
1551         </sect1>
1552
1553         <sect1 id="kill">
1554             <title>kill</title>
1555
1556                 <para>
1557                 Usage: kill [OPTION] PID...
1558                 </para>
1559
1560                 <para>
1561                 Send a signal (default is SIGTERM) to the specified
1562                 PID(s).
1563                 </para>
1564
1565                 <para>
1566                 Options:
1567                 </para>
1568
1569                 <para>
1570                 <screen>
1571                         -l      List all signal names and numbers
1572                         -SIG    Send signal SIG
1573                 </screen>
1574                 </para>
1575
1576                 <para>
1577                 Example:
1578                 </para>
1579
1580                 <para>
1581                 <screen>
1582                         $ ps | grep apache
1583                         252 root     root     S [apache]
1584                         263 www-data www-data S [apache]
1585                         264 www-data www-data S [apache]
1586                         265 www-data www-data S [apache]
1587                         266 www-data www-data S [apache]
1588                         267 www-data www-data S [apache]
1589                         $ kill 252
1590                 </screen>
1591                 </para>
1592         </sect1>
1593
1594         <sect1 id="killall">
1595             <title>killall</title>
1596
1597                 <para>
1598                 Usage: killall [OPTION] NAME...
1599                 </para>
1600
1601                 <para>
1602                 Send a signal (default is SIGTERM) to the specified
1603                 NAME(s).
1604                 </para>
1605
1606                 <para>
1607                 Options:
1608                 </para>
1609
1610                 <para>
1611                 <screen>
1612                         -l      List all signal names and numbers
1613                         -SIG    Send signal SIG
1614                 </screen>
1615                 </para>
1616
1617                 <para>
1618                 Example:
1619                 </para>
1620
1621                 <para>
1622                 <screen>
1623                         $ killall apache
1624                 </screen>
1625                 </para>
1626         </sect1>
1627
1628         <sect1 id="length">
1629             <title>length</title>
1630
1631                 <para>
1632                 Usage: length STRING
1633                 </para>
1634
1635                 <para>
1636                 Print the length of STRING.
1637                 </para>
1638
1639                 <para>
1640                 Example:
1641                 </para>
1642
1643                 <para>
1644                 <screen>
1645                         $ length "Hello"
1646                         5
1647                 </screen>
1648                 </para>
1649         </sect1>
1650
1651         <sect1 id="ln">
1652             <title>ln</title>
1653
1654                 <para>
1655                 Usage: ln [OPTION]... TARGET FILE|DIRECTORY
1656                 </para>
1657
1658                 <para>
1659                 Create a link named FILE or DIRECTORY to the specified
1660                 TARGET.  You may use '--' to indicate that all following
1661                 arguments are non-options.
1662                 </para>
1663
1664                 <para>
1665                 Options:
1666                 </para>
1667
1668                 <para>
1669                 <screen>
1670                         -s      Make symbolic link instead of hard link
1671                         -f      Remove existing destination file
1672                 </screen>
1673                 </para>
1674
1675                 <para>
1676                 Example:
1677                 </para>
1678
1679                 <para>
1680                 <screen>
1681                         $ ln -s BusyBox /tmp/ls
1682                         $ ls -l /tmp/ls
1683                         lrwxrwxrwx    1 root     root            7 Apr 12 18:39 ls -&gt; BusyBox*
1684                 </screen>
1685                 </para>
1686         </sect1>
1687
1688         <sect1 id="loadacm">
1689             <title>loadacm</title>
1690
1691                 <para>
1692                 Usage: loadacm
1693                 </para>
1694
1695                 <para>
1696                 Load an acm from stdin.
1697                 </para>
1698
1699                 <para>
1700                 Example:
1701                 </para>
1702
1703                 <para>
1704                 <screen>
1705                         $ loadacm &lt; /etc/i18n/acmname
1706                 </screen>
1707                 </para>
1708         </sect1>
1709
1710         <sect1 id="loadfont">
1711             <title>loadfont</title>
1712
1713                 <para>
1714                 Usage: loadfont
1715                 </para>
1716
1717                 <para>
1718                 Load a console font from stdin.
1719                 </para>
1720
1721                 <para>
1722                 Example:
1723                 </para>
1724
1725                 <para>
1726                 <screen>
1727                         $ loadfont &lt; /etc/i18n/fontname
1728                 </screen>
1729                 </para>
1730         </sect1>
1731
1732         <sect1 id="loadkmap">
1733             <title>loadkmap</title>
1734
1735                 <para>
1736                 Usage: loadkmap
1737                 </para>
1738
1739                 <para>
1740                 Load a binary keyboard translation table from stdin.
1741                 </para>
1742
1743                 <para>
1744                 Example:
1745                 </para>
1746
1747                 <para>
1748                 <screen>
1749                         $ loadkmap &lt; /etc/i18n/lang-keymap
1750                 </screen>
1751                 </para>
1752         </sect1>
1753
1754         <sect1 id="logger">
1755             <title>logger</title>
1756
1757                 <para>
1758                 Usage: logger [OPTION]... [MESSAGE]
1759                 </para>
1760
1761                 <para>
1762                 Write MESSAGE to the system log.  If MESSAGE is '-', log
1763                 stdin.
1764                 </para>
1765
1766                 <para>
1767                 Options:
1768                 </para>
1769
1770                 <para>
1771                 <screen>
1772                         -s      Log to stderr as well as the system log
1773                         -t      Log using the specified tag (defaults to user name)
1774                         -p      Enter the message with the specified priority
1775                                 This may be numerical or a ``facility.level'' pair
1776                 </screen>
1777                 </para>
1778
1779                 <para>
1780                 Example:
1781                 </para>
1782
1783                 <para>
1784                 <screen>
1785                         $ logger "hello"
1786                 </screen>
1787                 </para>
1788         </sect1>
1789
1790         <sect1 id="logname">
1791             <title>logname</title>
1792
1793                 <para>
1794                 Usage: logname
1795                 </para>
1796
1797                 <para>
1798                 Print the name of the current user.
1799                 </para>
1800
1801                 <para>
1802                 Example:
1803                 </para>
1804
1805                 <para>
1806                 <screen>
1807                         $ logname
1808                         root
1809                 </screen>
1810                 </para>
1811         </sect1>
1812
1813         <sect1 id="ls">
1814             <title>ls</title>
1815
1816                 <para>
1817                 Usage: ls [OPTION]... [FILE]...
1818                 </para>
1819
1820                 <para>
1821                 
1822                 </para>
1823
1824                 <para>
1825                 Options:
1826                 </para>
1827
1828                 <para>
1829                 <screen>
1830                         -a      Do not hide entries starting with .
1831                         -c      With  -l:  show ctime (the time of last
1832                                 modification of file status information)
1833                         -d      List directory entries instead of contents
1834                         -e      List both full date and full time
1835                         -l      Use a long listing format
1836                         -n      List numeric UIDs and GIDs instead of names
1837                         -p      Append indicator (one of /=@|) to entries
1838                         -u      With -l: show access time (the time of last
1839                                 access of the file)
1840                         -x      List entries by lines instead of by columns
1841                         -A      Do not list implied . and ..
1842                         -C      List entries by columns
1843                         -F      Append indicator (one of */=@|) to entries
1844                         -R      List subdirectories recursively
1845                 </screen>
1846                 </para>
1847
1848                 <para>
1849                 Example:
1850                 </para>
1851
1852                 <para>
1853                 <screen>
1854                 </screen>
1855                 </para>
1856         </sect1>
1857
1858         <sect1 id="lsmod">
1859             <title>lsmod</title>
1860
1861                 <para>
1862                 Usage: lsmod
1863                 </para>
1864
1865                 <para>
1866                 List currently loaded kernel modules.
1867                 </para>
1868         </sect1>
1869
1870         <sect1 id="makedevs">
1871             <title>makedevs</title>
1872
1873                 <para>
1874                 Usage: makedevsf NAME TYPE MAJOR MINOR FIRST LAST [s]
1875                 </para>
1876
1877                 <para>
1878                 Create a range of block or character special files.
1879                 </para>
1880
1881                 <para>
1882                 TYPE may be:
1883                 </para>
1884
1885                 <para>
1886                 <screen>
1887                         b       Make a block (buffered) device
1888                         c or u  Make a character (un-buffered) device
1889                         p       Make a named pipe. MAJOR and MINOR are ignored for named pipes
1890                 </screen>
1891                 </para>
1892
1893                 <para>
1894                 FIRST specifies the number appended to NAME to create
1895                 the first device.  LAST specifies the number of the last
1896                 item that should be created. If 's' is the last
1897                 argument, the base device is created as well.
1898                 </para>
1899
1900                 <para>
1901                 Example:
1902                 </para>
1903
1904                 <para>
1905                 <screen>
1906                         $ makedevs /dev/ttyS c 4 66 2 63
1907                         [creates ttyS2-ttyS63]
1908                         $ makedevs /dev/hda b 3 0 0 8 s
1909                         [creates hda,hda1-hda8]
1910                 </screen>
1911                 </para>
1912         </sect1>
1913
1914         <sect1 id="md5sum">
1915             <title>md5sum</title>
1916
1917                 <para>
1918                 Usage: md5sum [OPTION]... FILE...
1919                 </para>
1920
1921                 <para>
1922                 Print or check MD5 checksums.
1923                 </para>
1924
1925                 <para>
1926                 Options:
1927                 </para>
1928
1929                 <para>
1930                 <screen>
1931                         -b      Read files in binary mode
1932                         -c      Check MD5 sums against given list
1933                         -t      Read files in text mode (default)
1934                         -g      Read a string
1935                 </screen>
1936                 </para>
1937
1938                 <para>
1939                 The following two options are useful only when verifying
1940                 checksums:
1941                 </para>
1942
1943                 <para>
1944                 <screen>
1945                         -s      Don't output anything, status code shows success
1946                         -w      Warn about improperly formated MD5 checksum lines
1947                 </screen>
1948                 </para>
1949
1950                 <para>
1951                 Example:
1952                 </para>
1953
1954                 <para>
1955                 <screen>
1956                         $ md5sum busybox
1957                         6fd11e98b98a58f64ff3398d7b324003  busybox
1958                         $ md5sum -c
1959                         6fd11e98b98a58f64ff3398d7b324003  busybox
1960                         6fd11e98b98a58f64ff3398d7b324002  busybox
1961                         md5sum: MD5 check failed for 'busybox'
1962                         ^D
1963                 </screen>
1964                 </para>
1965         </sect1>
1966
1967         <sect1 id="mkdir">
1968             <title>mkdir</title>
1969
1970                 <para>
1971                 Usage: mkdir [OPTION]... DIRECTORY...
1972                 </para>
1973
1974                 <para>
1975                 Create the DIRECTORY(s), if they do not already exist.
1976                 </para>
1977
1978                 <para>
1979                 Options:
1980                 </para>
1981
1982                 <para>
1983                 <screen>
1984                         -m      Set permission mode (as in chmod), not rwxrwxrwx - umask
1985                         -p      No error if directory exists, make parent directories as needed
1986                 </screen>
1987                 </para>
1988
1989                 <para>
1990                 Example:
1991                 </para>
1992
1993                 <para>
1994                 <screen>
1995                         $ mkdir /tmp/foo
1996                         $ mkdir /tmp/foo
1997                         /tmp/foo: File exists
1998                         $ mkdir /tmp/foo/bar/baz
1999                         /tmp/foo/bar/baz: No such file or directory
2000                         $ mkdir -p /tmp/foo/bar/baz
2001                 </screen>
2002                 </para>
2003         </sect1>
2004
2005         <sect1 id="mkfifo">
2006             <title>mkfifo</title>
2007
2008                 <para>
2009                 Usage: mkfifo [OPTION] NAME
2010                 </para>
2011
2012                 <para>
2013                 Create a named pipe (identical to 'mknod NAME p').
2014                 </para>
2015
2016                 <para>
2017                 Options:
2018                 </para>
2019
2020                 <para>
2021                 <screen>
2022                         -m MODE Create the pipe using the specified mode (default a=rw)
2023                 </screen>
2024                 </para>
2025         </sect1>
2026
2027         <sect1 id="mkfs.minix">
2028             <title>mkfs.minix</title>
2029
2030                 <para>
2031                 Usage: mkfs.minix [OPTION]... NAME [BLOCKS]
2032                 </para>
2033
2034                 <para>
2035                 Make a MINIX filesystem.
2036                 </para>
2037
2038                 <para>
2039                 Options:
2040                 </para>
2041
2042                 <para>
2043                 <screen>
2044                         -c              Check the device for bad blocks
2045                         -n [14|30]      Specify the maximum length of filenames
2046                         -i              Specify the number of inodes for the filesystem
2047                         -l FILENAME     Read the bad blocks list from FILENAME
2048                         -v              Make a Minix version 2 filesystem
2049                 </screen>
2050                 </para>
2051         </sect1>
2052
2053         <sect1 id="mknod">
2054             <title>mknod</title>
2055
2056                 <para>
2057                 Usage: mknod [OPTION]... NAME TYPE MAJOR MINOR
2058                 </para>
2059
2060                 <para>
2061                 Create a special file (block, character, or pipe).
2062                 </para>
2063
2064                 <para>
2065                 Options:
2066                 </para>
2067
2068                 <para>
2069                 <screen>
2070                         -m      Create the special file using the specified mode (default a=rw)
2071                 </screen>
2072                 </para>
2073
2074                 <para>
2075                 TYPE may be:
2076                 </para>
2077
2078                 <para>
2079                 <screen>
2080                         b       Make a block (buffered) device
2081                         c or u  Make a character (un-buffered) device
2082                         p       Make a named pipe. MAJOR and MINOR are ignored for named pipes
2083                 </screen>
2084                 </para>
2085
2086                 <para>
2087                 Example:
2088                 </para>
2089
2090                 <para>
2091                 <screen>
2092                         $ mknod /dev/fd0 b 2 0 
2093                         $ mknod -m 644 /tmp/pipe p
2094                 </screen>
2095                 </para>
2096         </sect1>
2097
2098         <sect1 id="mkswap">
2099             <title>mkswap</title>
2100
2101                 <para>
2102                 Usage: mkswap [OPTION]... DEVICE [BLOCKS]
2103                 </para>
2104
2105                 <para>
2106                 Prepare a disk partition to be used as a swap partition.
2107                 </para>
2108
2109                 <para>
2110                 Options:
2111                 </para>
2112
2113                 <para>
2114                 <screen>
2115                         -c      Check for read-ability.
2116                         -v0     Make version 0 swap [max 128 Megs].
2117                         -v1     Make version 1 swap [big!] (default for kernels &gt; 2.1.117).
2118                         BLOCKS  Number of block to use (default is entire partition).
2119                 </screen>
2120                 </para>
2121         </sect1>
2122
2123         <sect1 id="mktemp">
2124             <title>mktemp</title>
2125
2126                 <para>
2127                 Usage: mktemp TEMPLATE
2128                 </para>
2129
2130                 <para>
2131                 Creates a temporary file with its name based on
2132                 TEMPLATE.  TEMPLATE is any name with six `Xs' (i.e.
2133                 /tmp/temp.XXXXXX).
2134                 </para>
2135
2136                 <para>
2137                 Example:
2138                 </para>
2139
2140                 <para>
2141                 <screen>
2142                         $ mktemp /tmp/temp.XXXXXX
2143                         /tmp/temp.mWiLjM
2144                         $ ls -la /tmp/temp.mWiLjM
2145                         -rw-------    1 andersen andersen        0 Apr 25 17:10 /tmp/temp.mWiLjM
2146                 </screen>
2147                 </para>
2148         </sect1>
2149
2150         <sect1 id="more">
2151             <title>more</title>
2152
2153                 <para>
2154                 Usage: more [FILE]...
2155                 </para>
2156
2157                 <para>
2158                 Page through text one screenful at a time.
2159                 </para>
2160
2161                 <para>
2162                 Example:
2163                 </para>
2164
2165                 <para>
2166                 <screen>
2167                         $ dmesg | more
2168                 </screen>
2169                 </para>
2170         </sect1>
2171
2172         <sect1 id="mount">
2173             <title>mount</title>
2174
2175                 <para>
2176                 Usage: mount [OPTION]...
2177                 </para>
2178
2179                 <para>
2180                 <screen>
2181                    or: mount [OPTION]... DEVICE DIRECTORY
2182                 </screen>
2183                 </para>
2184
2185                 <para>
2186                 Mount filesystems.
2187                 </para>
2188
2189                 <para>
2190                 Options:
2191                 </para>
2192
2193                 <para>
2194                 <screen>
2195                         -a      Mount all filesystems in /etc/fstab
2196                         -o      One of the many filesystem options listed below
2197                         -r      Mount the filesystem read-only
2198                         -t TYPE Specify the filesystem type
2199                         -w      Mount the filesystem read-write
2200                 </screen>
2201                 </para>
2202
2203                 <para>
2204                 Options for use with the -o flag:
2205                 </para>
2206
2207                 <para>
2208                 <screen>
2209                         async/sync      Writes are asynchronous / synchronous
2210                         atime/noatime   Enable / disable updates to inode access times
2211                         dev/nodev       Allow / disallow use of special device files
2212                         exec/noexec     Allow / disallow use of executable files
2213                         loop            Mount a file via loop device
2214                         suid/nosuid     Allow / disallow set-user-id-root programs
2215                         remount         Remount a currently mounted filesystem
2216                         ro/rw           Mount filesystem read-only / read-write
2217                 </screen>
2218                 </para>
2219
2220                 <para>
2221                 There are even more flags that are filesystem specific.
2222                 You'll have to see the written documentation for those.
2223                 </para>
2224
2225                 <para>
2226                 Example:
2227                 </para>
2228
2229                 <para>
2230                 <screen>
2231                         $ mount
2232                         /dev/hda3 on / type minix (rw)
2233                         proc on /proc type proc (rw)
2234                         devpts on /dev/pts type devpts (rw)
2235                         $ mount /dev/fd0 /mnt -t msdos -o ro
2236                         $ mount /tmp/diskimage /opt -t ext2 -o loop
2237                 </screen>
2238                 </para>
2239         </sect1>
2240
2241         <sect1 id="mt">
2242             <title>mt</title>
2243
2244                 <para>
2245                 Usage: mt [OPTION] OPCODE VALUE
2246                 </para>
2247
2248                 <para>
2249                 Control magnetic tape drive operation.
2250                 </para>
2251
2252                 <para>
2253                 Options:
2254                 </para>
2255
2256                 <para>
2257                 <screen>
2258                         -f DEVICE       Control DEVICE
2259                 </screen>
2260                 </para>
2261         </sect1>
2262
2263         <sect1 id="mv">
2264             <title>mv</title>
2265
2266                 <para>
2267                 Usage: mv SOURCE DEST
2268                 </para>
2269
2270                 <para>
2271                 <screen>
2272                    or: mv SOURCE... DIRECTORY
2273                 </screen>
2274                 </para>
2275
2276                 <para>
2277                 Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
2278                 </para>
2279
2280                 <para>
2281                 Example:
2282                 </para>
2283
2284                 <para>
2285                 <screen>
2286                         $ mv /tmp/foo /bin/bar
2287                 </screen>
2288                 </para>
2289         </sect1>
2290
2291         <sect1 id="nc">
2292             <title>nc</title>
2293
2294                 <para>
2295                 Usage: nc HOST PORT
2296                 </para>
2297
2298                 <para>
2299                 Open a pipe to HOST:PORT.
2300                 </para>
2301
2302                 <para>
2303                 Example:
2304                 </para>
2305
2306                 <para>
2307                 <screen>
2308                         $ nc foobar.somedomain.com 25
2309                         220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
2310                         help
2311                         214-Commands supported:
2312                         214-    HELO EHLO MAIL RCPT DATA AUTH
2313                         214     NOOP QUIT RSET HELP
2314                         quit
2315                         221 foobar closing connection
2316                 </screen>
2317                 </para>
2318         </sect1>
2319
2320         <sect1 id="nslookup">
2321             <title>nslookup</title>
2322
2323                 <para>
2324                 Usage: nslookup [HOST]
2325                 </para>
2326
2327                 <para>
2328                 Query the nameserver for the IP address of the given
2329                 HOST.
2330                 </para>
2331
2332                 <para>
2333                 Example:
2334                 </para>
2335
2336                 <para>
2337                 <screen>
2338                         $ nslookup localhost
2339                         Server:     default
2340                         Address:    default
2341
2342                         Name:       debian
2343                         Address:    127.0.0.1
2344                 </screen>
2345                 </para>
2346         </sect1>
2347
2348         <sect1 id="ping">
2349             <title>ping</title>
2350
2351                 <para>
2352                 Usage: ping [OPTION]... HOST
2353                 </para>
2354
2355                 <para>
2356                 Send ICMP ECHO_REQUEST packets to HOST.
2357                 </para>
2358
2359                 <para>
2360                 Options:
2361                 </para>
2362
2363                 <para>
2364                 <screen>
2365                         -c COUNT        Send only COUNT pings
2366                         -s SIZE         Send SIZE data bytes in packets (default=56)
2367                         -q              Quiet mode, only displays output at start and when finished
2368                 </screen>
2369                 </para>
2370
2371                 <para>
2372                 Example:
2373                 </para>
2374
2375                 <para>
2376                 <screen>
2377                         $ ping localhost
2378                         PING slag (127.0.0.1): 56 data bytes
2379                         64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
2380
2381                         --- debian ping statistics ---
2382                         1 packets transmitted, 1 packets received, 0% packet loss
2383                         round-trip min/avg/max = 20.1/20.1/20.1 ms
2384                 </screen>
2385                 </para>
2386         </sect1>
2387
2388         <sect1 id="poweroff">
2389             <title>poweroff</title>
2390
2391                 <para>
2392                 Usage: poweroff
2393                 </para>
2394
2395                 <para>
2396                 Shut down the system, and request that the kernel turn
2397                 off power upon halting.
2398                 </para>
2399         </sect1>
2400
2401         <sect1 id="printf">
2402             <title>printf</title>
2403
2404                 <para>
2405                 Usage: printf FORMAT [ARGUMENT]...
2406                 </para>
2407
2408                 <para>
2409                 Format and print the given data in a manner similar to
2410                 the C printf command.
2411                 </para>
2412
2413                 <para>
2414                 Example:
2415                 </para>
2416
2417                 <para>
2418                 <screen>
2419                         $ printf "Val=%d\n" 5
2420                         Val=5
2421                 </screen>
2422                 </para>
2423         </sect1>
2424
2425         <sect1 id="ps">
2426             <title>ps</title>
2427
2428                 <para>
2429                 Usage: ps
2430                 </para>
2431
2432                 <para>
2433                 Report process status.  This version of ps accepts no
2434                 options.
2435                 </para>
2436
2437                 <para>
2438                 Options:
2439                 </para>
2440
2441                 <para>
2442                 <screen>
2443                 </screen>
2444                 </para>
2445
2446                 <para>
2447                 Example:
2448                 </para>
2449
2450                 <para>
2451                 <screen>
2452                         $ ps
2453                           PID  Uid      Gid State Command
2454                             1 root     root     S init
2455                             2 root     root     S [kflushd]
2456                             3 root     root     S [kupdate]
2457                             4 root     root     S [kpiod]
2458                             5 root     root     S [kswapd]
2459                           742 andersen andersen S [bash]
2460                           743 andersen andersen S -bash
2461                           745 root     root     S [getty]
2462                          2990 andersen andersen R ps
2463                 </screen>
2464                 </para>
2465         </sect1>
2466
2467         <sect1 id="pwd">
2468             <title>pwd</title>
2469
2470                 <para>
2471                 Usage: pwd
2472                 </para>
2473
2474                 <para>
2475                 Print the full filename of the current working
2476                 directory.
2477                 </para>
2478
2479                 <para>
2480                 Example:
2481                 </para>
2482
2483                 <para>
2484                 <screen>
2485                         $ pwd
2486                         /root
2487                 </screen>
2488                 </para>
2489         </sect1>
2490
2491         <sect1 id="reboot">
2492             <title>reboot</title>
2493
2494                 <para>
2495                 Usage: reboot
2496                 </para>
2497
2498                 <para>
2499                 Reboot the system.
2500                 </para>
2501         </sect1>
2502
2503         <sect1 id="renice">
2504             <title>renice</title>
2505
2506                 <para>
2507                 Usage: renice priority pid [pid ...]
2508                 </para>
2509
2510                 <para>
2511                 Changes priority of running processes. Allowed priorities range
2512                 from 20 (the process runs only when nothing else is running) to 0
2513                 (default priority) to -20 (almost nothing else ever gets to run).
2514                 </para>
2515         </sect1>
2516
2517         <sect1 id="reset">
2518             <title>reset</title>
2519
2520                 <para>
2521                 Usage: reset
2522                 </para>
2523
2524                 <para>
2525                 Resets the screen.
2526                 </para>
2527         </sect1>
2528
2529         <sect1 id="rm">
2530             <title>rm</title>
2531
2532                 <para>
2533                 Usage: rm [OPTION]... FILE...
2534                 </para>
2535
2536                 <para>
2537                 Remove (unlink) the FILE(s).  You may use '--' to
2538                 indicate that all following arguments are non-options.
2539                 </para>
2540
2541                 <para>
2542                 Options:
2543                 </para>
2544
2545                 <para>
2546                 <screen>
2547                         -f              Remove existing destinations, never prompt
2548                         -r or -R        Remove the contents of directories recursively
2549                 </screen>
2550                 </para>
2551
2552                 <para>
2553                 Example:
2554                 </para>
2555
2556                 <para>
2557                 <screen>
2558                         $ rm -rf /tmp/foo
2559                 </screen>
2560                 </para>
2561         </sect1>
2562
2563         <sect1 id="rmdir">
2564             <title>rmdir</title>
2565
2566                 <para>
2567                 Usage: rmdir DIRECTORY...
2568                 </para>
2569
2570                 <para>
2571                 Remove DIRECTORY(s) if they are empty.
2572                 </para>
2573
2574                 <para>
2575                 Example:
2576                 </para>
2577
2578                 <para>
2579                 <screen>
2580                         $ rmdir /tmp/foo
2581                 </screen>
2582                 </para>
2583         </sect1>
2584
2585         <sect1 id="rmmod">
2586             <title>rmmod</title>
2587
2588                 <para>
2589                 Usage: rmmod [OPTION]... [MODULE]...
2590                 </para>
2591
2592                 <para>
2593                 Unload MODULE(s) from the kernel.
2594                 </para>
2595
2596                 <para>
2597                 Options:
2598                 </para>
2599
2600                 <para>
2601                 <screen>
2602                         -a      Try to remove all unused kernel modules
2603                 </screen>
2604                 </para>
2605
2606                 <para>
2607                 Example:
2608                 </para>
2609
2610                 <para>
2611                 <screen>
2612                         $ rmmod tulip
2613                 </screen>
2614                 </para>
2615         </sect1>
2616
2617         <sect1 id="sed">
2618             <title>sed</title>
2619
2620                 <para>
2621                 Usage: sed [OPTION]... SCRIPT [FILE]...
2622                 </para>
2623
2624                 <para>
2625                 Allowed sed scripts come in the following form:
2626                 </para>
2627
2628                 <para>
2629                 <screen>
2630                 ADDR [!] COMMAND
2631                 </screen>
2632                 </para>
2633
2634                 <para>
2635                 ADDR can be:
2636                 </para>
2637
2638                 <para>
2639                 <screen>
2640                         NUMBER    Match specified line number
2641                         $         Match last line
2642                         /REGEXP/  Match specified regexp
2643                 </screen>
2644                 </para>
2645
2646                 <para>
2647                 ! inverts the meaning of the match
2648                 </para>
2649
2650                 <para>
2651                 COMMAND can be:
2652                 </para>
2653
2654                 <para>
2655                 <screen>
2656                         s/regexp/replacement/[igp]
2657                                 which attempt to match regexp against the pattern space
2658                                 and if successful replaces the matched portion with replacement.
2659                         aTEXT
2660                                 which appends TEXT after the pattern space
2661                 </screen>
2662                 </para>
2663
2664                 <para>
2665                 This version of sed matches full regular expressions.
2666                 </para>
2667
2668                 <para>
2669                 Options:
2670                 </para>
2671
2672                 <para>
2673                 <screen>
2674                         -e      Add the script to the commands to be executed
2675                         -n      Suppress automatic printing of pattern space
2676                 </screen>
2677                 </para>
2678
2679                 <para>
2680                 Example:
2681                 </para>
2682
2683                 <para>
2684                 <screen>
2685                         $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
2686                         bar
2687                 </screen>
2688                 </para>
2689         </sect1>
2690
2691         <sect1 id="setkeycodes">
2692             <title>setkeycodes</title>
2693
2694                 <para>
2695                 Usage: setkeycodes SCANCODE KEYCODE ...
2696                 </para>
2697
2698                 <para>
2699                 Set entries into the kernel's scancode-to-keycode map,
2700                 allowing unusual keyboards to generate usable keycodes.
2701                 </para>
2702
2703                 <para>
2704                 SCANCODE may be either xx or e0xx (hexadecimal), and
2705                 KEYCODE is given in decimal.
2706                 </para>
2707
2708                 <para>
2709                 Example:
2710                 </para>
2711
2712                 <para>
2713                 <screen>
2714                         $ setkeycodes e030 127
2715                 </screen>
2716                 </para>
2717         </sect1>
2718
2719
2720         <sect1 id="sh">
2721             <title>sh</title>
2722
2723                 <para>
2724                 Usage: sh
2725                 </para>
2726
2727                 <para>
2728                 lash -- the BusyBox LAme SHell (command interpreter)
2729                 </para>
2730
2731                 <para>
2732                 This command does not yet have proper documentation.  
2733                 </para>
2734
2735                 <para>
2736                 Use lash just as you would use any other shell. It
2737                 properly handles pipes, redirects, job control, can be
2738                 used as the shell for scripts (#!/bin/sh), and has a
2739                 sufficient set of builtins to do what is needed. It does
2740                 not (yet) support Bourne Shell syntax. If you need
2741                 things like ``if-then-else'', ``while'', and such, use
2742                 ash or bash. If you just need a very simple and
2743                 extremely small shell, this will do the job.
2744                 </para>
2745         </sect1>
2746
2747         <sect1 id="sleep">
2748             <title>sleep</title>
2749
2750                 <para>
2751                 Usage: sleep N
2752                 </para>
2753
2754                 <para>
2755                 Pause for N seconds.
2756                 </para>
2757
2758                 <para>
2759                 Example:
2760                 </para>
2761
2762                 <para>
2763                 <screen>
2764                         $ sleep 2
2765                         [2 second delay results]
2766                 </screen>
2767                 </para>
2768         </sect1>
2769
2770         <sect1 id="sort">
2771             <title>sort</title>
2772
2773                 <para>
2774                 Usage: sort [OPTION]... [FILE]...
2775                 </para>
2776
2777                 <para>
2778                 Sort lines of text in FILE(s).
2779                 </para>
2780
2781                 <para>
2782                 Options:
2783                 </para>
2784
2785                 <para>
2786                 <screen>
2787                         -n      Compare numerically
2788                         -r      Reverse after sorting
2789                 </screen>
2790                 </para>
2791
2792                 <para>
2793                 Example:
2794                 </para>
2795
2796                 <para>
2797                 <screen>
2798                         $ echo -e "e\nf\nb\nd\nc\na" | sort
2799                         a
2800                         b
2801                         c
2802                         d
2803                         e
2804                         f
2805                 </screen>
2806                 </para>
2807         </sect1>
2808
2809         <sect1 id="swapoff">
2810             <title>swapoff</title>
2811
2812                 <para>
2813                 Usage: swapoff [OPTION] [DEVICE]
2814                 </para>
2815
2816                 <para>
2817                 Stop swapping virtual memory pages on DEVICE.
2818                 </para>
2819
2820                 <para>
2821                 Options:
2822                 </para>
2823
2824                 <para>
2825                 <screen>
2826                         -a      Stop swapping on all swap devices
2827                 </screen>
2828                 </para>
2829         </sect1>
2830
2831         <sect1 id="swapon">
2832             <title>swapon</title>
2833
2834                 <para>
2835                 Usage: swapon [OPTION] [DEVICE]
2836                 </para>
2837
2838                 <para>
2839                 Start swapping virtual memory pages on the given device.
2840                 </para>
2841
2842                 <para>
2843                 Options:
2844                 </para>
2845
2846                 <para>
2847                 <screen>
2848                         -a      Start swapping on all swap devices
2849                 </screen>
2850                 </para>
2851         </sect1>
2852
2853         <sect1 id="sync">
2854             <title>sync</title>
2855
2856                 <para>
2857                 Usage: sync
2858                 </para>
2859
2860                 <para>
2861                 Write all buffered filesystem blocks to disk.
2862                 </para>
2863         </sect1>
2864
2865         <sect1 id="syslogd">
2866             <title>syslogd</title>
2867
2868                 <para>
2869                 Usage: syslogd [OPTION]...
2870                 </para>
2871
2872                 <para>
2873                 Linux system and kernel (provides klogd) logging
2874                 utility. Note that this version of syslogd/klogd ignores
2875                 /etc/syslog.conf.
2876                 </para>
2877
2878                 <para>
2879                 Options:
2880                 </para>
2881
2882                 <para>
2883                 <screen>
2884                         -m NUM  Interval between MARK lines (default=20min, 0=off)
2885                         -n      Run as a foreground process
2886                         -K      Do not start up the klogd process
2887                         -O FILE Use an alternate log file (default=/var/log/messages)
2888                         -R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
2889                 </screen>
2890                 </para>
2891
2892                 <para>
2893                 Example:
2894                 </para>
2895
2896                 <para>
2897                 <screen>
2898                 $ syslogd -R masterlog:514
2899                 $ syslogd -R 192.168.1.1:601
2900                 </screen>
2901                 </para>
2902         </sect1>
2903
2904         <sect1 id="tail">
2905             <title>tail</title>
2906
2907                 <para>
2908                 Usage: tail [OPTION] [FILE]...
2909                 </para>
2910
2911                 <para>
2912                 Print last 10 lines of each FILE to standard output.
2913                 With more than one FILE, precede each with a header
2914                 giving the file name. With no FILE, or when FILE is -,
2915                 read stdin.
2916                 </para>
2917
2918                 <para>
2919                 Options:
2920                 </para>
2921
2922                 <para>
2923                 <screen>
2924                         -n NUM  Print last NUM lines instead of last 10
2925                         -f      Output data as the file grows.  This version
2926                                 of 'tail -f' supports only one file at a time.
2927                 </screen>
2928                 </para>
2929
2930                 <para>
2931                 Example:
2932                 </para>
2933
2934                 <para>
2935                 <screen>
2936                         $ tail -n 1 /etc/resolv.conf
2937                         nameserver 10.0.0.1
2938                 </screen>
2939                 </para>
2940         </sect1>
2941
2942         <sect1 id="tar">
2943             <title>tar</title>
2944
2945                 <para>
2946                 Usage: tar [MODE] [OPTION] [FILE]...
2947                 </para>
2948
2949                 <para>
2950                 
2951                 </para>
2952
2953                 <para>
2954                 MODE may be chosen from
2955                 </para>
2956
2957                 <para>
2958                 <screen>
2959                         c       Create
2960                         x       Extract
2961                         t       List
2962                 </screen>
2963                 </para>
2964
2965                 <para>
2966                 Options:
2967                 </para>
2968
2969                 <para>
2970                 <screen>
2971                         f FILE                  Use FILE for tarfile (or stdin if '-')
2972                         O                               Extract to stdout
2973                         exclude FILE    File to exclude
2974                         v                               List files processed
2975                 </screen>
2976                 </para>
2977
2978                 <para>
2979                 Example:
2980                 </para>
2981
2982                 <para>
2983                 <screen>
2984                         $ zcat /tmp/tarball.tar.gz | tar -xf -
2985                         $ tar -cf /tmp/tarball.tar /usr/local
2986                 </screen>
2987                 </para>
2988         </sect1>
2989
2990         <sect1 id="tee">
2991             <title>tee</title>
2992
2993                 <para>
2994                 Usage: tee [OPTION]... [FILE]...
2995                 </para>
2996
2997                 <para>
2998                 Copy stdin to FILE(s), and also to stdout.
2999                 </para>
3000
3001                 <para>
3002                 Options:
3003                 </para>
3004
3005                 <para>
3006                 <screen>
3007                         -a      Append to the given FILEs, do not overwrite
3008                 </screen>
3009                 </para>
3010
3011                 <para>
3012                 Example:
3013                 </para>
3014
3015                 <para>
3016                 <screen>
3017                         $ echo "Hello" | tee /tmp/foo
3018                         Hello
3019                         $ cat /tmp/foo
3020                         Hello
3021                 </screen>
3022                 </para>
3023         </sect1>
3024
3025         <sect1 id="telnet">
3026             <title>telnet</title>
3027
3028                 <para>
3029                 Usage: telnet HOST [PORT]
3030                 </para>
3031
3032                 <para>
3033                 Establish interactive communication with another
3034                 computer over a network using the TELNET protocol.
3035                 </para>
3036         </sect1>
3037
3038         <sect1 id="test">
3039             <title>test, [</title>
3040
3041                 <para>
3042                 Usage: test EXPRESSION
3043                 </para>
3044
3045                 <para>
3046                 <screen>
3047                    or: [ EXPRESSION ]
3048
3049                 <para>
3050                 Check file types and compare values returning an exit
3051                 code determined by the value of EXPRESSION.
3052                 </para>
3053
3054                 <para>
3055                 Example:
3056                 </para>
3057
3058                 <para>
3059                 <screen>
3060                         $ test 1 -eq 2
3061                         $ echo $?
3062                         1
3063                         $ test 1 -eq 1
3064                         $ echo $?
3065                         0
3066                         $ [ -d /etc ]
3067                         $ echo $?
3068                         0
3069                         $ [ -d /junk ]
3070                         $ echo $?
3071                         1
3072                 </screen>
3073                 </para>
3074         </sect1>
3075
3076         <sect1 id="touch">
3077             <title>touch</title>
3078
3079                 <para>
3080                 Usage: touch [OPTION]... FILE...
3081                 </para>
3082
3083                 <para>
3084                 Update the last-modified date on (or create) FILE(s).
3085                 </para>
3086
3087                 <para>
3088                 Options:
3089                 </para>
3090
3091                 <para>
3092                 <screen>
3093                         -c      Do not create files
3094                 </screen>
3095                 </para>
3096
3097                 <para>
3098                 Example:
3099                 </para>
3100
3101                 <para>
3102                 <screen>
3103                         $ ls -l /tmp/foo
3104                         /bin/ls: /tmp/foo: No such file or directory
3105                         $ touch /tmp/foo
3106                         $ ls -l /tmp/foo
3107                         -rw-rw-r--    1 andersen andersen        0 Apr 15 01:11 /tmp/foo
3108                 </screen>
3109                 </para>
3110         </sect1>
3111
3112         <sect1 id="tr">
3113             <title>tr</title>
3114
3115                 <para>
3116                 Usage: tr [OPTION]... STRING1 [STRING2]
3117                 </para>
3118
3119                 <para>
3120                 Translate, squeeze, and/or delete characters from stdin,
3121                 writing to stdout.
3122                 </para>
3123
3124                 <para>
3125                 Options:
3126                 </para>
3127
3128                 <para>
3129                 <screen>
3130                         -c      Take complement of STRING1
3131                         -d      Delete input characters coded STRING1
3132                         -s      Squeeze multiple output characters of STRING2 into one character
3133                 </screen>
3134                 </para>
3135
3136                 <para>
3137                 Example:
3138                 </para>
3139
3140                 <para>
3141                 <screen>
3142                         $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
3143                         hello world
3144                 </screen>
3145                 </para>
3146         </sect1>
3147
3148         <sect1 id="true">
3149             <title>true</title>
3150
3151                 <para>
3152                 Usage: true
3153                 </para>
3154
3155                 <para>
3156                 Return an exit code of TRUE (1).
3157                 </para>
3158
3159                 <para>
3160                 Example:
3161                 </para>
3162
3163                 <para>
3164                 <screen>
3165                         $ true
3166                         $ echo $?
3167                         0
3168                 </screen>
3169                 </para>
3170         </sect1>
3171
3172         <sect1 id="tty">
3173             <title>tty</title>
3174
3175                 <para>
3176                 Usage: tty
3177                 </para>
3178
3179                 <para>
3180                 Print the file name of the terminal connected to stdin.
3181                 </para>
3182
3183                 <para>
3184                 Options:
3185                 </para>
3186
3187                 <para>
3188                 <screen>
3189                         -s      Print nothing, only return an exit status
3190                 </screen>
3191                 </para>
3192
3193                 <para>
3194                 Example:
3195                 </para>
3196
3197                 <para>
3198                 <screen>
3199                         $ tty
3200                         /dev/tty2
3201                 </screen>
3202                 </para>
3203         </sect1>
3204
3205         <sect1 id="umount">
3206             <title>umount</title>
3207
3208                 <para>
3209                 Usage: umount [OPTION]... DEVICE|DIRECTORY
3210                 </para>
3211
3212                 <para>
3213                 
3214                 </para>
3215
3216                 <para>
3217                 Options:
3218                 </para>
3219
3220                 <para>
3221                 <screen>
3222                         -a      Unmount all file systems
3223                         -r      Try to remount devices as read-only if mount is busy
3224                         -f      Force filesystem umount (i.e. unreachable NFS server)
3225                         -l      Do not free loop device (if a loop device has been used)
3226                 </screen>
3227                 </para>
3228
3229                 <para>
3230                 Example:
3231                 </para>
3232
3233                 <para>
3234                 <screen>
3235                         $ umount /dev/hdc1 
3236                 </screen>
3237                 </para>
3238         </sect1>
3239
3240         <sect1 id="uname">
3241             <title>uname</title>
3242
3243                 <para>
3244                 Usage: uname [OPTION]...
3245                 </para>
3246
3247                 <para>
3248                 Print certain system information. With no OPTION, same
3249                 as -s.
3250                 </para>
3251
3252                 <para>
3253                 Options:
3254                 </para>
3255
3256                 <para>
3257                 <screen>
3258                         -a      Print all information
3259                         -m      Print the machine (hardware) type
3260                         -n      Print the machine's network node hostname
3261                         -r      Print the operating system release
3262                         -s      Print the operating system name
3263                         -p      Print the host processor type
3264                         -v      Print the operating system version
3265                 </screen>
3266                 </para>
3267
3268                 <para>
3269                 Example:
3270                 </para>
3271
3272                 <para>
3273                 <screen>
3274                         $ uname -a
3275                         Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
3276                 </screen>
3277                 </para>
3278         </sect1>
3279
3280         <sect1 id="uniq">
3281             <title>uniq</title>
3282
3283                 <para>
3284                 Usage: uniq [INPUT [OUTPUT]]
3285                 </para>
3286
3287                 <para>
3288                 Discard all but one of successive identical lines from
3289                 INPUT (or stdin), writing to OUTPUT (or stdout).
3290                 </para>
3291
3292                 <para>
3293                 Example:
3294                 </para>
3295
3296                 <para>
3297                 <screen>
3298                         $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
3299                         a
3300                         b
3301                         c
3302                 </screen>
3303                 </para>
3304         </sect1>
3305
3306         <sect1 id="update">
3307             <title>update</title>
3308
3309                 <para>
3310                 Usage: update [OPTION]...
3311                 </para>
3312
3313                 <para>
3314                 Periodically flush filesystem buffers.
3315                 </para>
3316
3317                 <para>
3318                 Options:
3319                 </para>
3320
3321                 <para>
3322                 <screen>
3323                         -S      Force use of sync(2) instead of flushing
3324                         -s SECS Call sync this often (default 30)
3325                         -f SECS Flush some buffers this often (default 5)
3326                 </screen>
3327                 </para>
3328         </sect1>
3329
3330         <sect1 id="uptime">
3331             <title>uptime</title>
3332
3333                 <para>
3334                 Usage: uptime
3335                 </para>
3336
3337                 <para>
3338                 Display how long the system has been running since boot.
3339                 </para>
3340
3341                 <para>
3342                 Example:
3343                 </para>
3344
3345                 <para>
3346                 <screen>
3347                         $ uptime
3348                           1:55pm  up  2:30, load average: 0.09, 0.04, 0.00
3349                 </screen>
3350                 </para>
3351         </sect1>
3352
3353         <sect1 id="usleep">
3354             <title>usleep</title>
3355
3356                 <para>
3357                 Usage: usleep N
3358                 </para>
3359
3360                 <para>
3361                 Pause for N microseconds.
3362                 </para>
3363
3364                 <para>
3365                 Example:
3366                 </para>
3367
3368                 <para>
3369                 <screen>
3370                         $ usleep 1000000
3371                         [pauses for 1 second]
3372                 </screen>
3373                 </para>
3374         </sect1>
3375
3376         <sect1 id="uudecode">
3377             <title>uudecode</title>
3378
3379                 <para>
3380                 Usage: uudecode [OPTION] [FILE]
3381                 </para>
3382
3383                 <para>
3384                 Uudecode a uuencoded file.
3385                 </para>
3386
3387                 <para>
3388                 Options:
3389                 </para>
3390
3391                 <para>
3392                 <screen>
3393                         -o FILE Direct output to FILE
3394                 </screen>
3395                 </para>
3396
3397                 <para>
3398                 Example:
3399                 </para>
3400
3401                 <para>
3402                 <screen>
3403                         $ uudecode -o busybox busybox.uu
3404                         $ ls -l busybox
3405                         -rwxr-xr-x   1 ams      ams        245264 Jun  7 21:35 busybox
3406                 </screen>
3407                 </para>
3408         </sect1>
3409
3410         <sect1 id="uuencode">
3411             <title>uuencode</title>
3412
3413                 <para>
3414                 Usage: uuencode [OPTION] [INFILE] OUTFILE
3415                 </para>
3416
3417                 <para>
3418                 Uuencode a file.
3419                 </para>
3420
3421                 <para>
3422                 Options:
3423                 </para>
3424
3425                 <para>
3426                 <screen>
3427                         -m      Use base64 encoding as of RFC1521
3428                 </screen>
3429                 </para>
3430
3431                 <para>
3432                 Example:
3433                 </para>
3434
3435                 <para>
3436                 <screen>
3437                         $ uuencode busybox busybox
3438                         begin 755 busybox
3439                         M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&amp;
3440                         .....
3441                         $ uudecode busybox busybox &gt; busybox.uu
3442                         $
3443                 </screen>
3444                 </para>
3445         </sect1>
3446
3447         <sect1 id="wc">
3448             <title>wc</title>
3449
3450                 <para>
3451                 Usage: wc [OPTION]... [FILE]...
3452                 </para>
3453
3454                 <para>
3455                 Print line, word, and byte counts for each FILE, and a
3456                 total line if more than one FILE is specified. With no
3457                 FILE, read stdin.
3458                 </para>
3459
3460                 <para>
3461                 Options:
3462                 </para>
3463
3464                 <para>
3465                 <screen>
3466                         -c      Print the byte counts
3467                         -l      Print the newline counts
3468                         -L      Print the length of the longest line
3469                         -w      Print the word counts
3470                 </screen>
3471                 </para>
3472
3473                 <para>
3474                 Example:
3475                 </para>
3476
3477                 <para>
3478                 <screen>
3479                         $ wc /etc/passwd
3480                              31      46    1365 /etc/passwd
3481                 </screen>
3482                 </para>
3483         </sect1>
3484
3485         <sect1 id="which">
3486             <title>which</title>
3487
3488                 <para>
3489                 Usage: which [COMMAND]...
3490                 </para>
3491
3492                 <para>
3493                 Locate COMMAND(s).
3494                 </para>
3495
3496                 <para>
3497                 Example:
3498                 </para>
3499
3500                 <para>
3501                 <screen>
3502                         $ which login
3503                         /bin/login
3504                 </screen>
3505                 </para>
3506         </sect1>
3507
3508         <sect1 id="whoami">
3509             <title>whoami</title>
3510
3511                 <para>
3512                 Usage: whoami
3513                 </para>
3514
3515                 <para>
3516                 Print the user name associated with the current
3517                 effective user id.
3518                 </para>
3519
3520                 <para>
3521                 Example:
3522                 </para>
3523
3524                 <para>
3525                 <screen>
3526                         $ whoami
3527                         andersen
3528                 </screen>
3529                 </para>
3530         </sect1>
3531
3532         <sect1 id="yes">
3533             <title>yes</title>
3534
3535                 <para>
3536                 Usage: yes [STRING]...
3537                 </para>
3538
3539                 <para>
3540                 Repeatedly output a line with all specified STRING(s),
3541                 or `y'.
3542                 </para>
3543         </sect1>
3544
3545         <sect1 id="zcat">
3546             <title>zcat</title>
3547
3548                 <para>
3549                 Usage: zcat [OPTION]... FILE
3550                 </para>
3551
3552                 <para>
3553                 Uncompress FILE (or stdin if FILE is '-') to stdout.  
3554                 </para>
3555
3556                 <para>
3557                 Options:
3558                 </para>
3559
3560                 <para>
3561                 <screen>
3562                         -t      Test compressed file integrity
3563                 </screen>
3564                 </para>
3565
3566                 <para>
3567                 Example:
3568                 </para>
3569
3570                 <para>
3571                 <screen>
3572                 </screen>
3573                 </para>
3574         </sect1>
3575   </chapter>
3576
3577   <chapter id="LIBC-NSS">
3578     <title>LIBC NSS</title>
3579
3580         <para>
3581         GNU Libc uses the Name Service Switch (NSS) to configure the
3582         behavior of the C library for the local environment, and to
3583         configure how it reads system data, such as passwords and group
3584         information. BusyBox has made it Policy that it will never use
3585         NSS, and will never use libc calls that make use of NSS. This
3586         allows you to run an embedded system without the need for
3587         installing an /etc/nsswitch.conf file and without /lib/libnss_*
3588         libraries installed.
3589         </para>
3590
3591         <para>
3592         If you are using a system that is using a remote LDAP server for
3593         authentication via GNU libc NSS, and you want to use BusyBox,
3594         then you will need to adjust the BusyBox source. Chances are
3595         though, that if you have enough space to install of that stuff
3596         on your system, then you probably want the full GNU utilities.
3597         </para>
3598   </chapter>
3599
3600   <chapter id="SEE-ALSO">
3601     <title>SEE ALSO</title>
3602
3603         <para>
3604         <literal>textutils(1),</literal>
3605         <literal>shellutils(1),</literal>
3606         etc...
3607         </para>
3608   </chapter>
3609
3610   <chapter id="MAINTAINER">
3611     <title>MAINTAINER</title>
3612
3613         <para>
3614         Erik Andersen &lt;andersee@debian.org&gt; &lt;andersen@lineo.com&gt;
3615         </para>
3616   </chapter>
3617
3618   <chapter id="AUTHORS">
3619     <title>AUTHORS</title>
3620
3621         <para>
3622         The following people have contributed code to BusyBox whether
3623         they know it or not.
3624         </para>
3625
3626         <para>
3627         Erik Andersen &lt;andersee@debian.org&gt;
3628         </para>
3629
3630         <para>
3631         John Beppu &lt;beppu@lineo.com&gt;
3632         </para>
3633
3634         <para>
3635         Brian Candler &lt;B.Candler@pobox.com&gt;
3636         </para>
3637
3638         <para>
3639         Randolph Chung &lt;tausq@debian.org&gt;
3640         </para>
3641
3642         <para>
3643         Dave Cinege &lt;dcinege@psychosis.com&gt;       
3644         </para>
3645
3646         <para>
3647         Karl M. Hegbloom &lt;karlheg@debian.org&gt;
3648         </para>
3649
3650         <para>
3651         John Lombardo &lt;john@deltanet.com&gt; 
3652         </para>
3653
3654         <para>
3655         Glenn McGrath &lt;bug1@netconnect.com.au&gt;
3656         </para>
3657
3658         <para>
3659         Bruce Perens &lt;bruce@perens.com&gt;
3660         </para>
3661
3662         <para>
3663         Pavel Roskin &lt;proski@gnu.org&gt;
3664         </para>
3665
3666         <para>
3667         Linus Torvalds &lt;torvalds@transmeta.com&gt;
3668         </para>
3669
3670         <para>
3671         Charles P. Wright &lt;cpwright@villagenet.com&gt;
3672         </para>
3673
3674         <para>
3675         Enrique Zanardi &lt;ezanardi@ull.es&gt;
3676         </para>
3677   </chapter>
3678 </book>    <!-- End of the book -->