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