A first pass at integrating the SGML docs into the Makefile.
[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
61   <chapter id="Syntax">
62      <title>How to use BusyBox</title>
63         <sect1 id="How to use BusyBox">
64             <title>Syntax</title
65
66             <para>
67             <screen>
68              BusyBox &lt;function&gt; [arguments...]  # or
69             </screen>
70             </para>
71
72             <para>
73             <screen>
74              &lt;function&gt; [arguments...]          # if symlinked
75             </screen>
76             </para>
77         </sect1>
78
79
80         <sect1 id="Invoking BusyBox">
81             <para>
82             When you create a link to BusyBox for the function you wish to use, when
83             BusyBox is called using that link it will behave as if the command itself
84             has been invoked.
85             </para>
86
87             <para>
88             For example, entering
89             </para>
90
91             <para>
92             <screen>
93                     ln -s ./BusyBox ls
94                     ./ls
95             </screen>
96             </para>
97
98             <para>
99             will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
100             into BusyBox). 
101             </para>
102
103             <para>
104             You can also invoke BusyBox by issuing the command as an argument on the
105             command line. For example, entering
106             </para>
107
108             <para>
109             <screen>
110                     ./BusyBox ls
111             </screen>
112             </para>
113
114             <para>
115             will also cause BusyBox to behave as 'ls'. 
116             </para>
117
118         </sect1>
119
120         <sect1 id="Common options">
121             <para>
122             Most BusyBox commands support the <emphasis>--help</emphasis> option to provide 
123             a terse runtime description of their behavior. 
124             </para>
125         </sect1>
126   </chapter>
127
128   <chapter id="Commands">
129      <title>BusyBox Commands</title>
130         <sect1 id="Available BusyBox Commands">
131             <title>Available BusyBox Commands</title>
132                 <para>
133                 Currently defined functions include:
134                 </para>
135
136                 <para>
137                 ar, basename, cat, chgrp, chmod, chown, chroot, chvt, clear, cp, cut, date,
138                 dc, dd, deallocvt, df, dirname, dmesg, du, dutmp, echo, false, fbset,
139                 fdflush, find, free, freeramdisk, fsck.minix, grep, gunzip, gzip, halt,
140                 head, hostid, hostname, id, init, insmod, kill, killall, length, ln,
141                 loadacm, loadfont, loadkmap, logger, logname, ls, lsmod, makedevs, mkdir,
142                 mkfifo, mkfs.minix, mknod, mkswap, mktemp, more, mount, mt, mv, nc,
143                 nslookup, ping, poweroff, printf, ps, pwd, reboot, rm, rmdir, rmmod, sed,
144                 setkeycodes, sfdisk, sh, sleep, sort, swapoff, swapon, sync, syslogd, tail,
145                 tar, tee, telnet, test, touch, tr, true, tty, umount, uname, uniq, update,
146                 uptime, usleep, uudecode, uuencode, wc, which, whoami, yes, zcat, [
147                 </para>
148         </sect1>
149
150
151         <sect1 id="ar">
152             <title>ar</title>
153
154                 <para>
155                 Usage: ar [optxvV] archive [filenames]
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
178
179
180         <sect1 id="basename">
181             <title>basename</title>
182                 <para>
183                 Usage: basename FILE [SUFFIX]
184                 </para>
185
186                 <para>
187                 Strips directory path and suffixes from FILE. If specified, also removes
188                 any trailing SUFFIX.
189                 </para>
190
191                 <para>
192                 Example:
193                 </para>
194
195                 <para>
196                 <screen>
197                         $ basename /usr/local/bin/foo
198                         foo
199                         $ basename /usr/local/bin/
200                         bin
201                         $ basename /foo/bar.txt .txt
202                         bar
203                 </screen>
204                 </para>
205         </sect1>
206
207
208         <sect1 id="cat">
209             <title>cat</title>
210
211                 <para>
212                 Usage: cat [FILE ...]
213                 </para>
214
215                 <para>
216                 Concatenates <literal>FILE(s)</literal> and prints them to the standard
217                 output.
218                 </para>
219
220                 <para>
221                 Example:
222                 </para>
223
224                 <para>
225                 <screen>
226                         $ cat /proc/uptime
227                         110716.72 17.67
228                 </screen>
229                 </para>
230
231         </sect1>
232
233
234 <para>
235 -------------------------------
236
237
238 </para>
239
240 </listitem></varlistentry>
241 <varlistentry><term><emphasis>chgrp
242
243 </emphasis></term>
244 <listitem><para></para>
245
246 <para>
247 Usage: chgrp [OPTION]... GROUP FILE...
248
249
250 </para>
251
252 <para>
253 Change the group membership of each FILE to GROUP.
254
255
256 </para>
257
258 <para>
259 Options:
260
261
262 </para>
263
264 <para>
265 <screen>
266         -R      change files and directories recursively
267 </screen>
268
269
270 </para>
271
272 <para>
273 Example:
274
275
276 </para>
277
278 <para>
279 <screen>
280         $ ls -l /tmp/foo
281         -r--r--r--    1 andersen andersen        0 Apr 12 18:25 /tmp/foo
282         $ chgrp root /tmp/foo
283         $ ls -l /tmp/foo
284         -r--r--r--    1 andersen root            0 Apr 12 18:25 /tmp/foo
285 </screen>
286
287
288 </para>
289
290 <para>
291 -------------------------------
292
293
294 </para>
295
296 </listitem></varlistentry>
297 <varlistentry><term><emphasis>chmod
298
299 </emphasis></term>
300 <listitem><para></para>
301
302 <para>
303 Usage: chmod [<emphasis>-R</emphasis>] MODE[,MODE]... FILE...
304
305
306 </para>
307
308 <para>
309 Changes file access permissions for the specified
310 <literal>FILE(s)</literal> (or directories). Each MODE is defined by
311 combining the letters for WHO has access to the file, an OPERATOR for
312 selecting how the permissions should be changed, and a PERMISSION for
313 <literal>FILE(s)</literal> (or directories).
314
315
316 </para>
317
318 <para>
319 WHO may be chosen from
320
321
322 </para>
323
324 <para>
325 <screen>
326         u       User who owns the file
327         g       Users in the file's Group
328         o       Other users not in the file's group
329         a       All users
330 </screen>
331
332
333 </para>
334
335 <para>
336 OPERATOR may be chosen from
337
338
339 </para>
340
341 <para>
342 <screen>
343         +       Add a permission
344         -       Remove a permission
345         =       Assign a permission
346 </screen>
347
348
349 </para>
350
351 <para>
352 PERMISSION may be chosen from
353
354
355 </para>
356
357 <para>
358 <screen>
359         r       Read
360         w       Write
361         x       Execute (or access for directories)
362         s       Set user (or group) ID bit
363         t       Sticky bit (for directories prevents removing files by non-owners)
364 </screen>
365
366
367 </para>
368
369 <para>
370 Alternately, permissions can be set numerically where the first three
371 numbers are calculated by adding the octal values, such as
372
373
374 </para>
375
376 <para>
377 <screen>
378         4       Read
379         2       Write
380         1       Execute
381 </screen>
382
383
384 </para>
385
386 <para>
387 An optional fourth digit can also be used to specify
388
389
390 </para>
391
392 <para>
393 <screen>
394         4       Set user ID
395         2       Set group ID
396         1       Sticky bit
397 </screen>
398
399
400 </para>
401
402 <para>
403 Options:
404
405
406 </para>
407
408 <para>
409 <screen>
410         -R      Change files and directories recursively.
411 </screen>
412
413
414 </para>
415
416 <para>
417 Example:
418
419
420 </para>
421
422 <para>
423 <screen>
424         $ ls -l /tmp/foo
425         -rw-rw-r--    1 root     root            0 Apr 12 18:25 /tmp/foo
426         $ chmod u+x /tmp/foo
427         $ ls -l /tmp/foo
428         -rwxrw-r--    1 root     root            0 Apr 12 18:25 /tmp/foo*
429         $ chmod 444 /tmp/foo
430         $ ls -l /tmp/foo
431         -r--r--r--    1 root     root            0 Apr 12 18:25 /tmp/foo
432 </screen>
433
434
435 </para>
436
437 <para>
438 -------------------------------
439
440
441 </para>
442
443 </listitem></varlistentry>
444 <varlistentry><term><emphasis>chown
445
446 </emphasis></term>
447 <listitem><para></para>
448
449 <para>
450 Usage: chown [OPTION]... OWNER[&lt;.|:&gt;[GROUP] FILE...
451
452
453 </para>
454
455 <para>
456 Changes the owner and/or group of each FILE to OWNER and/or GROUP.
457
458
459 </para>
460
461 <para>
462 Options:
463
464
465 </para>
466
467 <para>
468 <screen>
469         -R      Changes files and directories recursively
470 </screen>
471
472
473 </para>
474
475 <para>
476 Example:
477
478
479 </para>
480
481 <para>
482 <screen>
483         $ ls -l /tmp/foo
484         -r--r--r--    1 andersen andersen        0 Apr 12 18:25 /tmp/foo
485         $ chown root /tmp/foo
486         $ ls -l /tmp/foo
487         -r--r--r--    1 root     andersen        0 Apr 12 18:25 /tmp/foo
488         $ chown root.root /tmp/foo
489         ls -l /tmp/foo
490         -r--r--r--    1 root     root            0 Apr 12 18:25 /tmp/foo
491 </screen>
492
493
494 </para>
495
496 <para>
497 -------------------------------
498
499
500 </para>
501
502 </listitem></varlistentry>
503 <varlistentry><term><emphasis>chroot
504
505 </emphasis></term>
506 <listitem><para></para>
507
508 <para>
509 Usage: chroot NEWROOT [COMMAND...]
510
511
512 </para>
513
514 <para>
515 Run COMMAND with root directory set to NEWROOT.
516
517
518 </para>
519
520 <para>
521 Example:
522
523
524 </para>
525
526 <para>
527 <screen>
528         $ ls -l /bin/ls
529         lrwxrwxrwx    1 root     root          12 Apr 13 00:46 /bin/ls -&gt; /BusyBox
530         $ mount /dev/hdc1 /mnt -t minix
531         $ chroot /mnt
532         $ ls -l /bin/ls
533         -rwxr-xr-x    1 root     root        40816 Feb  5 07:45 /bin/ls*
534 </screen>
535
536
537 </para>
538
539 <para>
540 -------------------------------
541
542
543 </para>
544
545 </listitem></varlistentry>
546 <varlistentry><term><emphasis>clear
547
548 </emphasis></term>
549 <listitem><para></para>
550
551 <para>
552 Clears the screen.
553
554
555 </para>
556
557 <para>
558 -------------------------------
559
560
561 </para>
562
563 </listitem></varlistentry>
564 <varlistentry><term><emphasis>chvt
565
566 </emphasis></term>
567 <listitem><para></para>
568
569 <para>
570 Usage: chvt N
571
572
573 </para>
574
575 <para>
576 Changes the foreground virtual terminal to /dev/ttyN
577
578
579 </para>
580
581 <para>
582 -------------------------------
583
584
585 </para>
586
587 </listitem></varlistentry>
588 <varlistentry><term><emphasis>cp
589
590 </emphasis></term>
591 <listitem><para></para>
592
593 <para>
594 Usage: cp [OPTION]... SOURCE DEST
595
596
597 </para>
598
599 <para>
600 <screen>
601    or: cp [OPTION]... SOURCE... DIRECTORY
602 </screen>
603
604
605 </para>
606
607 <para>
608 Copies SOURCE to DEST, or multiple <literal>SOURCE(s)</literal> to
609 DIRECTORY.
610
611
612 </para>
613
614 <para>
615 Options:
616
617
618 </para>
619
620 <para>
621 <screen>
622         -a      Same as -dpR
623         -d      Preserves links
624         -p      Preserves file attributes if possible
625         -R      Copies directories recursively
626 </screen>
627
628
629 </para>
630
631 <para>
632 -------------------------------
633
634
635 </para>
636
637 </listitem></varlistentry>
638 <varlistentry><term><emphasis>cut
639
640 </emphasis></term>
641 <listitem><para></para>
642
643 <para>
644 Usage: cut [OPTION]... [FILE]...
645
646
647 </para>
648
649 <para>
650 Prints selected fields from each input FILE to standard output.
651
652
653 </para>
654
655 <para>
656 Options:
657
658
659 </para>
660
661 <para>
662 <screen>
663                 -b LIST Output only bytes from LIST
664                 -c LIST Output only characters from LIST
665                 -d CHAR Use CHAR instead of tab as the field delimiter
666                 -s      Only output Lines if the include DELIM
667                 -f N    Print only these fields
668                 -n      Ignored
669 </screen>
670
671
672 </para>
673
674 <para>
675 Example:
676
677
678 </para>
679
680 <para>
681 <screen>
682         $ echo "Hello world" | cut -f 1 -d ' '
683         Hello
684         $ echo "Hello world" | cut -f 2 -d ' '
685         world
686 </screen>
687
688
689 </para>
690
691 <para>
692 -------------------------------
693
694
695 </para>
696
697 </listitem></varlistentry>
698 <varlistentry><term><emphasis>date
699
700 </emphasis></term>
701 <listitem><para></para>
702
703 <para>
704 Usage: date [OPTION]... [+FORMAT]
705
706
707 </para>
708
709 <para>
710 <screen>
711   or:  date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
712 </screen>
713
714
715 </para>
716
717 <para>
718 Displays the current time in the given FORMAT, or sets the system date.
719
720
721 </para>
722
723 <para>
724 Options:
725
726
727 </para>
728
729 <para>
730 <screen>
731         -R      Outputs RFC-822 compliant date string
732         -s      Sets time described by STRING
733         -u      Prints or sets Coordinated Universal Time
734 </screen>
735
736
737 </para>
738
739 <para>
740 Example:
741
742
743 </para>
744
745 <para>
746 <screen>
747         $ date
748         Wed Apr 12 18:52:41 MDT 2000
749 </screen>
750
751
752 </para>
753
754 <para>
755 -------------------------------
756
757
758 </para>
759
760 </listitem></varlistentry>
761 <varlistentry><term><emphasis>dc
762
763 </emphasis></term>
764 <listitem><para></para>
765
766 <para>
767 Usage: dc expression ...
768
769
770 </para>
771
772 <para>
773 This is a Tiny RPN calculator that understands the following operations: +,
774 -, /, *, and, or, not, eor. If no arguments are given, dc will process
775 input from STDIN.
776
777
778 </para>
779
780 <para>
781 The behaviour of BusyBox/dc deviates (just a little ;-) from GNU/dc, but
782 this will be remedied in the future.
783
784
785 </para>
786
787 <para>
788 Example:
789
790
791 </para>
792
793 <para>
794 <screen>
795         $ dc 2 2 +
796         4
797         $ dc 8 8 \* 2 2 + /
798         16
799         $ dc 0 1 and
800         0
801         $ dc 0 1 or
802         1
803         $ echo 72 9 div 8 mul | dc
804         64
805 </screen>
806
807
808 </para>
809
810 <para>
811 -------------------------------
812
813
814 </para>
815
816 </listitem></varlistentry>
817 <varlistentry><term><emphasis>dd
818
819 </emphasis></term>
820 <listitem><para></para>
821
822 <para>
823 Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
824
825
826 </para>
827
828 <para>
829 Copy a file, converting and formatting according to options
830
831
832 </para>
833
834 <para>
835 <screen>
836         if=FILE read from FILE instead of stdin
837         of=FILE write to FILE instead of stdout
838         bs=n    read and write n bytes at a time
839         count=n copy only n input blocks
840         skip=n  skip n input blocks
841         seek=n  skip n output blocks
842 </screen>
843
844
845 </para>
846
847 <para>
848 Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
849
850
851 </para>
852
853 <para>
854 Example:
855
856
857 </para>
858
859 <para>
860 <screen>
861         $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
862         4+0 records in
863         4+0 records out
864 </screen>
865
866
867 </para>
868
869 <para>
870 -------------------------------
871
872
873 </para>
874
875 </listitem></varlistentry>
876 <varlistentry><term><emphasis>df
877
878 </emphasis></term>
879 <listitem><para></para>
880
881 <para>
882 Usage: df [filesystem ...]
883
884
885 </para>
886
887 <para>
888 Prints the filesystem space used and space available.
889
890
891 </para>
892
893 <para>
894 Example:
895
896
897 </para>
898
899 <para>
900 <screen>
901         $ df
902         Filesystem           1k-blocks      Used Available Use% Mounted on
903         /dev/sda3              8690864   8553540    137324  98% /
904         /dev/sda1                64216     36364     27852  57% /boot
905         $ df /dev/sda3
906         Filesystem           1k-blocks      Used Available Use% Mounted on
907         /dev/sda3              8690864   8553540    137324  98% /
908 </screen>
909
910
911 </para>
912
913 <para>
914 -------------------------------
915
916
917 </para>
918
919 </listitem></varlistentry>
920 <varlistentry><term><emphasis>dirname
921
922 </emphasis></term>
923 <listitem><para></para>
924
925 <para>
926 Usage: dirname NAME
927
928
929 </para>
930
931 <para>
932 Strip non-directory suffix from file name
933
934
935 </para>
936
937 <para>
938 Example:
939
940
941 </para>
942
943 <para>
944 <screen>
945         $ dirname /tmp/foo
946         /tmp
947         $ dirname /tmp/foo/
948         /tmp
949 </screen>
950
951
952 </para>
953
954 <para>
955 -------------------------------
956
957
958 </para>
959
960 </listitem></varlistentry>
961 <varlistentry><term><emphasis>dmesg
962
963 </emphasis></term>
964 <listitem><para></para>
965
966 <para>
967 Usage: dmesg [<emphasis>-c</emphasis>] [<emphasis>-n</emphasis> level] [<emphasis>-s</emphasis> bufsize]
968
969
970 </para>
971
972 <para>
973 Print or controls the kernel ring buffer.
974
975
976 </para>
977
978 <para>
979 -------------------------------
980
981
982 </para>
983
984 </listitem></varlistentry>
985 <varlistentry><term><emphasis>du
986
987 </emphasis></term>
988 <listitem><para></para>
989
990 <para>
991 Usage: du [OPTION]... [FILE]...
992
993
994 </para>
995
996 <para>
997 Summarize disk space used for each FILE and/or directory. Disk space is
998 printed in units of 1k (i.e. 1024 bytes).
999
1000
1001 </para>
1002
1003 <para>
1004 Options:
1005
1006
1007 </para>
1008
1009 <para>
1010 <screen>
1011         -l      count sizes many times if hard linked
1012         -s      display only a total for each argument
1013 </screen>
1014
1015
1016 </para>
1017
1018 <para>
1019 Example:
1020
1021
1022 </para>
1023
1024 <para>
1025 <screen>
1026         $ ./BusyBox du
1027         16      ./CVS
1028         12      ./kernel-patches/CVS
1029         80      ./kernel-patches
1030         12      ./tests/CVS
1031         36      ./tests
1032         12      ./scripts/CVS
1033         16      ./scripts
1034         12      ./docs/CVS
1035         104     ./docs
1036         2417    .
1037 </screen>
1038
1039
1040 </para>
1041
1042 <para>
1043 -------------------------------
1044
1045
1046 </para>
1047
1048 </listitem></varlistentry>
1049 <varlistentry><term><emphasis>dutmp
1050
1051 </emphasis></term>
1052 <listitem><para></para>
1053
1054 <para>
1055 Usage: dutmp [FILE]
1056
1057
1058 </para>
1059
1060 <para>
1061 Dump utmp file format (pipe delimited) from FILE or stdin to stdout.
1062
1063
1064 </para>
1065
1066 <para>
1067 Example:
1068
1069
1070 </para>
1071
1072 <para>
1073 <screen>
1074         $ dutmp /var/run/utmp
1075         8|7||si|||0|0|0|955637625|760097|0
1076         2|0|~|~~|reboot||0|0|0|955637625|782235|0
1077         1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
1078         8|125||l4|||0|0|0|955637629|998367|0
1079         6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
1080         6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
1081         7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
1082 </screen>
1083
1084
1085 </para>
1086
1087 <para>
1088 -------------------------------
1089
1090
1091 </para>
1092
1093 </listitem></varlistentry>
1094 <varlistentry><term><emphasis>echo
1095
1096 </emphasis></term>
1097 <listitem><para></para>
1098
1099 <para>
1100 Usage: echo [-neE] [ARG ...]
1101
1102
1103 </para>
1104
1105 <para>
1106 Prints the specified ARGs to stdout
1107
1108
1109 </para>
1110
1111 <para>
1112 Options:
1113
1114
1115 </para>
1116
1117 <para>
1118 <screen>
1119         -n      suppress trailing newline
1120         -e      interpret backslash-escaped characters (i.e. \t=tab etc)
1121         -E      disable interpretation of backslash-escaped characters
1122 </screen>
1123
1124
1125 </para>
1126
1127 <para>
1128 Example:
1129
1130
1131 </para>
1132
1133 <para>
1134 <screen>
1135         $ echo "Erik is cool"
1136         Erik is cool
1137         $  echo -e "Erik\nis\ncool"
1138         Erik
1139         is
1140         cool
1141         $ echo "Erik\nis\ncool"
1142         Erik\nis\ncool
1143 </screen>
1144
1145
1146 </para>
1147
1148 <para>
1149 -------------------------------
1150
1151
1152 </para>
1153
1154 </listitem></varlistentry>
1155 <varlistentry><term><emphasis>false
1156
1157 </emphasis></term>
1158 <listitem><para></para>
1159
1160 <para>
1161 Returns an exit code of FALSE (1)
1162
1163
1164 </para>
1165
1166 <para>
1167 Example:
1168
1169
1170 </para>
1171
1172 <para>
1173 <screen>
1174         $ false
1175         $ echo $?
1176         1
1177 </screen>
1178
1179
1180 </para>
1181
1182 <para>
1183 -------------------------------
1184
1185
1186 </para>
1187
1188 </listitem></varlistentry>
1189 <varlistentry><term><emphasis>fbset
1190
1191 </emphasis></term>
1192 <listitem><para></para>
1193
1194 <para>
1195 Usage: fbset [options] [mode]
1196
1197
1198 </para>
1199
1200 <para>
1201 Show and modify frame buffer device settings
1202
1203
1204 </para>
1205
1206 <para>
1207 Options:
1208
1209
1210 </para>
1211
1212 <para>
1213 <screen>
1214         -h
1215         -fb
1216         -db
1217         -a
1218         -i
1219         -g
1220         -t
1221         -accel
1222         -hsync
1223         -vsync
1224         -laced
1225         -double
1226 </screen>
1227
1228
1229 </para>
1230
1231 <para>
1232 Example:
1233
1234
1235 </para>
1236
1237 <para>
1238 <screen>
1239         $ fbset
1240         mode "1024x768-76"
1241                         # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
1242                         geometry 1024 768 1024 768 16
1243                         timings 12714 128 32 16 4 128 4
1244                         accel false
1245                         rgba 5/11,6/5,5/0,0/0
1246         endmode
1247 </screen>
1248
1249
1250 </para>
1251
1252 <para>
1253 -------------------------------
1254
1255
1256 </para>
1257
1258 </listitem></varlistentry>
1259 <varlistentry><term><emphasis>fdflush
1260
1261 </emphasis></term>
1262 <listitem><para></para>
1263
1264 <para>
1265 Usage: fdflush device
1266
1267
1268 </para>
1269
1270 <para>
1271 Force floppy disk drive to detect disk change
1272
1273
1274 </para>
1275
1276 <para>
1277 -------------------------------
1278
1279
1280 </para>
1281
1282 </listitem></varlistentry>
1283 <varlistentry><term><emphasis>find
1284
1285 </emphasis></term>
1286 <listitem><para></para>
1287
1288 <para>
1289 Usage: find [PATH...] [EXPRESSION]
1290
1291
1292 </para>
1293
1294 <para>
1295 Search for files in a directory hierarchy. The default PATH is the current
1296 directory; default EXPRESSION is '-print'
1297
1298
1299 </para>
1300
1301 <para>
1302 EXPRESSION may consist of:
1303
1304
1305 </para>
1306
1307 <para>
1308 <screen>
1309         -follow                 Dereference symbolic links.
1310         -name PATTERN   File name (leading directories removed) matches PATTERN.
1311         -print                  print the full file name followed by a newline to stdout.
1312 </screen>
1313
1314
1315 </para>
1316
1317 <para>
1318 Example:
1319
1320
1321 </para>
1322
1323 <para>
1324 <screen>
1325         $ find / -name /etc/passwd
1326         /etc/passwd
1327 </screen>
1328
1329
1330 </para>
1331
1332 <para>
1333 -------------------------------
1334
1335
1336 </para>
1337
1338 </listitem></varlistentry>
1339 <varlistentry><term><emphasis>free
1340
1341 </emphasis></term>
1342 <listitem><para></para>
1343
1344 <para>
1345 Usage: free
1346
1347
1348 </para>
1349
1350 <para>
1351 Displays the amount of free and used system memory.
1352
1353
1354 </para>
1355
1356 <para>
1357 Example:
1358
1359
1360 </para>
1361
1362 <para>
1363 <screen>
1364         $ free
1365                                   total         used         free       shared      buffers
1366           Mem:       257628       248724         8904        59644        93124
1367          Swap:       128516         8404       120112
1368         Total:       386144       257128       129016
1369 </screen>
1370
1371
1372 </para>
1373
1374 <para>
1375 -------------------------------
1376
1377
1378 </para>
1379
1380 </listitem></varlistentry>
1381 <varlistentry><term><emphasis>freeramdisk
1382
1383 </emphasis></term>
1384 <listitem><para></para>
1385
1386 <para>
1387 Usage: freeramdisk DEVICE
1388
1389
1390 </para>
1391
1392 <para>
1393 Frees all memory used by the specified ramdisk.
1394
1395
1396 </para>
1397
1398 <para>
1399 Example:
1400
1401
1402 </para>
1403
1404 <para>
1405 <screen>
1406         $ freeramdisk /dev/ram2
1407 </screen>
1408
1409
1410 </para>
1411
1412 <para>
1413 -------------------------------
1414
1415
1416 </para>
1417
1418 </listitem></varlistentry>
1419 <varlistentry><term><emphasis>deallocvt
1420
1421 </emphasis></term>
1422 <listitem><para></para>
1423
1424 <para>
1425 Usage: deallocvt N
1426
1427
1428 </para>
1429
1430 <para>
1431 Deallocates unused virtual terminal /dev/ttyN
1432
1433
1434 </para>
1435
1436 <para>
1437 -------------------------------
1438
1439
1440 </para>
1441
1442 </listitem></varlistentry>
1443 <varlistentry><term><emphasis>fsck.minix
1444
1445 </emphasis></term>
1446 <listitem><para></para>
1447
1448 <para>
1449 Usage: fsck.minix [<emphasis>-larvsmf</emphasis>] /dev/name
1450
1451
1452 </para>
1453
1454 <para>
1455 Performs a consistency check for MINIX filesystems.
1456
1457
1458 </para>
1459
1460 <para>
1461 OPTIONS:
1462
1463
1464 </para>
1465
1466 <para>
1467 <screen>
1468         -l      Lists all filenames
1469         -r      Perform interactive repairs
1470         -a      Perform automatic repairs
1471         -v      verbose
1472         -s      Outputs super-block information
1473         -m      Activates MINIX-like "mode not cleared" warnings
1474         -f      Force file system check.
1475 </screen>
1476
1477
1478 </para>
1479
1480 <para>
1481 -------------------------------
1482
1483
1484 </para>
1485
1486 </listitem></varlistentry>
1487 <varlistentry><term><emphasis>grep
1488
1489 </emphasis></term>
1490 <listitem><para></para>
1491
1492 <para>
1493 Usage: grep [OPTIONS]... PATTERN [FILE]...
1494
1495
1496 </para>
1497
1498 <para>
1499 Search for PATTERN in each FILE or standard input.
1500
1501
1502 </para>
1503
1504 <para>
1505 OPTIONS:
1506
1507
1508 </para>
1509
1510 <para>
1511 <screen>
1512         -h      suppress the prefixing filename on output
1513         -i      ignore case distinctions
1514         -n      print line number with output lines
1515         -q      be quiet. Returns 0 if result was found, 1 otherwise
1516         -v      select non-matching lines
1517 </screen>
1518
1519
1520 </para>
1521
1522 <para>
1523 This version of grep matches full regular expressions.
1524
1525
1526 </para>
1527
1528 <para>
1529 Example:
1530
1531
1532 </para>
1533
1534 <para>
1535 <screen>
1536         $ grep root /etc/passwd
1537         root:x:0:0:root:/root:/bin/bash
1538         $ grep ^[rR]oo. /etc/passwd
1539         root:x:0:0:root:/root:/bin/bash
1540 </screen>
1541
1542
1543 </para>
1544
1545 <para>
1546 -------------------------------
1547
1548
1549 </para>
1550
1551 </listitem></varlistentry>
1552 <varlistentry><term><emphasis>gunzip
1553
1554 </emphasis></term>
1555 <listitem><para></para>
1556
1557 <para>
1558 Usage: gunzip [OPTION]... FILE
1559
1560
1561 </para>
1562
1563 <para>
1564 Uncompress FILE (or standard input if FILE is '-').
1565
1566
1567 </para>
1568
1569 <para>
1570 Options:
1571
1572
1573 </para>
1574
1575 <para>
1576 <screen>
1577         -c      Write output to standard output
1578         -t      Test compressed file integrity
1579 </screen>
1580
1581
1582 </para>
1583
1584 <para>
1585 Example:
1586
1587
1588 </para>
1589
1590 <para>
1591 <screen>
1592         $ ls -la /tmp/BusyBox*
1593         -rw-rw-r--    1 andersen andersen   557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
1594         $ gunzip /tmp/BusyBox-0.43.tar.gz
1595         $ ls -la /tmp/BusyBox*
1596         -rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1597 </screen>
1598
1599
1600 </para>
1601
1602 <para>
1603 -------------------------------
1604
1605
1606 </para>
1607
1608 </listitem></varlistentry>
1609 <varlistentry><term><emphasis>gzip
1610
1611 </emphasis></term>
1612 <listitem><para></para>
1613
1614 <para>
1615 Usage: gzip [OPTION]... FILE
1616
1617
1618 </para>
1619
1620 <para>
1621 Compress FILE with maximum compression. When FILE is '-', reads standard
1622 input. Implies <emphasis>-c</emphasis>.
1623
1624
1625 </para>
1626
1627 <para>
1628 Options:
1629
1630
1631 </para>
1632
1633 <para>
1634 <screen>
1635         -c      Write output to standard output instead of FILE.gz
1636 </screen>
1637
1638
1639 </para>
1640
1641 <para>
1642 Example:
1643
1644
1645 </para>
1646
1647 <para>
1648 <screen>
1649         $ ls -la /tmp/BusyBox*
1650         -rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1651         $ gzip /tmp/BusyBox-0.43.tar
1652         $ ls -la /tmp/BusyBox*
1653         -rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
1654 </screen>
1655
1656
1657 </para>
1658
1659 <para>
1660 -------------------------------
1661
1662
1663 </para>
1664
1665 </listitem></varlistentry>
1666 <varlistentry><term><emphasis>halt
1667
1668 </emphasis></term>
1669 <listitem><para></para>
1670
1671 <para>
1672 Usage: halt
1673
1674
1675 </para>
1676
1677 <para>
1678 This command halts the system.
1679
1680
1681 </para>
1682
1683 <para>
1684 -------------------------------
1685
1686
1687 </para>
1688
1689 </listitem></varlistentry>
1690 <varlistentry><term><emphasis>head
1691
1692 </emphasis></term>
1693 <listitem><para></para>
1694
1695 <para>
1696 Usage: head [OPTION] [FILE]...
1697
1698
1699 </para>
1700
1701 <para>
1702 Print first 10 lines of each FILE to standard output. With more than one
1703 FILE, precede each with a header giving the file name. With no FILE, or
1704 when FILE is -, read standard input.
1705
1706
1707 </para>
1708
1709 <para>
1710 Options:
1711
1712
1713 </para>
1714
1715 <para>
1716 <screen>
1717         -n NUM          Print first NUM lines instead of first 10
1718 </screen>
1719
1720
1721 </para>
1722
1723 <para>
1724 Example:
1725
1726
1727 </para>
1728
1729 <para>
1730 <screen>
1731         $ head -n 2 /etc/passwd
1732         root:x:0:0:root:/root:/bin/bash
1733         daemon:x:1:1:daemon:/usr/sbin:/bin/sh
1734 </screen>
1735
1736
1737 </para>
1738
1739 <para>
1740 -------------------------------
1741
1742
1743 </para>
1744
1745 </listitem></varlistentry>
1746 <varlistentry><term><emphasis>hostid
1747
1748 </emphasis></term>
1749 <listitem><para></para>
1750
1751 <para>
1752 Usage: hostid
1753
1754
1755 </para>
1756
1757 <para>
1758 Prints out a unique 32-bit identifier for the current machine. The 32-bit
1759 identifier is intended to be unique among all UNIX systems in existence. 
1760
1761
1762 </para>
1763
1764 <para>
1765 -------------------------------
1766
1767
1768 </para>
1769
1770 </listitem></varlistentry>
1771 <varlistentry><term><emphasis>hostname
1772
1773 </emphasis></term>
1774 <listitem><para></para>
1775
1776 <para>
1777 Usage: hostname [OPTION] {hostname | <emphasis>-F</emphasis> file}
1778
1779
1780 </para>
1781
1782 <para>
1783 Get or set the hostname or DNS domain name. If a hostname is given (or a
1784 file with the <emphasis>-F</emphasis> parameter), the host name will be set.
1785
1786
1787 </para>
1788
1789 <para>
1790 Options:
1791
1792
1793 </para>
1794
1795 <para>
1796 <screen>
1797         -s              Short
1798         -i              Addresses for the hostname
1799         -d              DNS domain name
1800         -F FILE         Use the contents of FILE to specify the hostname
1801 </screen>
1802
1803
1804 </para>
1805
1806 <para>
1807 Example:
1808
1809
1810 </para>
1811
1812 <para>
1813 <screen>
1814         $ hostname
1815         slag 
1816 </screen>
1817
1818
1819 </para>
1820
1821 <para>
1822 -------------------------------
1823
1824
1825 </para>
1826
1827 </listitem></varlistentry>
1828 <varlistentry><term><emphasis>id
1829
1830 </emphasis></term>
1831 <listitem><para></para>
1832
1833 <para>
1834 Print information for USERNAME or the current user
1835
1836
1837 </para>
1838
1839 <para>
1840 Options:
1841
1842
1843 </para>
1844
1845 <para>
1846 <screen>
1847         -g      prints only the group ID
1848         -u      prints only the user ID
1849         -r      prints the real user ID instead of the effective ID (with -ug)
1850 </screen>
1851
1852
1853 </para>
1854
1855 <para>
1856 Example:
1857
1858
1859 </para>
1860
1861 <para>
1862 <screen>
1863         $ id
1864         uid=1000(andersen) gid=1000(andersen)
1865 </screen>
1866
1867
1868 </para>
1869
1870 <para>
1871 -------------------------------
1872
1873
1874 </para>
1875
1876 </listitem></varlistentry>
1877 <varlistentry><term><emphasis>init
1878
1879 </emphasis></term>
1880 <listitem><para></para>
1881
1882 <para>
1883 Usage: init
1884
1885
1886 </para>
1887
1888 <para>
1889 Init is the parent of all processes.
1890
1891
1892 </para>
1893
1894 <para>
1895 This version of init is designed to be run only by the kernel.
1896
1897
1898 </para>
1899
1900 <para>
1901 BusyBox init doesn't support multiple runlevels. The runlevels field of the
1902 /etc/inittab file is completely ignored by BusyBox init. If you want
1903 runlevels, use sysvinit.
1904
1905
1906 </para>
1907
1908 <para>
1909 BusyBox init works just fine without an inittab. If no inittab is found, it
1910 has the following default behavior:
1911
1912
1913 </para>
1914
1915 <para>
1916 <screen>
1917         ::sysinit:/etc/init.d/rcS
1918         ::askfirst:/bin/sh
1919 </screen>
1920
1921
1922 </para>
1923
1924 <para>
1925 if it detects that /dev/console is _not_ a serial console, it will also
1926 run:
1927
1928
1929 </para>
1930
1931 <para>
1932 <screen>
1933         tty2::askfirst:/bin/sh
1934 </screen>
1935
1936
1937 </para>
1938
1939 <para>
1940 If you choose to use an /etc/inittab file, the inittab entry format is as
1941 follows:
1942
1943
1944 </para>
1945
1946 <para>
1947 <screen>
1948         &lt;id&gt;:&lt;runlevels&gt;:&lt;action&gt;:&lt;process&gt;
1949 </screen>
1950
1951
1952 </para>
1953
1954 <para>
1955 <screen>
1956         &lt;id&gt;: 
1957 </screen>
1958
1959
1960 </para>
1961
1962 <para>
1963 <screen>
1964                 WARNING: This field has a non-traditional meaning for BusyBox init!
1965                 The id field is used by BusyBox init to specify the controlling tty for
1966                 the specified process to run on.  The contents of this field are
1967                 appended to "/dev/" and used as-is.  There is no need for this field to
1968                 be unique, although if it isn't you may have strange results.  If this
1969                 field is left blank, it is completely ignored.  Also note that if
1970                 BusyBox detects that a serial console is in use, then all entries
1971                 containing non-empty id fields will _not_ be run.  BusyBox init does
1972                 nothing with utmp.  We don't need no stinkin' utmp.
1973 </screen>
1974
1975
1976 </para>
1977
1978 <para>
1979 <screen>
1980         &lt;runlevels&gt;: 
1981 </screen>
1982
1983
1984 </para>
1985
1986 <para>
1987 <screen>
1988                 The runlevels field is completely ignored.
1989 </screen>
1990
1991
1992 </para>
1993
1994 <para>
1995 <screen>
1996         &lt;action&gt;: 
1997 </screen>
1998
1999
2000 </para>
2001
2002 <para>
2003 <screen>
2004                 Valid actions include: sysinit, respawn, askfirst, wait, 
2005                 once, and ctrlaltdel.
2006 </screen>
2007
2008
2009 </para>
2010
2011 <para>
2012 <screen>
2013                 askfirst acts just like respawn, but before running the specified
2014                 process it displays the line "Please press Enter to activate this
2015                 console." and then waits for the user to press enter before starting
2016                 the specified process.
2017 </screen>
2018
2019
2020 </para>
2021
2022 <para>
2023 <screen>
2024                 Unrecognized actions (like initdefault) will cause init to emit
2025                 an error message, and then go along with its business.
2026 </screen>
2027
2028
2029 </para>
2030
2031 <para>
2032 <screen>
2033         &lt;process&gt;: 
2034 </screen>
2035
2036
2037 </para>
2038
2039 <para>
2040 <screen>
2041                 Specifies the process to be executed and it's command line.
2042 </screen>
2043
2044
2045 </para>
2046
2047 <para>
2048 Example /etc/inittab file:
2049
2050
2051 </para>
2052
2053 <para>
2054 <screen>
2055         # This is run first except when booting in single-user mode.
2056         #
2057         ::sysinit:/etc/init.d/rcS
2058 </screen>
2059
2060
2061 </para>
2062
2063 <para>
2064 <screen>
2065         # /bin/sh invocations on selected ttys
2066         #
2067         # Start an "askfirst" shell on the console (whatever that may be)
2068         ::askfirst:/bin/sh
2069         # Start an "askfirst" shell on /dev/tty2
2070         tty2::askfirst:/bin/sh
2071 </screen>
2072
2073
2074 </para>
2075
2076 <para>
2077 <screen>
2078         # /sbin/getty invocations for selected ttys
2079         #
2080         tty4::respawn:/sbin/getty 38400 tty4
2081         tty5::respawn:/sbin/getty 38400 tty5
2082 </screen>
2083
2084
2085 </para>
2086
2087 <para>
2088 <screen>
2089         # Example of how to put a getty on a serial line (for a terminal)
2090         #
2091         #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
2092         #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
2093         #
2094         # Example how to put a getty on a modem line.
2095         #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
2096 </screen>
2097
2098
2099 </para>
2100
2101 <para>
2102 <screen>
2103         # Stuff to do before rebooting
2104         ::ctrlaltdel:/bin/umount -a -r &gt; /dev/null 2&gt;&amp;1
2105         ::ctrlaltdel:/sbin/swapoff -a &gt; /dev/null 2&gt;&amp;1
2106 </screen>
2107
2108
2109 </para>
2110
2111 <para>
2112 -------------------------------
2113
2114
2115 </para>
2116
2117 </listitem></varlistentry>
2118 <varlistentry><term><emphasis>insmod
2119
2120 </emphasis></term>
2121 <listitem><para></para>
2122
2123 <para>
2124 Usage: insmod [OPTION]... MODULE [symbol=value]...
2125
2126
2127 </para>
2128
2129 <para>
2130 Loads the specified kernel modules into the kernel.
2131
2132
2133 </para>
2134
2135 <para>
2136 Options:
2137
2138
2139 </para>
2140
2141 <para>
2142 <screen>
2143                 -f      Force module to load into the wrong kernel version.
2144                 -k      Make module autoclean-able.
2145                 -v      verbose output
2146                 -x      do not export externs
2147 </screen>
2148
2149
2150 </para>
2151
2152 <para>
2153 -------------------------------
2154
2155
2156 </para>
2157
2158 </listitem></varlistentry>
2159 <varlistentry><term><emphasis>kill
2160
2161 </emphasis></term>
2162 <listitem><para></para>
2163
2164 <para>
2165 Usage: kill [<emphasis>-signal</emphasis>] process-id [process-id ...]
2166
2167
2168 </para>
2169
2170 <para>
2171 Send a signal (default is SIGTERM) to the specified
2172 <literal>process(es).</literal>
2173
2174
2175 </para>
2176
2177 <para>
2178 Options:
2179
2180
2181 </para>
2182
2183 <para>
2184 <screen>
2185         -l      List all signal names and numbers.
2186 </screen>
2187
2188
2189 </para>
2190
2191 <para>
2192 Example:
2193
2194
2195 </para>
2196
2197 <para>
2198 <screen>
2199         $ ps | grep apache
2200         252 root     root     S [apache]
2201         263 www-data www-data S [apache]
2202         264 www-data www-data S [apache]
2203         265 www-data www-data S [apache]
2204         266 www-data www-data S [apache]
2205         267 www-data www-data S [apache]
2206         $ kill 252
2207 </screen>
2208
2209
2210 </para>
2211
2212 <para>
2213 -------------------------------
2214
2215
2216 </para>
2217
2218 </listitem></varlistentry>
2219 <varlistentry><term><emphasis>killall
2220
2221 </emphasis></term>
2222 <listitem><para></para>
2223
2224 <para>
2225 Usage: killall [<emphasis>-signal</emphasis>] process-name [process-name ...]
2226
2227
2228 </para>
2229
2230 <para>
2231 Send a signal (default is SIGTERM) to the specified
2232 <literal>process(es).</literal>
2233
2234
2235 </para>
2236
2237 <para>
2238 Options:
2239
2240
2241 </para>
2242
2243 <para>
2244 <screen>
2245         -l      List all signal names and numbers.
2246 </screen>
2247
2248
2249 </para>
2250
2251 <para>
2252 Example:
2253
2254
2255 </para>
2256
2257 <para>
2258 <screen>
2259         $ killall apache
2260 </screen>
2261
2262
2263 </para>
2264
2265 <para>
2266 -------------------------------
2267
2268
2269 </para>
2270
2271 </listitem></varlistentry>
2272 <varlistentry><term><emphasis>length
2273
2274 </emphasis></term>
2275 <listitem><para></para>
2276
2277 <para>
2278 Usage: length STRING
2279
2280
2281 </para>
2282
2283 <para>
2284 Prints out the length of the specified STRING.
2285
2286
2287 </para>
2288
2289 <para>
2290 Example:
2291
2292
2293 </para>
2294
2295 <para>
2296 <screen>
2297         $ length "Hello"
2298         5
2299 </screen>
2300
2301
2302 </para>
2303
2304 <para>
2305 -------------------------------
2306
2307
2308 </para>
2309
2310 </listitem></varlistentry>
2311 <varlistentry><term><emphasis>ln
2312
2313 </emphasis></term>
2314 <listitem><para></para>
2315
2316 <para>
2317 Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
2318
2319
2320 </para>
2321
2322 <para>
2323 Create a link named LINK_NAME or DIRECTORY to the specified TARGET You may
2324 use '--' to indicate that all following arguments are non-options.
2325
2326
2327 </para>
2328
2329 <para>
2330 Options:
2331
2332
2333 </para>
2334
2335 <para>
2336 <screen>
2337         -s      make symbolic links instead of hard links
2338         -f      remove existing destination files
2339 </screen>
2340
2341
2342 </para>
2343
2344 <para>
2345 Example:
2346
2347
2348 </para>
2349
2350 <para>
2351 <screen>
2352     $ ln -s BusyBox /tmp/ls
2353     $ ls -l /tmp/ls
2354     lrwxrwxrwx    1 root     root            7 Apr 12 18:39 ls -&gt; BusyBox*
2355 </screen>
2356
2357
2358 </para>
2359
2360 <para>
2361 -------------------------------
2362
2363
2364 </para>
2365
2366 </listitem></varlistentry>
2367 <varlistentry><term><emphasis>loadacm
2368
2369 </emphasis></term>
2370 <listitem><para></para>
2371
2372 <para>
2373 Usage: loadacm
2374
2375
2376 </para>
2377
2378 <para>
2379 Loads an acm from standard input.
2380
2381
2382 </para>
2383
2384 <para>
2385 Example:
2386
2387
2388 </para>
2389
2390 <para>
2391 <screen>
2392         $ loadacm &lt; /etc/i18n/acmname
2393 </screen>
2394
2395
2396 </para>
2397
2398 <para>
2399 -------------------------------
2400
2401
2402 </para>
2403
2404 </listitem></varlistentry>
2405 <varlistentry><term><emphasis>loadfont
2406
2407 </emphasis></term>
2408 <listitem><para></para>
2409
2410 <para>
2411 Usage: loadfont
2412
2413
2414 </para>
2415
2416 <para>
2417 Loads a console font from standard input.
2418
2419
2420 </para>
2421
2422 <para>
2423 Example:
2424
2425
2426 </para>
2427
2428 <para>
2429 <screen>
2430         $ loadfont &lt; /etc/i18n/fontname
2431 </screen>
2432
2433
2434 </para>
2435
2436 <para>
2437 -------------------------------
2438
2439
2440 </para>
2441
2442 </listitem></varlistentry>
2443 <varlistentry><term><emphasis>loadkmap
2444
2445 </emphasis></term>
2446 <listitem><para></para>
2447
2448 <para>
2449 Usage: loadkmap
2450
2451
2452 </para>
2453
2454 <para>
2455 Loads a binary keyboard translation table from standard input.
2456
2457
2458 </para>
2459
2460 <para>
2461 Example:
2462
2463
2464 </para>
2465
2466 <para>
2467 <screen>
2468         $ loadkmap &lt; /etc/i18n/lang-keymap
2469 </screen>
2470
2471
2472 </para>
2473
2474 <para>
2475 -------------------------------
2476
2477
2478 </para>
2479
2480 </listitem></varlistentry>
2481 <varlistentry><term><emphasis>logger
2482
2483 </emphasis></term>
2484 <listitem><para></para>
2485
2486 <para>
2487 Usage: logger [OPTION]... [MESSAGE]
2488
2489
2490 </para>
2491
2492 <para>
2493 Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
2494
2495
2496 </para>
2497
2498 <para>
2499 Options:
2500
2501
2502 </para>
2503
2504 <para>
2505 <screen>
2506         -s      Log to stderr as well as the system log.
2507         -t      Log using the specified tag (defaults to user name).
2508         -p      Enter the message with the specified priority.
2509                 This may be numerical or a ``facility.level'' pair.
2510 </screen>
2511
2512
2513 </para>
2514
2515 <para>
2516 Example:
2517
2518
2519 </para>
2520
2521 <para>
2522 <screen>
2523                 $ logger "hello"
2524 </screen>
2525
2526
2527 </para>
2528
2529 <para>
2530 -------------------------------
2531
2532
2533 </para>
2534
2535 </listitem></varlistentry>
2536 <varlistentry><term><emphasis>logname
2537
2538 </emphasis></term>
2539 <listitem><para></para>
2540
2541 <para>
2542 Usage: logname
2543
2544
2545 </para>
2546
2547 <para>
2548 Print the name of the current user.
2549
2550
2551 </para>
2552
2553 <para>
2554 Example:
2555
2556
2557 </para>
2558
2559 <para>
2560 <screen>
2561         $ logname
2562         root
2563 </screen>
2564
2565
2566 </para>
2567
2568 <para>
2569 -------------------------------
2570
2571
2572 </para>
2573
2574 </listitem></varlistentry>
2575 <varlistentry><term><emphasis>ls
2576
2577 </emphasis></term>
2578 <listitem><para></para>
2579
2580 <para>
2581 Usage: ls [<emphasis>-1acdelnpuxACFR</emphasis>] [filenames...]
2582
2583
2584 </para>
2585
2586 <para>
2587 Options:
2588
2589
2590 </para>
2591
2592 <para>
2593 <screen>
2594         -a      do not hide entries starting with .
2595         -c      with  -l:  show ctime (the time of last
2596                 modification of file status information)
2597         -d      list directory entries instead of contents
2598         -e      list both full date and full time
2599         -l      use a long listing format
2600         -n      list numeric UIDs and GIDs instead of names
2601         -p      append indicator (one of /=@|) to entries
2602         -u      with -l: show access time (the time of last
2603                 access of the file)
2604         -x      list entries by lines instead of by columns
2605         -A      do not list implied . and ..
2606         -C      list entries by columns
2607         -F      append indicator (one of */=@|) to entries
2608         -R  list subdirectories recursively
2609 </screen>
2610
2611
2612 </para>
2613
2614 <para>
2615 -------------------------------
2616
2617
2618 </para>
2619
2620 </listitem></varlistentry>
2621 <varlistentry><term><emphasis>lsmod
2622
2623 </emphasis></term>
2624 <listitem><para></para>
2625
2626 <para>
2627 Usage: lsmod
2628
2629
2630 </para>
2631
2632 <para>
2633 Shows a list of all currently loaded kernel modules.
2634
2635
2636 </para>
2637
2638 <para>
2639 -------------------------------
2640
2641
2642 </para>
2643
2644 </listitem></varlistentry>
2645 <varlistentry><term><emphasis>makedevs
2646
2647 </emphasis></term>
2648 <listitem><para></para>
2649
2650 <para>
2651 Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
2652
2653
2654 </para>
2655
2656 <para>
2657 Creates a range of block or character special files
2658
2659
2660 </para>
2661
2662 <para>
2663 TYPEs include:
2664
2665
2666 </para>
2667
2668 <para>
2669 <screen>
2670         b:      Make a block (buffered) device.
2671         c or u: Make a character (un-buffered) device.
2672         p:      Make a named pipe. MAJOR and MINOR are ignored for named pipes.
2673 </screen>
2674
2675
2676 </para>
2677
2678 <para>
2679 FIRST specifies the number appended to NAME to create the first device.
2680 LAST specifies the number of the last item that should be created. If 's'
2681 is the last argument, the base device is created as well.
2682
2683
2684 </para>
2685
2686 <para>
2687 Example:
2688
2689
2690 </para>
2691
2692 <para>
2693 <screen>
2694         $ makedevs /dev/ttyS c 4 66 2 63
2695         [creates ttyS2-ttyS63]
2696         $ makedevs /dev/hda b 3 0 0 8 s
2697         [creates hda,hda1-hda8]
2698 </screen>
2699
2700
2701 </para>
2702
2703 <para>
2704 -------------------------------
2705
2706
2707 </para>
2708
2709 </listitem></varlistentry>
2710 <varlistentry><term><emphasis>md5sum
2711
2712 </emphasis></term>
2713 <listitem><para></para>
2714
2715 <para>
2716 Usage: md5sum [OPTION] [file ...]
2717
2718
2719 </para>
2720
2721 <para>
2722 Print or check MD5 checksums.
2723
2724
2725 </para>
2726
2727 <para>
2728 Options:
2729
2730
2731 </para>
2732
2733 <para>
2734 <screen>
2735         -b       read files in binary mode
2736         -c       check MD5 sums against given list
2737         -t       read files in text mode (default)
2738         -g       read a string
2739 </screen>
2740
2741
2742 </para>
2743
2744 <para>
2745 The following two options are useful only when verifying checksums:
2746
2747
2748 </para>
2749
2750 <para>
2751 <screen>
2752         -s       don't output anything, status code shows success
2753         -w       warn about improperly formated MD5 checksum lines
2754 </screen>
2755
2756
2757 </para>
2758
2759 <para>
2760 Example:
2761
2762
2763 </para>
2764
2765 <para>
2766 <screen>
2767         $ md5sum busybox
2768         6fd11e98b98a58f64ff3398d7b324003  busybox
2769         $ md5sum -c -
2770         6fd11e98b98a58f64ff3398d7b324003  busybox
2771         busybox: OK
2772         ^D
2773 </screen>
2774
2775
2776 </para>
2777
2778 <para>
2779 -------------------------------
2780
2781
2782 </para>
2783
2784 </listitem></varlistentry>
2785 <varlistentry><term><emphasis>mkdir
2786
2787 </emphasis></term>
2788 <listitem><para></para>
2789
2790 <para>
2791 Usage: mkdir [OPTION] DIRECTORY...
2792
2793
2794 </para>
2795
2796 <para>
2797 Create the <literal>DIRECTORY(ies),</literal> if they do not already exist
2798
2799
2800 </para>
2801
2802 <para>
2803 Options:
2804
2805
2806 </para>
2807
2808 <para>
2809 <screen>
2810         -m      set permission mode (as in chmod), not rwxrwxrwx - umask
2811         -p      no error if directory exists, make parent directories as needed
2812 </screen>
2813
2814
2815 </para>
2816
2817 <para>
2818 Example:
2819
2820
2821 </para>
2822
2823 <para>
2824 <screen>
2825         $ mkdir /tmp/foo
2826         $ mkdir /tmp/foo
2827         /tmp/foo: File exists
2828         $ mkdir /tmp/foo/bar/baz
2829         /tmp/foo/bar/baz: No such file or directory
2830         $ mkdir -p /tmp/foo/bar/baz
2831 </screen>
2832
2833
2834 </para>
2835
2836 <para>
2837 -------------------------------
2838
2839
2840 </para>
2841
2842 </listitem></varlistentry>
2843 <varlistentry><term><emphasis>mkfifo
2844
2845 </emphasis></term>
2846 <listitem><para></para>
2847
2848 <para>
2849 Usage: mkfifo [OPTIONS] name
2850
2851
2852 </para>
2853
2854 <para>
2855 Creates a named pipe (identical to 'mknod name p')
2856
2857
2858 </para>
2859
2860 <para>
2861 Options:
2862
2863
2864 </para>
2865
2866 <para>
2867 <screen>
2868         -m      create the pipe using the specified mode (default a=rw)
2869 </screen>
2870
2871
2872 </para>
2873
2874 <para>
2875 -------------------------------
2876
2877
2878 </para>
2879
2880 </listitem></varlistentry>
2881 <varlistentry><term><emphasis>mkfs.minix
2882
2883 </emphasis></term>
2884 <listitem><para></para>
2885
2886 <para>
2887 Usage: mkfs.minix [<emphasis>-c</emphasis> | <emphasis>-l</emphasis> filename] [<emphasis>-nXX</emphasis>] [<emphasis>-iXX</emphasis>] /dev/name [blocks]
2888
2889
2890 </para>
2891
2892 <para>
2893 Make a MINIX filesystem.
2894
2895
2896 </para>
2897
2898 <para>
2899 OPTIONS:
2900
2901
2902 </para>
2903
2904 <para>
2905 <screen>
2906         -c              Check the device for bad blocks
2907         -n [14|30]      Specify the maximum length of filenames
2908         -i              Specify the number of inodes for the filesystem
2909         -l FILENAME     Read the bad blocks list from FILENAME
2910         -v              Make a Minix version 2 filesystem
2911 </screen>
2912
2913
2914 </para>
2915
2916 <para>
2917 -------------------------------
2918
2919
2920 </para>
2921
2922 </listitem></varlistentry>
2923 <varlistentry><term><emphasis>mknod
2924
2925 </emphasis></term>
2926 <listitem><para></para>
2927
2928 <para>
2929 Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
2930
2931
2932 </para>
2933
2934 <para>
2935 Create a special file (block, character, or pipe).
2936
2937
2938 </para>
2939
2940 <para>
2941 Options:
2942
2943
2944 </para>
2945
2946 <para>
2947 <screen>
2948         -m      create the special file using the specified mode (default a=rw)
2949 </screen>
2950
2951
2952 </para>
2953
2954 <para>
2955 TYPEs include: b: Make a block (buffered) device. c or u: Make a character
2956 (un-buffered) device. p: Make a named pipe. MAJOR and MINOR are ignored for
2957 named pipes.
2958
2959
2960 </para>
2961
2962 <para>
2963 Example:
2964
2965
2966 </para>
2967
2968 <para>
2969 <screen>
2970         $ mknod /dev/fd0 b 2 0 
2971         $ mknod -m 644 /tmp/pipe p
2972 </screen>
2973
2974
2975 </para>
2976
2977 <para>
2978 -------------------------------
2979
2980
2981 </para>
2982
2983 </listitem></varlistentry>
2984 <varlistentry><term><emphasis>mkswap
2985
2986 </emphasis></term>
2987 <listitem><para></para>
2988
2989 <para>
2990 Usage: mkswap [<emphasis>-c</emphasis>] [<emphasis>-v0</emphasis>|<emphasis>-v1</emphasis>] device [block-count]
2991
2992
2993 </para>
2994
2995 <para>
2996 Prepare a disk partition to be used as a swap partition.
2997
2998
2999 </para>
3000
3001 <para>
3002 Options:
3003
3004
3005 </para>
3006
3007 <para>
3008 <screen>
3009         -c              Check for read-ability.
3010         -v0             Make version 0 swap [max 128 Megs].
3011         -v1             Make version 1 swap [big!] (default for kernels &gt; 2.1.117).
3012         block-count     Number of block to use (default is entire partition).
3013 </screen>
3014
3015
3016 </para>
3017
3018 <para>
3019 -------------------------------
3020
3021
3022 </para>
3023
3024 </listitem></varlistentry>
3025 <varlistentry><term><emphasis>mktemp
3026
3027 </emphasis></term>
3028 <listitem><para></para>
3029
3030 <para>
3031 Usage: mktemp [<emphasis>-q</emphasis>] TEMPLATE
3032
3033
3034 </para>
3035
3036 <para>
3037 Creates a temporary file with its name based on TEMPLATE. TEMPLATE is any
3038 name with six `Xs' (i.e. /tmp/temp.XXXXXX).
3039
3040
3041 </para>
3042
3043 <para>
3044 Example:
3045
3046
3047 </para>
3048
3049 <para>
3050 <screen>
3051         $ mktemp /tmp/temp.XXXXXX
3052         /tmp/temp.mWiLjM
3053         $ ls -la /tmp/temp.mWiLjM
3054         -rw-------    1 andersen andersen        0 Apr 25 17:10 /tmp/temp.mWiLjM
3055 </screen>
3056
3057
3058 </para>
3059
3060 <para>
3061 -------------------------------
3062
3063
3064 </para>
3065
3066 </listitem></varlistentry>
3067 <varlistentry><term><emphasis>nc
3068
3069 </emphasis></term>
3070 <listitem><para></para>
3071
3072 <para>
3073 Usage: nc [IP] [port]
3074
3075
3076 </para>
3077
3078 <para>
3079 Netcat opens a pipe to IP:port
3080
3081
3082 </para>
3083
3084 <para>
3085 Example:
3086
3087
3088 </para>
3089
3090 <para>
3091 <screen>
3092         $ nc foobar.somedomain.com 25
3093         220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
3094         help
3095         214-Commands supported:
3096         214-    HELO EHLO MAIL RCPT DATA AUTH
3097         214     NOOP QUIT RSET HELP
3098         quit
3099         221 foobar closing connection
3100 </screen>
3101
3102
3103 </para>
3104
3105 <para>
3106 -------------------------------
3107
3108
3109 </para>
3110
3111 </listitem></varlistentry>
3112 <varlistentry><term><emphasis>more
3113
3114 </emphasis></term>
3115 <listitem><para></para>
3116
3117 <para>
3118 Usage: more [file ...]
3119
3120
3121 </para>
3122
3123 <para>
3124 More is a filter for paging through text one screenful at a time.
3125
3126
3127 </para>
3128
3129 <para>
3130 Example:
3131
3132
3133 </para>
3134
3135 <para>
3136 <screen>
3137         $ dmesg | more
3138 </screen>
3139
3140
3141 </para>
3142
3143 <para>
3144 -------------------------------
3145
3146
3147 </para>
3148
3149 </listitem></varlistentry>
3150 <varlistentry><term><emphasis>mount
3151
3152 </emphasis></term>
3153 <listitem><para></para>
3154
3155 <para>
3156 Usage: mount [flags] mount [flags] device directory [<emphasis>-o</emphasis> options,more-options]
3157
3158
3159 </para>
3160
3161 <para>
3162 Flags:
3163
3164
3165 </para>
3166
3167 <para>
3168 <screen>
3169         -a:             Mount all file systems in fstab.
3170         -o option:      One of many filesystem options, listed below.
3171         -r:             Mount the filesystem read-only.
3172         -t fs-type:     Specify the filesystem type.
3173         -w:             Mount for reading and writing (default).
3174 </screen>
3175
3176
3177 </para>
3178
3179 <para>
3180 Options for use with the ``<emphasis>-o</emphasis>'' flag:
3181
3182
3183 </para>
3184
3185 <para>
3186 <screen>
3187         async/sync:     Writes are asynchronous / synchronous.
3188         atime/noatime:  Enable / disable updates to inode access times.
3189         dev/nodev:      Allow use of special device files / disallow them.
3190         exec/noexec:    Allow use of executable files / disallow them.
3191         loop:           Mounts a file via loop device.
3192         suid/nosuid:    Allow set-user-id-root programs / disallow them.
3193         remount:        Re-mount a currently-mounted filesystem, changing its flags.
3194         ro/rw:          Mount for read-only / read-write.
3195         There are EVEN MORE flags that are specific to each filesystem.
3196         You'll have to see the written documentation for those.
3197 </screen>
3198
3199
3200 </para>
3201
3202 <para>
3203 Example:
3204
3205
3206 </para>
3207
3208 <para>
3209 <screen>
3210         $ mount
3211         /dev/hda3 on / type minix (rw)
3212         proc on /proc type proc (rw)
3213         devpts on /dev/pts type devpts (rw)
3214         $ mount /dev/fd0 /mnt -t msdos -o ro
3215         $ mount /tmp/diskimage /opt -t ext2 -o loop
3216 </screen>
3217
3218
3219 </para>
3220
3221 <para>
3222 -------------------------------
3223
3224
3225 </para>
3226
3227 </listitem></varlistentry>
3228 <varlistentry><term><emphasis>mt
3229
3230 </emphasis></term>
3231 <listitem><para></para>
3232
3233 <para>
3234 Usage: mt [<emphasis>-f</emphasis> device] opcode value
3235
3236
3237 </para>
3238
3239 <para>
3240 Control magnetic tape drive operation
3241
3242
3243 </para>
3244
3245 <para>
3246 -------------------------------
3247
3248
3249 </para>
3250
3251 </listitem></varlistentry>
3252 <varlistentry><term><emphasis>mv
3253
3254 </emphasis></term>
3255 <listitem><para></para>
3256
3257 <para>
3258 Usage: mv SOURCE DEST
3259
3260
3261 </para>
3262
3263 <para>
3264 <screen>
3265    or: mv SOURCE... DIRECTORY
3266 </screen>
3267
3268
3269 </para>
3270
3271 <para>
3272 Rename SOURCE to DEST, or move <literal>SOURCE(s)</literal> to DIRECTORY.
3273
3274
3275 </para>
3276
3277 <para>
3278 Example:
3279
3280
3281 </para>
3282
3283 <para>
3284 <screen>
3285         $ mv /tmp/foo /bin/bar
3286 </screen>
3287
3288
3289 </para>
3290
3291 <para>
3292 -------------------------------
3293
3294
3295 </para>
3296
3297 </listitem></varlistentry>
3298 <varlistentry><term><emphasis>nslookup
3299
3300 </emphasis></term>
3301 <listitem><para></para>
3302
3303 <para>
3304 Usage: nslookup [HOST]
3305
3306
3307 </para>
3308
3309 <para>
3310 Queries the nameserver for the IP address of the given HOST
3311
3312
3313 </para>
3314
3315 <para>
3316 Example:
3317
3318
3319 </para>
3320
3321 <para>
3322 <screen>
3323         $ nslookup localhost
3324         Server:     default
3325         Address:    default
3326 </screen>
3327
3328
3329 </para>
3330
3331 <para>
3332 <screen>
3333         Name:       debian
3334         Address:    127.0.0.1
3335 </screen>
3336
3337
3338 </para>
3339
3340 <para>
3341 -------------------------------
3342
3343
3344 </para>
3345
3346 </listitem></varlistentry>
3347 <varlistentry><term><emphasis>ping
3348
3349 </emphasis></term>
3350 <listitem><para></para>
3351
3352 <para>
3353 Usage: ping [OPTION]... host
3354
3355
3356 </para>
3357
3358 <para>
3359 Send ICMP ECHO_REQUEST packets to network hosts.
3360
3361
3362 </para>
3363
3364 <para>
3365 Options:
3366
3367
3368 </para>
3369
3370 <para>
3371 <screen>
3372         -c COUNT        Send only COUNT pings.
3373         -s SIZE         Send SIZE data bytes in packets (default=56).
3374         -q              Quiet mode, only displays output at start
3375                         and when finished.
3376 Example:
3377 </screen>
3378
3379
3380 </para>
3381
3382 <para>
3383 <screen>
3384         $ ping localhost
3385         PING slag (127.0.0.1): 56 data bytes
3386         64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
3387 </screen>
3388
3389
3390 </para>
3391
3392 <para>
3393 <screen>
3394         --- debian ping statistics ---
3395         1 packets transmitted, 1 packets received, 0% packet loss
3396         round-trip min/avg/max = 20.1/20.1/20.1 ms
3397 </screen>
3398
3399
3400 </para>
3401
3402 <para>
3403 -------------------------------
3404
3405
3406 </para>
3407
3408 </listitem></varlistentry>
3409 <varlistentry><term><emphasis>poweroff
3410
3411 </emphasis></term>
3412 <listitem><para></para>
3413
3414 <para>
3415 Shuts down the system, and requests that the kernel turn off power upon
3416 halting.
3417
3418
3419 </para>
3420
3421 <para>
3422 -------------------------------
3423
3424
3425 </para>
3426
3427 </listitem></varlistentry>
3428 <varlistentry><term><emphasis>printf
3429
3430 </emphasis></term>
3431 <listitem><para></para>
3432
3433 <para>
3434 Usage: printf format [argument...]
3435
3436
3437 </para>
3438
3439 <para>
3440 Formats and prints the given data in a manner similar to the C printf
3441 command.
3442
3443
3444 </para>
3445
3446 <para>
3447 Example:
3448
3449
3450 </para>
3451
3452 <para>
3453 <screen>
3454         $ printf "Val=%d\n" 5
3455         Val=5
3456 </screen>
3457
3458
3459 </para>
3460
3461 <para>
3462 -------------------------------
3463
3464
3465 </para>
3466
3467 </listitem></varlistentry>
3468 <varlistentry><term><emphasis>ps
3469
3470 </emphasis></term>
3471 <listitem><para></para>
3472
3473 <para>
3474 Usage: ps
3475
3476
3477 </para>
3478
3479 <para>
3480 Report process status
3481
3482
3483 </para>
3484
3485 <para>
3486 This version of ps accepts no options.
3487
3488
3489 </para>
3490
3491 <para>
3492 Example:
3493
3494
3495 </para>
3496
3497 <para>
3498 <screen>
3499         $ ps
3500   PID  Uid      Gid State Command
3501     1 root     root     S init
3502     2 root     root     S [kflushd]
3503     3 root     root     S [kupdate]
3504     4 root     root     S [kpiod]
3505     5 root     root     S [kswapd]
3506   742 andersen andersen S [bash]
3507   743 andersen andersen S -bash
3508   745 root     root     S [getty]
3509  2990 andersen andersen R ps
3510 </screen>
3511
3512
3513 </para>
3514
3515 <para>
3516 -------------------------------
3517
3518
3519 </para>
3520
3521 </listitem></varlistentry>
3522 <varlistentry><term><emphasis>pwd
3523
3524 </emphasis></term>
3525 <listitem><para></para>
3526
3527 <para>
3528 Prints the full filename of the current working directory.
3529
3530
3531 </para>
3532
3533 <para>
3534 Example:
3535
3536
3537 </para>
3538
3539 <para>
3540 <screen>
3541         $ pwd
3542         /root
3543 </screen>
3544
3545
3546 </para>
3547
3548 <para>
3549 -------------------------------
3550
3551
3552 </para>
3553
3554 </listitem></varlistentry>
3555 <varlistentry><term><emphasis>reboot
3556
3557 </emphasis></term>
3558 <listitem><para></para>
3559
3560 <para>
3561 Instructs the kernel to reboot the system.
3562
3563
3564 </para>
3565
3566 <para>
3567 -------------------------------
3568
3569
3570 </para>
3571
3572 </listitem></varlistentry>
3573 <varlistentry><term><emphasis>rm
3574
3575 </emphasis></term>
3576 <listitem><para></para>
3577
3578 <para>
3579 Usage: rm [OPTION]... FILE...
3580
3581
3582 </para>
3583
3584 <para>
3585 Remove (unlink) the <literal>FILE(s).</literal> You may use '--' to
3586 indicate that all following arguments are non-options.
3587
3588
3589 </para>
3590
3591 <para>
3592 Options:
3593
3594
3595 </para>
3596
3597 <para>
3598 <screen>
3599         -f              remove existing destinations, never prompt
3600         -r or -R        remove the contents of directories recursively
3601 </screen>
3602
3603
3604 </para>
3605
3606 <para>
3607 Example:
3608
3609
3610 </para>
3611
3612 <para>
3613 <screen>
3614         $ rm -rf /tmp/foo
3615 </screen>
3616
3617
3618 </para>
3619
3620 <para>
3621 -------------------------------
3622
3623
3624 </para>
3625
3626 </listitem></varlistentry>
3627 <varlistentry><term><emphasis>rmdir
3628
3629 </emphasis></term>
3630 <listitem><para></para>
3631
3632 <para>
3633 Usage: rmdir [OPTION]... DIRECTORY...
3634
3635
3636 </para>
3637
3638 <para>
3639 Remove the <literal>DIRECTORY(ies),</literal> if they are empty.
3640
3641
3642 </para>
3643
3644 <para>
3645 Example:
3646
3647
3648 </para>
3649
3650 <para>
3651 <screen>
3652         # rmdir /tmp/foo
3653 </screen>
3654
3655
3656 </para>
3657
3658 <para>
3659 -------------------------------
3660
3661
3662 </para>
3663
3664 </listitem></varlistentry>
3665 <varlistentry><term><emphasis>rmmod
3666
3667 </emphasis></term>
3668 <listitem><para></para>
3669
3670 <para>
3671 Usage: rmmod [OPTION]... [MODULE]...
3672
3673
3674 </para>
3675
3676 <para>
3677 Unloads the specified kernel modules from the kernel.
3678
3679
3680 </para>
3681
3682 <para>
3683 Options:
3684
3685
3686 </para>
3687
3688 <para>
3689 <screen>
3690         -a      Try to remove all unused kernel modules.
3691 </screen>
3692
3693
3694 </para>
3695
3696 <para>
3697 Example:
3698
3699
3700 </para>
3701
3702 <para>
3703 <screen>
3704         $ rmmod tulip
3705 </screen>
3706
3707
3708 </para>
3709
3710 <para>
3711 -------------------------------
3712
3713
3714 </para>
3715
3716 </listitem></varlistentry>
3717 <varlistentry><term><emphasis>sed
3718
3719 </emphasis></term>
3720 <listitem><para></para>
3721
3722 <para>
3723 Usage: sed [<emphasis>-n</emphasis>] <emphasis>-e</emphasis> script [file...]
3724
3725
3726 </para>
3727
3728 <para>
3729 Allowed sed scripts come in the following form:
3730
3731
3732 </para>
3733
3734 <para>
3735 <screen>
3736         'ADDR [!] COMMAND'
3737 </screen>
3738
3739
3740 </para>
3741
3742 <para>
3743 <screen>
3744         where address ADDR can be:
3745           NUMBER    Match specified line number
3746           $         Match last line
3747           /REGEXP/  Match specified regexp
3748           (! inverts the meaning of the match)
3749 </screen>
3750
3751
3752 </para>
3753
3754 <para>
3755 <screen>
3756         and COMMAND can be:
3757           s/regexp/replacement/[igp]
3758                  which attempt to match regexp against the pattern space
3759                  and if successful replaces the matched portion with replacement.
3760 </screen>
3761
3762
3763 </para>
3764
3765 <para>
3766 <screen>
3767           aTEXT
3768                  which appends TEXT after the pattern space
3769 </screen>
3770
3771
3772 </para>
3773
3774 <para>
3775 Options:
3776
3777
3778 </para>
3779
3780 <para>
3781 <screen>
3782         -e      add the script to the commands to be executed
3783         -n      suppress automatic printing of pattern space
3784 </screen>
3785
3786
3787 </para>
3788
3789 <para>
3790 This version of sed matches full regular expressions.
3791
3792
3793 </para>
3794
3795 <para>
3796 Example:
3797
3798
3799 </para>
3800
3801 <para>
3802 <screen>
3803         $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
3804         bar
3805 </screen>
3806
3807
3808 </para>
3809
3810 <para>
3811 -------------------------------
3812
3813
3814 </para>
3815
3816 </listitem></varlistentry>
3817 <varlistentry><term><emphasis>setkeycodes
3818
3819 </emphasis></term>
3820 <listitem><para></para>
3821
3822 <para>
3823 Usage: setkeycodes SCANCODE KEYCODE ...
3824
3825
3826 </para>
3827
3828 <para>
3829 Set entries into the kernel's scancode-to-keycode map, allowing unusual
3830 keyboards to generate usable keycodes.
3831
3832
3833 </para>
3834
3835 <para>
3836 SCANCODE may be either xx or e0xx (hexadecimal), and KEYCODE is given in
3837 decimal
3838
3839
3840 </para>
3841
3842 <para>
3843 Example:
3844
3845
3846 </para>
3847
3848 <para>
3849 <screen>
3850         # setkeycodes e030 127
3851 </screen>
3852
3853
3854 </para>
3855
3856 <para>
3857 -------------------------------
3858
3859
3860 </para>
3861
3862 </listitem></varlistentry>
3863 <varlistentry><term><emphasis>sh
3864
3865 </emphasis></term>
3866 <listitem><para></para>
3867
3868 <para>
3869 Usage: sh
3870
3871
3872 </para>
3873
3874 <para>
3875 lash -- the BusyBox LAme SHell (command interpreter)
3876
3877
3878 </para>
3879
3880 <para>
3881 This command does not yet have proper documentation.  
3882
3883
3884 </para>
3885
3886 <para>
3887 Use lash just as you would use any other shell. It properly handles pipes,
3888 redirects, job control, can be used as the shell for scripts (#!/bin/sh),
3889 and has a sufficient set of builtins to do what is needed. It does not
3890 (yet) support Bourne Shell syntax. If you need things like
3891 ``if-then-else'', ``while'', and such, use ash or bash. If you just need a
3892 very simple and extremely small shell, this will do the job.
3893
3894
3895 </para>
3896
3897 <para>
3898 -------------------------------
3899
3900
3901 </para>
3902
3903 </listitem></varlistentry>
3904 <varlistentry><term><emphasis>sfdisk
3905
3906 </emphasis></term>
3907 <listitem><para></para>
3908
3909 <para>
3910 Usage: sfdisk [options] device ...
3911
3912
3913 </para>
3914
3915 <para>
3916 device: something like /dev/hda or /dev/sda
3917
3918
3919 </para>
3920
3921 <para>
3922 useful options:
3923
3924
3925 </para>
3926
3927 <para>
3928 <screen>
3929     -s [or --show-size]: list size of a partition
3930     -c [or --id]:        print or change partition Id
3931     -l [or --list]:      list partitions of each device
3932     -d [or --dump]:      idem, but in a format suitable for later input
3933     -i [or --increment]: number cylinders etc. from 1 instead of from 0
3934     -uS, -uB, -uC, -uM:  accept/report in units of sectors/blocks/cylinders/MB
3935     -T [or --list-types]:list the known partition types
3936     -D [or --DOS]:       for DOS-compatibility: waste a little space
3937     -R [or --re-read]:   make kernel reread partition table
3938     -N# :                change only the partition with number #
3939     -n :                 do not actually write to disk
3940     -O file :            save the sectors that will be overwritten to file
3941     -I file :            restore these sectors again
3942     -v [or --version]:   print version
3943     -? [or --help]:      print this message
3944 </screen>
3945
3946
3947 </para>
3948
3949 <para>
3950 dangerous options:
3951
3952
3953 </para>
3954
3955 <para>
3956 <screen>
3957     -g [or --show-geometry]: print the kernel's idea of the geometry
3958     -x [or --show-extended]: also list extended partitions on output
3959 </screen>
3960
3961
3962 </para>
3963
3964 <para>
3965 <screen>
3966                              or expect descriptors for them on input
3967     -L  [or --Linux]:      do not complain about things irrelevant for Linux
3968     -q  [or --quiet]:      suppress warning messages
3969     You can override the detected geometry using:
3970     -C# [or --cylinders #]:set the number of cylinders to use
3971     -H# [or --heads #]:    set the number of heads to use
3972     -S# [or --sectors #]:  set the number of sectors to use
3973 </screen>
3974
3975
3976 </para>
3977
3978 <para>
3979 You can disable all consistency checking with:
3980
3981
3982 </para>
3983
3984 <para>
3985 <screen>
3986     -f  [or --force]:      do what I say, even if it is stupid
3987 </screen>
3988
3989
3990 </para>
3991
3992 <para>
3993 -------------------------------
3994
3995
3996 </para>
3997
3998 </listitem></varlistentry>
3999 <varlistentry><term><emphasis>sleep
4000
4001 </emphasis></term>
4002 <listitem><para></para>
4003
4004 <para>
4005 Usage: sleep N
4006
4007
4008 </para>
4009
4010 <para>
4011 Pause for N seconds.
4012
4013
4014 </para>
4015
4016 <para>
4017 Example:
4018
4019
4020 </para>
4021
4022 <para>
4023 <screen>
4024         $ sleep 2
4025         [2 second delay results]
4026 </screen>
4027
4028
4029 </para>
4030
4031 <para>
4032 -------------------------------
4033
4034
4035 </para>
4036
4037 </listitem></varlistentry>
4038 <varlistentry><term><emphasis>sort
4039
4040 </emphasis></term>
4041 <listitem><para></para>
4042
4043 <para>
4044 Usage: sort [<emphasis>-n</emphasis>] [<emphasis>-r</emphasis>] [FILE]...
4045
4046
4047 </para>
4048
4049 <para>
4050 Sorts lines of text in the specified files
4051
4052
4053 </para>
4054
4055 <para>
4056 Example:
4057
4058
4059 </para>
4060
4061 <para>
4062 <screen>
4063         $ echo -e "e\nf\nb\nd\nc\na" | sort
4064         a
4065         b
4066         c
4067         d
4068         e
4069         f
4070 </screen>
4071
4072
4073 </para>
4074
4075 <para>
4076 -------------------------------
4077
4078
4079 </para>
4080
4081 </listitem></varlistentry>
4082 <varlistentry><term><emphasis>sync
4083
4084 </emphasis></term>
4085 <listitem><para></para>
4086
4087 <para>
4088 Usage: sync
4089
4090
4091 </para>
4092
4093 <para>
4094 Write all buffered filesystem blocks to disk.
4095
4096
4097 </para>
4098
4099 <para>
4100 -------------------------------
4101
4102
4103 </para>
4104
4105 </listitem></varlistentry>
4106 <varlistentry><term><emphasis>syslogd
4107
4108 </emphasis></term>
4109 <listitem><para></para>
4110
4111 <para>
4112 Usage: syslogd [OPTION]...
4113
4114
4115 </para>
4116
4117 <para>
4118 Linux system and kernel (provides klogd) logging utility. Note that this
4119 version of syslogd/klogd ignores /etc/syslog.conf.
4120
4121
4122 </para>
4123
4124 <para>
4125 Options:
4126
4127
4128 </para>
4129
4130 <para>
4131 <screen>
4132         -m NUM          Interval between MARK lines (default=20min, 0=off)
4133         -n              Run as a foreground process
4134         -K              Do not start up the klogd process
4135         -O FILE         Use an alternate log file (default=/var/log/messages)
4136 </screen>
4137
4138
4139 </para>
4140
4141 <para>
4142 -------------------------------
4143
4144
4145 </para>
4146
4147 </listitem></varlistentry>
4148 <varlistentry><term><emphasis>swapon
4149
4150 </emphasis></term>
4151 <listitem><para></para>
4152
4153 <para>
4154 Usage: swapon [OPTION] [device]
4155
4156
4157 </para>
4158
4159 <para>
4160 Start swapping virtual memory pages on the given device.
4161
4162
4163 </para>
4164
4165 <para>
4166 Options:
4167
4168
4169 </para>
4170
4171 <para>
4172 <screen>
4173         -a      Start swapping on all swap devices
4174 </screen>
4175
4176
4177 </para>
4178
4179 <para>
4180 -------------------------------
4181
4182
4183 </para>
4184
4185 </listitem></varlistentry>
4186 <varlistentry><term><emphasis>swapoff
4187
4188 </emphasis></term>
4189 <listitem><para></para>
4190
4191 <para>
4192 Usage: swapoff [OPTION] [device]
4193
4194
4195 </para>
4196
4197 <para>
4198 Stop swapping virtual memory pages on the given device.
4199
4200
4201 </para>
4202
4203 <para>
4204 Options:
4205
4206
4207 </para>
4208
4209 <para>
4210 <screen>
4211         -a      Stop swapping on all swap devices
4212 </screen>
4213
4214
4215 </para>
4216
4217 <para>
4218 -------------------------------
4219
4220
4221 </para>
4222
4223 </listitem></varlistentry>
4224 <varlistentry><term><emphasis>tail
4225
4226 </emphasis></term>
4227 <listitem><para></para>
4228
4229 <para>
4230 Usage: tail [OPTION] [FILE]...
4231
4232
4233 </para>
4234
4235 <para>
4236 Print last 10 lines of each FILE to standard output. With more than one
4237 FILE, precede each with a header giving the file name. With no FILE, or
4238 when FILE is -, read standard input.
4239
4240
4241 </para>
4242
4243 <para>
4244 Options:
4245
4246
4247 </para>
4248
4249 <para>
4250 <screen>
4251         -n NUM          Print last NUM lines instead of first 10
4252         -f              Output data as the file grows.  This version
4253                         of 'tail -f' supports only one file at a time.
4254 </screen>
4255
4256
4257 </para>
4258
4259 <para>
4260 Example:
4261
4262
4263 </para>
4264
4265 <para>
4266 <screen>
4267         $ tail -n 1 /etc/resolv.conf
4268         nameserver 10.0.0.1
4269 </screen>
4270
4271
4272 </para>
4273
4274 <para>
4275 -------------------------------
4276
4277
4278 </para>
4279
4280 </listitem></varlistentry>
4281 <varlistentry><term><emphasis>tar
4282
4283 </emphasis></term>
4284 <listitem><para></para>
4285
4286 <para>
4287 Usage: tar -[cxtvO] [<emphasis>--exclude</emphasis> File] [<emphasis>-f</emphasis> tarFile] [FILE] ...
4288
4289
4290 </para>
4291
4292 <para>
4293 Create, extract, or list files from a tar file. Note that this version of
4294 tar treats hard links as separate files.
4295
4296
4297 </para>
4298
4299 <para>
4300 Main operation mode:
4301
4302
4303 </para>
4304
4305 <para>
4306 <screen>
4307         c               create
4308         x               extract
4309         t               list
4310 </screen>
4311
4312
4313 </para>
4314
4315 <para>
4316 File selection:
4317
4318
4319 </para>
4320
4321 <para>
4322 <screen>
4323         f               name of tarfile or "-" for stdin
4324         O               extract to stdout
4325         --exclude       file to exclude
4326 </screen>
4327
4328
4329 </para>
4330
4331 <para>
4332 Informative output:
4333
4334
4335 </para>
4336
4337 <para>
4338 <screen>
4339         v               verbosely list files processed
4340 </screen>
4341
4342
4343 </para>
4344
4345 <para>
4346 Example:
4347
4348
4349 </para>
4350
4351 <para>
4352 <screen>
4353         $ zcat /tmp/tarball.tar.gz | tar -xf -
4354         $ tar -cf /tmp/tarball.tar /usr/local
4355 </screen>
4356
4357
4358 </para>
4359
4360 <para>
4361 -------------------------------
4362
4363
4364 </para>
4365
4366 </listitem></varlistentry>
4367 <varlistentry><term><emphasis>test, [
4368
4369 </emphasis></term>
4370 <listitem><para></para>
4371
4372 <para>
4373 Usage: test EXPRESSION or [ EXPRESSION ]
4374
4375
4376 </para>
4377
4378 <para>
4379 Checks file types and compares values returning an exit code determined by
4380 the value of EXPRESSION.
4381
4382
4383 </para>
4384
4385 <para>
4386 Example:
4387
4388
4389 </para>
4390
4391 <para>
4392 <screen>
4393         $ test 1 -eq 2
4394         $ echo $?
4395         1
4396         $ test 1 -eq 1
4397         $ echo $?
4398         0
4399         $ [ -d /etc ]
4400         $ echo $?
4401         0
4402         $ [ -d /junk ]
4403         $ echo $?
4404         1
4405 </screen>
4406
4407
4408 </para>
4409
4410 <para>
4411 -------------------------------
4412
4413
4414 </para>
4415
4416 </listitem></varlistentry>
4417 <varlistentry><term><emphasis>telnet
4418
4419 </emphasis></term>
4420 <listitem><para></para>
4421
4422 <para>
4423 Usage: telnet host [port]
4424
4425
4426 </para>
4427
4428 <para>
4429 Telnet is used to establish interactive communication with another computer
4430 over a network using the TELNET protocol.
4431
4432
4433 </para>
4434
4435 <para>
4436 -------------------------------
4437
4438
4439 </para>
4440
4441 </listitem></varlistentry>
4442 <varlistentry><term><emphasis>tee
4443
4444 </emphasis></term>
4445 <listitem><para></para>
4446
4447 <para>
4448 Usage: tee [OPTION]... [FILE]...
4449
4450
4451 </para>
4452
4453 <para>
4454 Copy standard input to each FILE, and also to standard output.
4455
4456
4457 </para>
4458
4459 <para>
4460 Options:
4461
4462
4463 </para>
4464
4465 <para>
4466 <screen>
4467         -a      append to the given FILEs, do not overwrite
4468 </screen>
4469
4470
4471 </para>
4472
4473 <para>
4474 Example:
4475
4476
4477 </para>
4478
4479 <para>
4480 <screen>
4481         $ echo "Hello" | tee /tmp/foo
4482         $ cat /tmp/foo
4483         Hello
4484 </screen>
4485
4486
4487 </para>
4488
4489 <para>
4490 -------------------------------
4491
4492
4493 </para>
4494
4495 </listitem></varlistentry>
4496 <varlistentry><term><emphasis>touch
4497
4498 </emphasis></term>
4499 <listitem><para></para>
4500
4501 <para>
4502 Usage: touch [<emphasis>-c</emphasis>] file [file ...]
4503
4504
4505 </para>
4506
4507 <para>
4508 Update the last-modified date on (or create) the selected file[s].
4509
4510
4511 </para>
4512
4513 <para>
4514 Example:
4515
4516
4517 </para>
4518
4519 <para>
4520 <screen>
4521         $ ls -l /tmp/foo
4522         /bin/ls: /tmp/foo: No such file or directory
4523         $ touch /tmp/foo
4524         $ ls -l /tmp/foo
4525         -rw-rw-r--    1 andersen andersen        0 Apr 15 01:11 /tmp/foo
4526 </screen>
4527
4528
4529 </para>
4530
4531 <para>
4532 -------------------------------
4533
4534
4535 </para>
4536
4537 </listitem></varlistentry>
4538 <varlistentry><term><emphasis>tr
4539
4540 </emphasis></term>
4541 <listitem><para></para>
4542
4543 <para>
4544 Usage: tr [-cds] STRING1 [STRING2]
4545
4546
4547 </para>
4548
4549 <para>
4550 Translate, squeeze, and/or delete characters from standard input, writing
4551 to standard output.
4552
4553
4554 </para>
4555
4556 <para>
4557 Options:
4558
4559
4560 </para>
4561
4562 <para>
4563 <screen>
4564         -c      take complement of STRING1
4565         -d      delete input characters coded STRING1
4566         -s      squeeze multiple output characters of STRING2 into one character
4567 </screen>
4568
4569
4570 </para>
4571
4572 <para>
4573 Example:
4574
4575
4576 </para>
4577
4578 <para>
4579 <screen>
4580         $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
4581         hello world
4582 </screen>
4583
4584
4585 </para>
4586
4587 <para>
4588 -------------------------------
4589
4590
4591 </para>
4592
4593 </listitem></varlistentry>
4594 <varlistentry><term><emphasis>true
4595
4596 </emphasis></term>
4597 <listitem><para></para>
4598
4599 <para>
4600 Returns an exit code of TRUE (0)
4601
4602
4603 </para>
4604
4605 <para>
4606 Example:
4607
4608
4609 </para>
4610
4611 <para>
4612 <screen>
4613         $ true
4614         $ echo $?
4615         0
4616 </screen>
4617
4618
4619 </para>
4620
4621 <para>
4622 -------------------------------
4623
4624
4625 </para>
4626
4627 </listitem></varlistentry>
4628 <varlistentry><term><emphasis>tty
4629
4630 </emphasis></term>
4631 <listitem><para></para>
4632
4633 <para>
4634 Usage: tty
4635
4636
4637 </para>
4638
4639 <para>
4640 Print the file name of the terminal connected to standard input.
4641
4642
4643 </para>
4644
4645 <para>
4646 Options:
4647
4648
4649 </para>
4650
4651 <para>
4652 <screen>
4653         -s      print nothing, only return an exit status
4654 </screen>
4655
4656
4657 </para>
4658
4659 <para>
4660 Example:
4661
4662
4663 </para>
4664
4665 <para>
4666 <screen>
4667         $ tty
4668         /dev/tty2
4669 </screen>
4670
4671
4672 </para>
4673
4674 <para>
4675 -------------------------------
4676
4677
4678 </para>
4679
4680 </listitem></varlistentry>
4681 <varlistentry><term><emphasis>uuencode
4682
4683 </emphasis></term>
4684 <listitem><para></para>
4685
4686 <para>
4687 Usage: uuencode [OPTION] [INFILE] REMOTEFILE
4688
4689
4690 </para>
4691
4692 <para>
4693 Uuencode a file.
4694
4695
4696 </para>
4697
4698 <para>
4699 Options:
4700
4701
4702 </para>
4703
4704 <para>
4705 <screen>
4706         -m      use base64 encoding as of RFC1521
4707 </screen>
4708
4709
4710 </para>
4711
4712 <para>
4713 Example:
4714
4715
4716 </para>
4717
4718 <para>
4719 <screen>
4720         $ uuencode busybox busybox
4721         begin 755 busybox
4722         M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&amp;
4723         .....
4724         $ uudecode busybox busybox &gt; busybox.uu
4725         $
4726 </screen>
4727
4728
4729 </para>
4730
4731 <para>
4732 -------------------------------
4733
4734
4735 </para>
4736
4737 </listitem></varlistentry>
4738 <varlistentry><term><emphasis>uudecode
4739
4740 </emphasis></term>
4741 <listitem><para></para>
4742
4743 <para>
4744 Usage: uudecode [OPTION] [FILE]
4745
4746
4747 </para>
4748
4749 <para>
4750 Uudecode a uuencoded file
4751
4752
4753 </para>
4754
4755 <para>
4756 Options:
4757
4758
4759 </para>
4760
4761 <para>
4762 <screen>
4763         -o FILE  direct output to FILE
4764 </screen>
4765
4766
4767 </para>
4768
4769 <para>
4770 Example:
4771
4772
4773 </para>
4774
4775 <para>
4776 <screen>
4777         $ uudecode -o busybox busybox.uu
4778         $ ls -l busybox
4779         -rwxr-xr-x   1 ams      ams        245264 Jun  7 21:35 busybox
4780 </screen>
4781
4782
4783 </para>
4784
4785 <para>
4786 -------------------------------
4787
4788
4789 </para>
4790
4791 </listitem></varlistentry>
4792 <varlistentry><term><emphasis>umount
4793
4794 </emphasis></term>
4795 <listitem><para></para>
4796
4797 <para>
4798 Usage: umount [flags] filesystem|directory
4799
4800
4801 </para>
4802
4803 <para>
4804 Flags:
4805
4806
4807 </para>
4808
4809 <para>
4810 <screen>
4811                 -a:     Unmount all file systems
4812                 -r:     Try to remount devices as read-only if mount is busy
4813                 -f:     Force filesystem umount (i.e. unreachable NFS server)
4814                 -l:     Do not free loop device (if a loop device has been used)
4815 </screen>
4816
4817
4818 </para>
4819
4820 <para>
4821 Example:
4822
4823
4824 </para>
4825
4826 <para>
4827 <screen>
4828         $ umount /dev/hdc1 
4829 </screen>
4830
4831
4832 </para>
4833
4834 <para>
4835 -------------------------------
4836
4837
4838 </para>
4839
4840 </listitem></varlistentry>
4841 <varlistentry><term><emphasis>uname
4842
4843 </emphasis></term>
4844 <listitem><para></para>
4845
4846 <para>
4847 Usage: uname [OPTION]...
4848
4849
4850 </para>
4851
4852 <para>
4853 Print certain system information. With no OPTION, same as <emphasis>-s</emphasis>.
4854
4855
4856 </para>
4857
4858 <para>
4859 Options:
4860
4861
4862 </para>
4863
4864 <para>
4865 <screen>
4866         -a      print all information
4867         -m      the machine (hardware) type
4868         -n      print the machine's network node hostname
4869         -r      print the operating system release
4870         -s      print the operating system name
4871         -p      print the host processor type
4872         -v      print the operating system version
4873 </screen>
4874
4875
4876 </para>
4877
4878 <para>
4879 Example:
4880
4881
4882 </para>
4883
4884 <para>
4885 <screen>
4886         $ uname -a
4887         Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
4888 </screen>
4889
4890
4891 </para>
4892
4893 <para>
4894 -------------------------------
4895
4896
4897 </para>
4898
4899 </listitem></varlistentry>
4900 <varlistentry><term><emphasis>uniq
4901
4902 </emphasis></term>
4903 <listitem><para></para>
4904
4905 <para>
4906 Usage: uniq [OPTION]... [INPUT [OUTPUT]]
4907
4908
4909 </para>
4910
4911 <para>
4912 Discard all but one of successive identical lines from INPUT (or standard
4913 input), writing to OUTPUT (or standard output).
4914
4915
4916 </para>
4917
4918 <para>
4919 Example:
4920
4921
4922 </para>
4923
4924 <para>
4925 <screen>
4926         $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
4927         a
4928         b
4929         c
4930 </screen>
4931
4932
4933 </para>
4934
4935 <para>
4936 -------------------------------
4937
4938
4939 </para>
4940
4941 </listitem></varlistentry>
4942 <varlistentry><term><emphasis>update
4943
4944 </emphasis></term>
4945 <listitem><para></para>
4946
4947 <para>
4948 Usage: update [options]
4949
4950
4951 </para>
4952
4953 <para>
4954 Periodically flushes filesystem buffers.
4955
4956
4957 </para>
4958
4959 <para>
4960 Options:
4961
4962
4963 </para>
4964
4965 <para>
4966 <screen>
4967         -S      force use of sync(2) instead of flushing
4968         -s SECS call sync this often (default 30)
4969         -f SECS flush some buffers this often (default 5)
4970 </screen>
4971
4972
4973 </para>
4974
4975 <para>
4976 -------------------------------
4977
4978
4979 </para>
4980
4981 </listitem></varlistentry>
4982 <varlistentry><term><emphasis>uptime
4983
4984 </emphasis></term>
4985 <listitem><para></para>
4986
4987 <para>
4988 Usage: uptime
4989
4990
4991 </para>
4992
4993 <para>
4994 Tells how long the system has been running since boot.
4995
4996
4997 </para>
4998
4999 <para>
5000 Example:
5001
5002
5003 </para>
5004
5005 <para>
5006 <screen>
5007         $ uptime
5008           1:55pm  up  2:30, load average: 0.09, 0.04, 0.00
5009 </screen>
5010
5011
5012 </para>
5013
5014 <para>
5015 -------------------------------
5016
5017
5018 </para>
5019
5020 </listitem></varlistentry>
5021 <varlistentry><term><emphasis>usleep
5022
5023 </emphasis></term>
5024 <listitem><para></para>
5025
5026 <para>
5027 Usage: usleep N
5028
5029
5030 </para>
5031
5032 <para>
5033 Pauses for N microseconds.
5034
5035
5036 </para>
5037
5038 <para>
5039 Example:
5040
5041
5042 </para>
5043
5044 <para>
5045 <screen>
5046         $ usleep 1000000
5047         [pauses for 1 second]
5048 </screen>
5049
5050
5051 </para>
5052
5053 <para>
5054 -------------------------------
5055
5056
5057 </para>
5058
5059 </listitem></varlistentry>
5060 <varlistentry><term><emphasis>wc
5061
5062 </emphasis></term>
5063 <listitem><para></para>
5064
5065 <para>
5066 Usage: wc [OPTION]... [FILE]...
5067
5068
5069 </para>
5070
5071 <para>
5072 Print line, word, and byte counts for each FILE, and a total line if more
5073 than one FILE is specified. With no FILE, read standard input.
5074
5075
5076 </para>
5077
5078 <para>
5079 Options:
5080
5081
5082 </para>
5083
5084 <para>
5085 <screen>
5086         -c      print the byte counts
5087         -l      print the newline counts
5088         -L      print the length of the longest line
5089         -w      print the word counts
5090 </screen>
5091
5092
5093 </para>
5094
5095 <para>
5096 Example:
5097
5098
5099 </para>
5100
5101 <para>
5102 <screen>
5103         $ wc /etc/passwd
5104              31      46    1365 /etc/passwd
5105 </screen>
5106
5107
5108 </para>
5109
5110 <para>
5111 -------------------------------
5112
5113
5114 </para>
5115
5116 </listitem></varlistentry>
5117 <varlistentry><term><emphasis>which
5118
5119 </emphasis></term>
5120 <listitem><para></para>
5121
5122 <para>
5123 Usage: which [COMMAND ...]
5124
5125
5126 </para>
5127
5128 <para>
5129 Locates a COMMAND.
5130
5131
5132 </para>
5133
5134 <para>
5135 Example:
5136
5137
5138 </para>
5139
5140 <para>
5141 <screen>
5142         $ which login
5143         /bin/login
5144 </screen>
5145
5146
5147 </para>
5148
5149 <para>
5150 -------------------------------
5151
5152
5153 </para>
5154
5155 </listitem></varlistentry>
5156 <varlistentry><term><emphasis>whoami
5157
5158 </emphasis></term>
5159 <listitem><para></para>
5160
5161 <para>
5162 Usage: whoami
5163
5164
5165 </para>
5166
5167 <para>
5168 Prints the user name associated with the current effective user id.
5169
5170
5171 </para>
5172
5173 <para>
5174 Example:
5175
5176
5177 </para>
5178
5179 <para>
5180 <screen>
5181         $ whoami
5182         andersen
5183 </screen>
5184
5185
5186 </para>
5187
5188 <para>
5189 -------------------------------
5190
5191
5192 </para>
5193
5194 </listitem></varlistentry>
5195 <varlistentry><term><emphasis>yes
5196
5197 </emphasis></term>
5198 <listitem><para></para>
5199
5200 <para>
5201 Usage: yes [OPTION]... [STRING]...
5202
5203
5204 </para>
5205
5206 <para>
5207 Repeatedly outputs a line with all specified <literal>STRING(s),</literal>
5208 or `y'.
5209
5210
5211 </para>
5212
5213 <para>
5214 -------------------------------
5215
5216
5217 </para>
5218
5219 </listitem></varlistentry>
5220 <varlistentry><term><emphasis>zcat
5221
5222 </emphasis></term>
5223 <listitem><para></para>
5224
5225 <para>
5226 This is essentially an alias for invoking ``gunzip <emphasis>-c</emphasis>'', where it decompresses the file in question and send the output to
5227 stdout. 
5228
5229
5230 </para>
5231
5232 <para>
5233 -------------------------------
5234
5235
5236 </para>
5237
5238 </listitem></varlistentry></variablelist>
5239
5240 </sect1>
5241
5242 <sect1 id="pod2docbook-ch-1-sect-6"><title>LIBC NSS
5243
5244 </title>
5245 <!-- Bogus hack to ensure that each sect has a paragraph in it -->
5246 <para>
5247 </para>
5248
5249
5250 <para>
5251 GNU Libc uses the Name Service Switch (NSS) to configure the behavior of
5252 the C library for the local environment, and to configure how it reads
5253 system data, such as passwords and group information. BusyBox has made it
5254 Policy that it will never use NSS, and will never use and libc calls that
5255 make use of NSS. This allows you to run an embedded system without the need
5256 for installing an /etc/nsswitch.conf file and without and /lib/libnss_*
5257 libraries installed.
5258
5259
5260 </para>
5261
5262 <para>
5263 If you are using a system that is using a remote LDAP server for
5264 authentication via GNU libc NSS, and you want to use BusyBox, then you will
5265 need to adjust the BusyBox source. Chances are though, that if you have
5266 enough space to install of that stuff on your system, then you probably
5267 want the full GNU utilities.
5268
5269
5270 </para>
5271
5272 </sect1>
5273
5274 <sect1 id="pod2docbook-ch-1-sect-7"><title>SEE ALSO
5275
5276 </title>
5277 <!-- Bogus hack to ensure that each sect has a paragraph in it -->
5278 <para>
5279 </para>
5280
5281
5282 <para>
5283 <literal>textutils(1),</literal> <literal>shellutils(1),</literal> etc...
5284
5285
5286 </para>
5287
5288 </sect1>
5289
5290 <sect1 id="pod2docbook-ch-1-sect-8"><title>MAINTAINER
5291
5292 </title>
5293 <!-- Bogus hack to ensure that each sect has a paragraph in it -->
5294 <para>
5295 </para>
5296
5297
5298 <para>
5299 Erik Andersen &lt;andersee@debian.org&gt; &lt;andersen@lineo.com&gt;
5300
5301
5302 </para>
5303
5304 </sect1>
5305
5306 <sect1 id="pod2docbook-ch-1-sect-9"><title>AUTHORS
5307
5308 </title>
5309 <!-- Bogus hack to ensure that each sect has a paragraph in it -->
5310 <para>
5311 </para>
5312
5313
5314 <para>
5315 The following people have contributed code to BusyBox whether they know it
5316 or not.
5317
5318
5319 </para>
5320
5321 <para>
5322 Erik Andersen &lt;andersee@debian.org&gt;
5323
5324
5325 </para>
5326
5327 <para>
5328 John Beppu &lt;beppu@lineo.com&gt;
5329
5330
5331 </para>
5332
5333 <para>
5334 Brian Candler &lt;B.Candler@pobox.com&gt;
5335
5336
5337 </para>
5338
5339 <para>
5340 Randolph Chung &lt;tausq@debian.org&gt;
5341
5342
5343 </para>
5344
5345 <para>
5346 Dave Cinege &lt;dcinege@psychosis.com&gt;       
5347
5348
5349 </para>
5350
5351 <para>
5352 Karl M. Hegbloom &lt;karlheg@debian.org&gt;
5353
5354
5355 </para>
5356
5357 <para>
5358 John Lombardo &lt;john@deltanet.com&gt; 
5359
5360
5361 </para>
5362
5363 <para>
5364 Glenn McGrath &lt;bug1@netconnect.com.au&gt;
5365
5366
5367 </para>
5368
5369 <para>
5370 Bruce Perens &lt;bruce@perens.com&gt;
5371
5372
5373 </para>
5374
5375 <para>
5376 Pavel Roskin &lt;proski@gnu.org&gt;
5377
5378
5379 </para>
5380
5381 <para>
5382 Linus Torvalds &lt;torvalds@transmeta.com&gt;
5383
5384
5385 </para>
5386
5387 <para>
5388 Charles P. Wright &lt;cpwright@villagenet.com&gt;
5389
5390
5391 </para>
5392
5393 <para>
5394 Enrique Zanardi &lt;ezanardi@ull.es&gt;
5395
5396
5397 </para>
5398
5399 </sect1>
5400
5401 </chapter>
5402
5403
5404 </book>    <!-- End of the book -->