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