1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [ ]>
2<book id="BusyBoxDocumentation">
3 <bookinfo>
4  <title>BusyBox - The Swiss Army Knife of Embedded Linux</title>
5  
6  <legalnotice>
7   <para>
8     This documentation is free software; you can redistribute
9     it and/or modify it under the terms of the GNU General Public
10     License as published by the Free Software Foundation; either
11     version 2 of the License, or (at your option) any later
12     version.
13   </para>
14      
15   <para>
16     This program is distributed in the hope that it will be
17     useful, but WITHOUT ANY WARRANTY; without even the implied
18     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19     See the GNU General Public License for more details.
20   </para>
21      
22   <para>
23     You should have received a copy of the GNU General Public
24     License along with this program; if not, write to the Free
25     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26     MA 02111-1307 USA
27   </para>
28      
29   <para>
30     For more details see the file COPYING in the source
31     distribution of Linux.
32   </para>
33  </legalnotice>
34 </bookinfo>
35
36<toc></toc>
37  <chapter id="Introduction">
38     <title>Introduction</title>
39
40	<para>
41	BusyBox combines tiny versions of many common UNIX utilities into a single
42	small executable. It provides minimalist replacements for most of the
43	utilities you usually find in fileutils, shellutils, findutils, textutils,
44	grep, gzip, tar, etc. BusyBox provides a fairly complete POSIX environment
45	for any small or embedded system. The utilities in BusyBox generally have
46	fewer options than their full-featured GNU cousins; however, the options
47	that are included provide the expected functionality and behave very much
48	like their GNU counterparts. 
49	</para>
50
51	<para>
52	BusyBox has been written with size-optimization and limited resources in
53	mind. It is also extremely modular so you can easily include or exclude
54	commands (or features) at compile time. This makes it easy to customize
55	your embedded systems. To create a working system, just add a kernel, a
56	shell (such as ash), and an editor (such as elvis-tiny or ae).
57	</para>
58  </chapter>
59
60  <chapter id="Syntax">
61     <title>How to use BusyBox</title>
62	<sect1 id="How-to-use-BusyBox">
63	    <title>Syntax</title>
64
65	    <para>
66	    <screen>
67	     BusyBox &lt;function&gt; [arguments...]  # or
68	    </screen>
69	    </para>
70
71	    <para>
72	    <screen>
73	     &lt;function&gt; [arguments...]          # if symlinked
74	    </screen>
75	    </para>
76	</sect1>
77
78	<sect1 id="Invoking-BusyBox">
79	    <title>Invoking BusyBox</title>
80
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	    <title>Common options</title>
122
123	    <para>
124	    Most BusyBox commands support the <emphasis>--help</emphasis> option to provide 
125	    a terse runtime description of their behavior. 
126	    </para>
127	</sect1>
128  </chapter>
129
130  <chapter id="Commands">
131     <title>BusyBox Commands</title>
132	<sect1 id="Available-BusyBox-Commands">
133	    <title>Available BusyBox Commands</title>
134		<para>
135		Currently defined functions include:
136		</para>
137
138		<para>
139		ar, basename, cat, chgrp, chmod, chown, chroot, chvt, clear,
140		cp, cut, date, dc, dd, deallocvt, df, dirname, dmesg, dpkg-deb,
141		du, dumpkmap, dutmp, echo, false, fbset, fdflush, find, free,
142		freeramdisk, fsck.minix, grep, gunzip, gzip, halt, head,
143		hostid, hostname, id, init, insmod, kill, killall, length, ln,
144		loadacm, loadfont, loadkmap, logger, logname, ls, lsmod,
145		makedevs, mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp,
146		more, mount, mt, mv, nc, nslookup, ping, poweroff, printf, ps,
147		pwd, reboot, renice, reset, rm, rmdir, rmmod, sed, setkeycodes, sh, sleep,
148		sort, swapoff, swapon, sync, syslogd, tail, tar, tee, telnet,
149		test, touch, tr, true, tty, umount, uname, uniq, update,
150		uptime, usleep, uudecode, uuencode, wc, which, whoami, yes,
151		zcat, [
152		</para>
153	</sect1>
154
155	<sect1 id="ar">
156	    <title>ar</title>
157
158		<para>
159		Usage: ar [OPTION] archive [FILENAME]...
160		</para>
161
162		<para>
163		Extract or list files from an ar archive.
164		</para>
165
166		<para>
167		Options:
168		</para>
169
170		<para>
171		<screen>
172			o	Preserve original dates
173			p	Extract to stdout
174			t	List
175			x	Extract
176			v	Verbosely list files processed
177		</screen>
178		</para>
179	</sect1>
180
181	<sect1 id="basename">
182	    <title>basename</title>
183		<para>
184		Usage: basename FILE [SUFFIX]
185		</para>
186
187		<para>
188		Strip directory path and suffixes from FILE. If specified, also removes
189		any trailing SUFFIX.
190		</para>
191
192		<para>
193		Example:
194		</para>
195
196		<para>
197		<screen>
198			$ basename /usr/local/bin/foo
199			foo
200			$ basename /usr/local/bin/
201			bin
202			$ basename /foo/bar.txt .txt
203			bar
204		</screen>
205		</para>
206	</sect1>
207
208	<sect1 id="cat">
209	    <title>cat</title>
210
211		<para>
212		Usage: cat [FILE]...
213		</para>
214
215		<para>
216		Concatenate <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	</sect1>
231
232	<sect1 id="chgrp">
233	    <title>chgrp</title>
234
235		<para>
236		Usage: chgrp [OPTION]... GROUP FILE...
237		</para>
238
239		<para>
240		Change the group membership of each FILE to GROUP.
241		</para>
242
243		<para>
244		Options:
245		</para>
246
247		<para>
248		<screen>
249			-R      Change files and directories recursively
250		</screen>
251		</para>
252
253		<para>
254		Example:
255		</para>
256
257		<para>
258		<screen>
259			$ ls -l /tmp/foo
260			-r--r--r--    1 andersen andersen        0 Apr 12 18:25 /tmp/foo
261			$ chgrp root /tmp/foo
262			$ ls -l /tmp/foo
263			-r--r--r--    1 andersen root            0 Apr 12 18:25 /tmp/foo
264		</screen>
265		</para>
266	</sect1>
267
268	<sect1 id="chmod">
269	    <title>chmod</title>
270
271		<para>
272		Usage: chmod [<emphasis>-R</emphasis>] MODE[,MODE]... FILE...
273		</para>
274
275		<para>
276		Change file access permissions for the specified
277		<literal>FILE(s)</literal> (or directories). Each MODE is defined by
278		combining the letters for WHO has access to the file, an OPERATOR for
279		selecting how the permissions should be changed, and a PERMISSION for
280		<literal>FILE(s)</literal> (or directories).
281		</para>
282
283		<para>
284		WHO may be chosen from
285		</para>
286
287		<para>
288		<screen>
289			u       User who owns the file
290			g       Users in the file's Group
291			o       Other users not in the file's group
292			a       All users
293		</screen>
294		</para>
295
296		<para>
297		OPERATOR may be chosen from
298		</para>
299
300		<para>
301		<screen>
302			+       Add a permission
303			-       Remove a permission
304			=       Assign a permission
305		</screen>
306		</para>
307
308		<para>
309		PERMISSION may be chosen from
310		</para>
311
312		<para>
313		<screen>
314			r       Read
315			w       Write
316			x       Execute (or access for directories)
317			s       Set user (or group) ID bit
318			t       Sticky bit (for directories prevents removing files by non-owners)
319		</screen>
320		</para>
321
322		<para>
323		Alternately, permissions can be set numerically where the first three
324		numbers are calculated by adding the octal values, such as
325		</para>
326
327		<para>
328		<screen>
329			4       Read
330			2       Write
331			1       Execute
332		</screen>
333		</para>
334
335		<para>
336		An optional fourth digit can also be used to specify
337		</para>
338
339		<para>
340		<screen>
341			4       Set user ID
342			2       Set group ID
343			1       Sticky bit
344		</screen>
345		</para>
346
347		<para>
348		Options:
349		</para>
350
351		<para>
352		<screen>
353			-R      Change files and directories recursively.
354		</screen>
355		</para>
356
357		<para>
358		Example:
359		</para>
360
361		<para>
362		<screen>
363			$ ls -l /tmp/foo
364			-rw-rw-r--    1 root     root            0 Apr 12 18:25 /tmp/foo
365			$ chmod u+x /tmp/foo
366			$ ls -l /tmp/foo
367			-rwxrw-r--    1 root     root            0 Apr 12 18:25 /tmp/foo*
368			$ chmod 444 /tmp/foo
369			$ ls -l /tmp/foo
370			-r--r--r--    1 root     root            0 Apr 12 18:25 /tmp/foo
371		</screen>
372		</para>
373	</sect1>
374	
375	<sect1 id="chown">
376	    <title>chown</title>
377		<para>
378		Usage: chown [OPTION]... OWNER[&lt;.|:&gt;[GROUP] FILE...
379		</para>
380
381		<para>
382		Change the owner and/or group of each FILE to OWNER and/or GROUP.
383		</para>
384
385		<para>
386		Options:
387		</para>
388
389		<para>
390		<screen>
391			-R      Change files and directories recursively
392		</screen>
393		</para>
394
395		<para>
396		Example:
397		</para>
398
399		<para>
400		<screen>
401			$ ls -l /tmp/foo
402			-r--r--r--    1 andersen andersen        0 Apr 12 18:25 /tmp/foo
403			$ chown root /tmp/foo
404			$ ls -l /tmp/foo
405			-r--r--r--    1 root     andersen        0 Apr 12 18:25 /tmp/foo
406			$ chown root.root /tmp/foo
407			ls -l /tmp/foo
408			-r--r--r--    1 root     root            0 Apr 12 18:25 /tmp/foo
409		</screen>
410		</para>
411	</sect1>
412
413	<sect1 id="chroot">
414	    <title>chroot</title>
415		<para>
416		Usage: chroot NEWROOT [COMMAND...]
417		</para>
418
419		<para>
420		Run COMMAND with root directory set to NEWROOT.
421		</para>
422
423		<para>
424		Example:
425		</para>
426
427		<para>
428		<screen>
429			$ ls -l /bin/ls
430			lrwxrwxrwx    1 root     root          12 Apr 13 00:46 /bin/ls -&gt; /BusyBox
431			$ mount /dev/hdc1 /mnt -t minix
432			$ chroot /mnt
433			$ ls -l /bin/ls
434			-rwxr-xr-x    1 root     root        40816 Feb  5 07:45 /bin/ls*
435		</screen>
436		</para>
437	</sect1>
438
439	<sect1 id="chvt">
440	    <title>chvt</title>
441		<para>
442		Usage: chvt N
443		</para>
444
445		<para>
446		Change the foreground virtual terminal to /dev/ttyN
447		</para>
448	</sect1>
449
450	<sect1 id="clear">
451	    <title>clear</title>
452
453		<para>
454		Usage: clear
455		</para>
456
457		<para>
458		Clear the screen.
459		</para>
460	</sect1>
461
462	<sect1 id="cp">
463	    <title>cp</title>
464
465		<para>
466		Usage: cp [OPTION]... SOURCE DEST
467		</para>
468
469		<para>
470		<screen>
471		   or: cp [OPTION]... SOURCE... DIRECTORY
472		</screen>
473		</para>
474
475		<para>
476		Copy SOURCE to DEST, or multiple <literal>SOURCE(s)</literal> to
477		DIRECTORY.
478		</para>
479
480		<para>
481		Options:
482		</para>
483
484		<para>
485		<screen>
486			-a      Same as -dpR
487			-d      Preserve links
488			-p      Preserve file attributes if possible
489			-R      Copy directories recursively
490		</screen>
491		</para>
492	</sect1>
493
494	<sect1 id="cut">
495	    <title>cut</title>
496
497		<para>
498		Usage: cut [OPTION]... [FILE]...
499		</para>
500
501		<para>
502		Print selected fields from each input FILE to standard output.
503		</para>
504
505		<para>
506		Options:
507		</para>
508
509		<para>
510		<screen>
511				-b LIST Output only bytes from LIST
512				-c LIST Output only characters from LIST
513				-d CHAR Use CHAR instead of tab as the field delimiter
514				-s      Output only the lines containing delimiter
515				-f N    Print only these fields
516				-n      Ignored
517		</screen>
518		</para>
519
520		<para>
521		Example:
522		</para>
523
524		<para>
525		<screen>
526			$ echo "Hello world" | cut -f 1 -d ' '
527			Hello
528			$ echo "Hello world" | cut -f 2 -d ' '
529			world
530		</screen>
531		</para>
532	</sect1>
533
534	<sect1 id="date">
535	    <title>date</title>
536
537		<para>
538		Usage: date [OPTION]... [+FORMAT]
539		</para>
540
541		<para>
542		<screen>
543		  or:  date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
544		</screen>
545		</para>
546
547		<para>
548		Display the current time in the given FORMAT, or set the system date.
549		</para>
550
551		<para>
552		Options:
553		</para>
554
555		<para>
556		<screen>
557			-R      Output RFC-822 compliant date string
558			-s      Set time described by STRING
559			-u      Print or set Coordinated Universal Time
560		</screen>
561		</para>
562
563		<para>
564		Example:
565		</para>
566
567		<para>
568		<screen>
569			$ date
570			Wed Apr 12 18:52:41 MDT 2000
571		</screen>
572		</para>
573	</sect1>
574
575	<sect1 id="dc">
576	    <title>dc</title>
577
578		<para>
579		Usage: dc [EXPRESSION]
580		</para>
581
582		<para>
583		This is a Tiny RPN calculator that understands the
584		following operations: +, -, /, *, and, or, not, eor. If
585		no arguments are given, dc will process input from
586		stdin.
587		</para>
588
589		<para>
590		The behaviour of BusyBox/dc deviates (just a little ;-)
591		from GNU/dc, but this will be remedied in the future.
592		</para>
593
594		<para>
595		Example:
596		</para>
597
598		<para>
599		<screen>
600			$ dc 2 2 +
601			4
602			$ dc 8 8 \* 2 2 + /
603			16
604			$ dc 0 1 and
605			0
606			$ dc 0 1 or
607			1
608			$ echo 72 9 div 8 mul | dc
609			64
610		</screen>
611		</para>
612	</sect1>
613
614	<sect1 id="dd">
615	    <title>dd</title>
616
617		<para>
618		Usage: dd [OPTION]...
619		</para>
620
621		<para>
622		Copy a file, converting and formatting according to
623		options.
624		</para>
625
626		<para>
627		Options:
628		</para>
629
630		<para>
631		<screen>
632			if=FILE Read from FILE instead of stdin
633			of=FILE Write to FILE instead of stdout
634			bs=N    Read and write N bytes at a time
635			count=N Copy only N input blocks
636			skip=N  Skip N input blocks
637			seek=N  Skip N output blocks
638		</screen>
639		</para>
640
641		<para>
642		Numbers may be suffixed by w (x2), k (x1024), b (x512),
643		or M (x1024^2).
644		</para>
645
646		<para>
647		Example:
648		</para>
649
650		<para>
651		<screen>
652			$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
653			4+0 records in
654			4+0 records out
655		</screen>
656		</para>
657	</sect1>
658
659	<sect1 id="deallocvt">
660	    <title>deallocvt</title>
661
662		<para>
663		Usage: deallocvt N
664		</para>
665
666		<para>
667		Deallocate unused virtual terminal /dev/ttyN.
668		</para>
669	</sect1>
670
671	<sect1 id="df">
672	    <title>df</title>
673
674		<para>
675		Usage: df [FILE]...
676		</para>
677
678		<para>
679		Print the filesystem space used and space available.
680		</para>
681
682		<para>
683		Example:
684		</para>
685
686		<para>
687		<screen>
688			$ df
689			Filesystem           1k-blocks      Used Available Use% Mounted on
690			/dev/sda3              8690864   8553540    137324  98% /
691			/dev/sda1                64216     36364     27852  57% /boot
692			$ df /dev/sda3
693			Filesystem           1k-blocks      Used Available Use% Mounted on
694			/dev/sda3              8690864   8553540    137324  98% /
695		</screen>
696		</para>
697	</sect1>
698	
699	<sect1 id="dirname">
700	    <title>dirname</title>
701
702		<para>
703		Usage: dirname NAME
704		</para>
705
706		<para>
707		Strip non-directory suffix from NAME.
708		</para>
709
710		<para>
711		Example:
712		</para>
713
714		<para>
715		<screen>
716			$ dirname /tmp/foo
717			/tmp
718			$ dirname /tmp/foo/
719			/tmp
720		</screen>
721		</para>
722	</sect1>
723
724	<sect1 id="dmesg">
725	    <title>dmesg</title>
726
727		<para>
728		Usage: dmesg [OPTION]...
729		</para>
730
731		<para>
732		Print or control the kernel ring buffer.
733		</para>
734
735		<para>
736		Options:
737		</para>
738
739		<para>
740		<screen>
741			-c		Clear the ring buffer after printing
742			-n LEVEL	Set the console logging level to LEVEL
743			-s BUFSIZE	Query ring buffer using a buffer of BUFSIZE
744		</screen>
745		</para>
746	</sect1>
747
748	<sect1 id="dos2unix">
749	    <title>dos2unix</title>
750
751		<para>
752		Usage: dos2unix < dosfile > unixfile
753		</para>
754
755		<para>
756		Converts a text file from dos format to unix format.
757		</para>
758
759	</sect1>
760
761	<sect1 id="dpkg-deb">
762	    <title>dpkg-deb</title>
763
764		<para>
765		Usage: dpkg-deb [OPTION] archive [directory] 
766		</para>
767
768		<para>
769		Debian package archive (.deb) manipulation tool	
770		</para>
771
772		<para>
773		Options:
774		</para>
775		
776		<para>
777		<screen>
778			-c	List the contents of the filesystem tree archive portion of the package 
779			-e	Extracts the control information files from a package archive into the specified directory.
780				If  no  directory  is specified then a subdirectory DEBIAN in the current directory is used.
781			-x	Silently extracts the filesystem tree from a package archive into the specified directory.
782			-X	Extracts the filesystem tree from a package archive into the specified directory, listing the files as it goes.	
783			If required the specified directory (but not its parents) will be created.
784		</screen>
785		<para>
786
787		<para>
788		Example:
789		</para>
790
791		<para>
792		<screen>
793			dpkg-deb -e ./busybox_0.48-1_i386.deb
794			dpkg-deb -x ./busybox_0.48-1_i386.deb ./unpack_dir
795		</screen>
796		</para>
797	</sect1>
798
799	<sect1 id="du">
800	    <title>du</title>
801
802		<para>
803		Usage: du [OPTION]... [FILE]...
804		</para>
805
806		<para>
807		Summarize the disk space used for each FILE or current
808		directory.  Disk space printed in units of 1k (i.e.,
809		1024 bytes).
810		</para>
811
812		<para>
813		Options:
814		</para>
815
816		<para>
817		<screen>
818			-l	Count sizes many times if hard linked
819			-s	Display only a total for each argument
820		</screen>
821		</para>
822
823		<para>
824		Example:
825		</para>
826
827		<para>
828		<screen>
829			$ du
830			16	./CVS
831			12	./kernel-patches/CVS
832			80	./kernel-patches
833			12	./tests/CVS
834			36	./tests
835			12	./scripts/CVS
836			16	./scripts
837			12	./docs/CVS
838			104	./docs
839			2417	.
840		</screen>
841		</para>
842	</sect1>
843
844	<sect1 id="dumpkmap">
845	    <title>dumpkmap</title>
846
847		<para>
848		Usage: dumpkmap
849		</para>
850
851		<para>
852		Prints out a binary keyboard translation table to standard output.
853		</para>
854
855		<para>
856		Example:
857		</para>
858
859		<para>
860		<screen>
861			$ dumpkmap &lt; keymap
862		</screen>
863		</para>
864	</sect1>
865
866	<sect1 id="dutmp">
867	    <title>dutmp</title>
868
869		<para>
870		Usage: dutmp [FILE]
871		</para>
872
873		<para>
874		Dump utmp file format (pipe delimited) from FILE or
875		stdin to stdout.
876		</para>
877
878		<para>
879		Example:
880		</para>
881
882		<para>
883		<screen>
884			$ dutmp /var/run/utmp
885			8|7||si|||0|0|0|955637625|760097|0
886			2|0|~|~~|reboot||0|0|0|955637625|782235|0
887			1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
888			8|125||l4|||0|0|0|955637629|998367|0
889			6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
890			6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
891			7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
892		</screen>
893		</para>
894	</sect1>
895
896	<sect1 id="echo">
897	    <title>echo</title>
898
899		<para>
900		Usage: echo [OPTION]... [ARG]...
901		</para>
902
903		<para>
904		Print ARGs to stdout.
905		</para>
906
907		<para>
908		Options:
909		</para>
910
911		<para>
912		<screen>
913			-n	Suppress trailing newline
914			-e	Enable interpretation of escaped characters
915			-E	Disable interpretation of escaped characters
916		</screen>
917		</para>
918
919		<para>
920		Example:
921		</para>
922
923		<para>
924		<screen>
925			$ echo "Erik is cool"
926			Erik is cool
927			$ echo -e "Erik\nis\ncool"
928			Erik
929			is
930			cool
931			$ echo "Erik\nis\ncool"
932			Erik\nis\ncool
933		</screen>
934		</para>
935	</sect1>
936
937	<sect1 id="expr">
938	    <title>expr</title>
939
940		<para>
941		Usage: expr EXPRESSION
942		</para>
943
944		<para>
945		Prints the value of EXPRESSION to standard output.
946		</para>
947
948		<para>
949		EXPRESSION may be:
950		</para>
951
952		<para>
953		<screen>
954			ARG1 |  ARG2    ARG1 if it is neither null nor 0, otherwise ARG2
955			ARG1 &  ARG2    ARG1 if neither argument is null or 0, otherwise 0
956			ARG1 &lt  ARG2    ARG1 is less than ARG2
957			ARG1 &lt= ARG2    ARG1 is less than or equal to ARG2
958			ARG1 =  ARG2    ARG1 is equal to ARG2
959			ARG1 != ARG2    ARG1 is unequal to ARG2
960			ARG1 &gt= ARG2    ARG1 is greater than or equal to ARG2
961			ARG1 &gt  ARG2    ARG1 is greater than ARG2
962			ARG1 +  ARG2    arithmetic sum of ARG1 and ARG2
963			ARG1 -  ARG2    arithmetic difference of ARG1 and ARG2
964			ARG1 *  ARG2    arithmetic product of ARG1 and ARG2
965			ARG1 /  ARG2    arithmetic quotient of ARG1 divided by ARG2
966			ARG1 %  ARG2    arithmetic remainder of ARG1 divided by ARG2
967			STRING : REGEXP             anchored pattern match of REGEXP in STRING
968			match STRING REGEXP         same as STRING : REGEXP
969			substr STRING POS LENGTH    substring of STRING, POS counted from 1
970			index STRING CHARS          index in STRING where any CHARS is found, or 0
971			length STRING               length of STRING
972			quote TOKEN                 interpret TOKEN as a string, even if it is a
973							keyword like `match' or an operator like `/'
974			( EXPRESSION )              value of EXPRESSION
975		</screen>
976		</para>
977
978		<para>
979		Beware that many operators need to be escaped or quoted for shells.
980		Comparisons are arithmetic if both ARGs are numbers, else
981		lexicographical.  Pattern matches return the string matched between
982		\( and \) or null; if \( and \) are not used, they return the number
983		of characters matched or 0.
984		</para>
985
986	</sect1>
987
988
989	<sect1 id="false">
990	    <title>false</title>
991
992		<para>
993		Usage: false
994		</para>
995
996		<para>
997		Return an exit code of FALSE (1).
998		</para>
999
1000		<para>
1001		Example:
1002		</para>
1003
1004		<para>
1005		<screen>
1006			$ false
1007			$ echo $?
1008			1
1009		</screen>
1010		</para>
1011	</sect1>
1012
1013	<sect1 id="fbset">
1014	    <title>fbset</title>
1015
1016		<para>
1017		Usage: fbset [OPTION]... [MODE]
1018		</para>
1019
1020		<para>
1021		Show and modify frame buffer device settings.
1022		</para>
1023
1024		<para>
1025		Options:
1026		</para>
1027
1028		<para>
1029		<screen>
1030			-h						Display option summary
1031			-fb DEVICE					Operate on DEVICE
1032			-db FILE					Use FILE for mode database
1033			-g XRES YRES VXRES VYRES DEPTH			Set all geometry parameters
1034			-t PIXCLOCK LEFT RIGHT UPPER LOWER HSLEN VSLEN	Set all timing parameters
1035			-xres RES					Set visible horizontal resolution
1036			-yres RES					Set visible vertical resolution
1037		</screen>
1038		</para>
1039
1040		<para>
1041		Example:
1042		</para>
1043
1044		<para>
1045		<screen>
1046			$ fbset
1047			mode "1024x768-76"
1048					# D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
1049					geometry 1024 768 1024 768 16
1050					timings 12714 128 32 16 4 128 4
1051					accel false
1052					rgba 5/11,6/5,5/0,0/0
1053			endmode
1054		</screen>
1055		</para>
1056	</sect1>
1057
1058	<sect1 id="fdflush">
1059	    <title>fdflush</title>
1060
1061		<para>
1062		Usage: fdflush DEVICE
1063		</para>
1064
1065		<para>
1066		Force floppy disk drive to detect disk change on DEVICE.
1067		</para>
1068	</sect1>
1069
1070	<sect1 id="find">
1071	    <title>find</title>
1072
1073		<para>
1074		Usage: find [PATH]... [EXPRESSION]
1075		</para>
1076
1077		<para>
1078		Search for files in a directory hierarchy. The default
1079		PATH is the current directory; default EXPRESSION is
1080		'-print'.
1081		</para>
1082
1083		<para>
1084		EXPRESSION may consist of:
1085		</para>
1086
1087		<para>
1088		<screen>
1089			-follow		Dereference symbolic links
1090			-name PATTERN	File name (leading directories removed) matches PATTERN
1091			-type X		Filetype matches X (where X is one of: f,d,l,b,c,...)
1092			-perm PERMS	Permissions match any of (+NNN); all of (-NNN); or exactly (NNN)
1093			-mtime TIME	Modified time is greater than (+N); less than (-N); or exactly (N) days
1094		</screen>
1095		</para>
1096
1097		<para>
1098		Example:
1099		</para>
1100
1101		<para>
1102		<screen>
1103			$ find / -name /etc/passwd
1104			/etc/passwd
1105		</screen>
1106		</para>
1107	</sect1>
1108
1109	<sect1 id="free">
1110	    <title>free</title>
1111
1112		<para>
1113		Usage: free
1114		</para>
1115
1116		<para>
1117		Displays the amount of free and used system memory.
1118		</para>
1119
1120		<para>
1121		Example:
1122		</para>
1123
1124		<para>
1125		<screen>
1126			$ free
1127			total         used         free       shared      buffers
1128			  Mem:       257628       248724         8904        59644        93124
1129			 Swap:       128516         8404       120112
1130			Total:       386144       257128       129016
1131		</screen>
1132		</para>
1133	</sect1>
1134
1135	<sect1 id="freeramdisk">
1136	    <title>freeramdisk</title>
1137
1138		<para>
1139		Usage: freeramdisk DEVICE
1140		</para>
1141
1142		<para>
1143		Free all memory used by the ramdisk DEVICE.
1144		</para>
1145
1146		<para>
1147		Example:
1148		</para>
1149
1150		<para>
1151		<screen>
1152			$ freeramdisk /dev/ram2
1153		</screen>
1154		</para>
1155	</sect1>
1156
1157	<sect1 id="fsck.minix">
1158	    <title>fsck.minix</title>
1159
1160		<para>
1161		Usage: fsck.minix [OPTION]... DEVICE
1162		</para>
1163
1164		<para>
1165		Perform a consistency check on the MINIX filesystem on
1166		DEVICE.
1167		</para>
1168
1169		<para>
1170		Options:
1171		</para>
1172
1173		<para>
1174		<screen>
1175			-l	List all filenames
1176			-r	Perform interactive repairs
1177			-a	Perform automatic repairs
1178			-v	Verbose
1179			-s	Output super-block information
1180			-m	Activate MINIX-like "mode not cleared" warnings
1181			-f	Force file system check.
1182		</screen>
1183		</para>
1184	</sect1>
1185	
1186	<sect1 id="getopt">
1187	    <title>getopt</title>
1188
1189		<para>
1190		Usage: getopt [OPTIONS]...
1191		</para>
1192
1193		<para>
1194		Parse command options
1195		</para>
1196
1197		<para>
1198		<screen>
1199		   -a, --alternative            Allow long options starting with single -\n"
1200		   -l, --longoptions=longopts   Long options to be recognized\n"
1201		   -n, --name=progname          The name under which errors are reported\n"
1202		   -o, --options=optstring      Short options to be recognized\n"
1203		   -q, --quiet                  Disable error reporting by getopt(3)\n"
1204		   -Q, --quiet-output           No normal output\n"
1205		   -s, --shell=shell            Set shell quoting conventions\n"
1206		   -T, --test                   Test for getopt(1) version\n"
1207		   -u, --unqote                 Do not quote the output\n"
1208		</screen>
1209		</para>
1210
1211
1212		<para>
1213		Example:
1214		</para>
1215
1216		<para>
1217		<screen>
1218			$ cat getopt.test
1219			#!/bin/sh
1220			GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
1221				-n 'example.busybox' -- "$@"`
1222			if [ $? != 0 ] ; then  exit 1 ; fi
1223			eval set -- "$GETOPT"
1224			while true ; do
1225			  case $1 in
1226			    -a|--a-long) echo "Option a" ; shift ;;
1227			    -b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;;
1228			    -c|--c-long)
1229			      case "$2" in
1230				"") echo "Option c, no argument"; shift 2 ;;
1231				*)  echo "Option c, argument \`$2'" ; shift 2 ;;
1232			      esac ;;
1233			    --) shift ; break ;;
1234			    *) echo "Internal error!" ; exit 1 ;;
1235			  esac
1236			done
1237		</screen>
1238		</para>
1239	</sect1>
1240
1241	<sect1 id="grep">
1242	    <title>grep</title>
1243
1244		<para>
1245		Usage: grep [OPTIONS]... PATTERN [FILE]...
1246		</para>
1247
1248		<para>
1249		Search for PATTERN in each FILE or stdin.
1250		</para>
1251
1252		<para>
1253		Options:
1254		</para>
1255
1256		<para>
1257		<screen>
1258			-h	Suppress the prefixing filename on output
1259			-i	Ignore case distinctions
1260			-n	Print line number with output lines
1261			-q	Be quiet. Returns 0 if result was found, 1 otherwise
1262			-v	Select non-matching lines
1263		</screen>
1264		</para>
1265
1266		<para>
1267		This version of grep matches full regular expressions.
1268		</para>
1269
1270		<para>
1271		Example:
1272		</para>
1273
1274		<para>
1275		<screen>
1276			$ grep root /etc/passwd
1277			root:x:0:0:root:/root:/bin/bash
1278			$ grep ^[rR]oo. /etc/passwd
1279			root:x:0:0:root:/root:/bin/bash
1280		</screen>
1281		</para>
1282	</sect1>
1283
1284	<sect1 id="gunzip">
1285	    <title>gunzip</title>
1286
1287		<para>
1288		Usage: gunzip [OPTION]... FILE
1289		</para>
1290
1291		<para>
1292		Uncompress FILE (or stdin if FILE is '-').
1293		</para>
1294
1295		<para>
1296		Options:
1297		</para>
1298
1299		<para>
1300		<screen>
1301			-c	Write output to standard output
1302			-t	Test compressed file integrity
1303		</screen>
1304		</para>
1305
1306		<para>
1307		Example:
1308		</para>
1309
1310		<para>
1311		<screen>
1312			$ ls -la /tmp/BusyBox*
1313			-rw-rw-r--    1 andersen andersen   557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
1314			$ gunzip /tmp/BusyBox-0.43.tar.gz
1315			$ ls -la /tmp/BusyBox*
1316			-rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1317		</screen>
1318		</para>
1319	</sect1>
1320
1321	<sect1 id="gzip">
1322	    <title>gzip</title>
1323
1324		<para>
1325		Usage: gzip [OPTION]... FILE
1326		</para>
1327
1328		<para>
1329		Compress FILE (or stdin if FILE is '-') with maximum
1330		compression to FILE.gz (or stdout if FILE is '-').
1331		</para>
1332
1333		<para>
1334		Options:
1335		</para>
1336
1337		<para>
1338		<screen>
1339			-c	Write output to standard output
1340			-d      decompress
1341		</screen>
1342		</para>
1343
1344		<para>
1345		Example:
1346		</para>
1347
1348		<para>
1349		<screen>
1350			$ ls -la /tmp/BusyBox*
1351			-rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1352			$ gzip /tmp/BusyBox-0.43.tar
1353			$ ls -la /tmp/BusyBox*
1354			-rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
1355		</screen>
1356		</para>
1357	</sect1>
1358
1359	<sect1 id="halt">
1360	    <title>halt</title>
1361
1362		<para>
1363		Usage: halt
1364		</para>
1365
1366		<para>
1367		Halt the system.
1368		</para>
1369	</sect1>
1370
1371	<sect1 id="head">
1372	    <title>head</title>
1373
1374		<para>
1375		Usage: head [OPTION] FILE...
1376		</para>
1377
1378		<para>
1379		Print first 10 lines of each FILE to standard output.
1380		With more than one FILE, precede each with a header
1381		giving the file name. With no FILE, or when FILE is -,
1382		read standard input.
1383		</para>
1384
1385		<para>
1386		Options:
1387		</para>
1388
1389		<para>
1390		<screen>
1391			-n NUM	Print first NUM lines instead of first 10
1392		</screen>
1393		</para>
1394
1395		<para>
1396		Example:
1397		</para>
1398
1399		<para>
1400		<screen>
1401			$ head -n 2 /etc/passwd
1402			root:x:0:0:root:/root:/bin/bash
1403			daemon:x:1:1:daemon:/usr/sbin:/bin/sh
1404		</screen>
1405		</para>
1406	</sect1>
1407
1408	<sect1 id="hostid">
1409	    <title>hostid</title>
1410
1411		<para>
1412		Usage: hostid
1413		</para>
1414
1415		<para>
1416		Prints out a unique 32-bit identifier for the current
1417		machine. The 32-bit identifier is intended to be unique
1418		among all UNIX systems in existence. 
1419		</para>
1420	</sect1>
1421
1422	<sect1 id="hostname">
1423	    <title>hostname</title>
1424
1425		<para>
1426		Usage: hostname [OPTION]... [HOSTNAME|-F FILE]
1427		</para>
1428
1429		<para>
1430		Get or set the hostname or DNS domain name. If a
1431		hostname is given (or a file with the -F parameter), the
1432		host name will be set.
1433		</para>
1434
1435		<para>
1436		Options:
1437		</para>
1438
1439		<para>
1440		<screen>
1441			-s		Short
1442			-i		Addresses for the hostname
1443			-d		DNS domain name
1444			-F, --file FILE Use the contents of FILE to specify the hostname
1445		</screen>
1446		</para>
1447
1448		<para>
1449		Example:
1450		</para>
1451
1452		<para>
1453		<screen>
1454			$ hostname
1455			slag
1456		</screen>
1457		</para>
1458	</sect1>
1459
1460	<sect1 id="id">
1461	    <title>id</title>
1462
1463		<para>
1464		Usage: id [OPTION]... [USERNAME]
1465		</para>
1466
1467		<para>
1468		Print information for USERNAME or the current user.
1469		</para>
1470
1471		<para>
1472		Options:
1473		</para>
1474
1475		<para>
1476		<screen>
1477			-g	Print only the group ID
1478			-u	Print only the user ID
1479			-n      print a name instead of a number (with for -ug)
1480			-r	Print the real user ID instead of the effective ID (with -ug)
1481		</screen>
1482		</para>
1483
1484		<para>
1485		Example:
1486		</para>
1487
1488		<para>
1489		<screen>
1490			$ id
1491			uid=1000(andersen) gid=1000(andersen)
1492		</screen>
1493		</para>
1494	</sect1>
1495
1496	<sect1 id="init">
1497	    <title>init</title>
1498
1499		<para>
1500		Usage: init
1501		</para>
1502
1503		<para>
1504		Init is the parent of all processes.
1505		</para>
1506
1507		<para>
1508		This version of init is designed to be run only by the
1509		kernel.
1510		</para>
1511
1512		<para>
1513		BusyBox init doesn't support multiple runlevels. The
1514		runlevels field of the /etc/inittab file is completely
1515		ignored by BusyBox init. If you want runlevels, use
1516		sysvinit.
1517		</para>
1518
1519		<para>
1520		BusyBox init works just fine without an inittab. If no
1521		inittab is found, it has the following default behavior:
1522		</para>
1523
1524		<para>
1525		<screen>
1526			::sysinit:/etc/init.d/rcS
1527			::askfirst:/bin/sh
1528		</screen>
1529		</para>
1530
1531		<para>
1532		If it detects that /dev/console is _not_ a serial
1533		console, it will also run:
1534		</para>
1535
1536		<para>
1537		<screen>
1538			tty2::askfirst:/bin/sh
1539		</screen>
1540		</para>
1541
1542		<para>
1543		If you choose to use an /etc/inittab file, the inittab
1544		entry format is as follows:
1545		</para>
1546
1547		<para>
1548		<screen>
1549			&lt;id&gt;:&lt;runlevels&gt;:&lt;action&gt;:&lt;process&gt;
1550		</screen>
1551		</para>
1552
1553		<sect2>
1554		    <title>id</title>
1555			<para>
1556
1557			WARNING: This field has a non-traditional meaning for BusyBox init!
1558			The id field is used by BusyBox init to specify the controlling tty
1559			for the specified process to run on.  The contents of this field
1560			are appended to "/dev/" and used as-is.  There is no need for this
1561			field to be unique, although if it isn't you may have strange
1562			results.  If this field is left blank, the controlling tty is set
1563			to the console.  Also note that if BusyBox detects that a serial
1564			console is in use, then only entries whose controlling tty is
1565			either the serial console or /dev/null will be run.  BusyBox init
1566			does nothing with utmp.  We don't need no stinkin' utmp.
1567
1568			</para>
1569		</sect2>
1570
1571		<sect2>
1572		    <title>runlevels</title>
1573
1574			<para>
1575                	The runlevels field is completely ignored.
1576			</para>
1577		</sect2>
1578
1579		<sect2>
1580		    <title>action</title>
1581
1582
1583			<para>
1584			Valid actions include: sysinit, respawn, askfirst, wait, 
1585			once, and ctrlaltdel.
1586			</para>
1587
1588
1589			<para>
1590			The available actions can be classified into two groups: actions
1591			that are run only once, and actions that are re-run when the specified
1592			process exits.
1593			</para>
1594
1595			<para>
1596			Run only-once actions:
1597			</para>
1598
1599			<para>
1600			'sysinit' is the first item run on boot.  init waits until all
1601			sysinit actions are completed before continuing.  Following the
1602			completion of all sysinit actions, all 'wait' actions are run.
1603			'wait' actions, like  'sysinit' actions, cause init to wait until
1604			the specified task completes.  'once' actions are asyncronous,
1605			therefore, init does not wait for them to complete.  'ctrlaltdel'
1606			actions are run immediately before init causes the system to reboot
1607			(unmounting filesystems with a 'ctrlaltdel' action is a very good
1608			 idea).
1609			</para>
1610
1611			<para>
1612			Run repeatedly actions:
1613			</para>
1614
1615			<para>
1616			'respawn' actions are run after the 'once' actions.  When a process
1617			started with a 'respawn' action exits, init automatically restarts
1618			it.  Unlike sysvinit, BusyBox init does not stop processes from
1619			respawning out of control.  The 'askfirst' actions acts just like
1620			respawn, except that before running the specified process it
1621			displays the line "Please press Enter to activate this console."
1622			and then waits for the user to press enter before starting the
1623			specified process.  
1624			</para>
1625
1626			<para>
1627			Unrecognized actions (like initdefault) will cause init to emit an
1628			error message, and then go along with its business.  All actions are
1629			run in the reverse order from how they appear in /etc/inittab.
1630			</para>
1631
1632		</sect2>
1633
1634		<sect2>
1635		    <title>process</title>
1636
1637			<para>
1638                	Specifies the process to be executed and its
1639			command line.
1640			</para>
1641		</sect2>
1642
1643		<sect2>
1644		    <title>Example /etc/inittab file</title>
1645
1646		    <para>
1647		    <screen>
1648			    # This is run first except when booting in single-user mode.
1649			    #
1650			    ::sysinit:/etc/init.d/rcS
1651
1652			    # /bin/sh invocations on selected ttys
1653			    #
1654			    # Start an "askfirst" shell on the console (whatever that may be)
1655			    ::askfirst:-/bin/sh
1656			    # Start an "askfirst" shell on /dev/tty2-4
1657			    tty2::askfirst:-/bin/sh
1658			    tty2::askfirst:-/bin/sh
1659			    tty2::askfirst:-/bin/sh
1660
1661			    # /sbin/getty invocations for selected ttys
1662			    #
1663			    tty4::respawn:/sbin/getty 38400 tty5
1664			    tty5::respawn:/sbin/getty 38400 tty6
1665
1666			    # Example of how to put a getty on a serial line (for a terminal)
1667			    #
1668			    #::respawn:/sbin/getty -L ttyS0 9600 vt100
1669			    #::respawn:/sbin/getty -L ttyS1 9600 vt100
1670			    #
1671			    # Example how to put a getty on a modem line.
1672			    #::respawn:/sbin/getty 57600 ttyS2
1673
1674			    # Stuff to do before rebooting
1675			    ::ctrlaltdel:/bin/umount -a -r
1676			    ::ctrlaltdel:/sbin/swapoff
1677		    </screen>
1678		    </para>
1679		</sect2>
1680	</sect1>
1681
1682	<sect1 id="insmod">
1683	    <title>insmod</title>
1684
1685		<para>
1686		Usage: insmod [OPTION]... MODULE [symbol=value]...
1687		</para>
1688
1689		<para>
1690		Load MODULE into the kernel.
1691		</para>
1692
1693		<para>
1694		Options:
1695		</para>
1696
1697		<para>
1698		<screen>
1699			-f	Force module to load into the wrong kernel version.
1700			-k	Make module autoclean-able.
1701			-v	Verbose output
1702			-x	Do not export externs
1703			-L	Prevent simultaneous loads of the same module
1704		</screen>
1705		</para>
1706	</sect1>
1707
1708	<sect1 id="kill">
1709	    <title>kill</title>
1710
1711		<para>
1712		Usage: kill [OPTION] PID...
1713		</para>
1714
1715		<para>
1716		Send a signal (default is SIGTERM) to the specified
1717		PID(s).
1718		</para>
1719
1720		<para>
1721		Options:
1722		</para>
1723
1724		<para>
1725		<screen>
1726			-l	List all signal names and numbers
1727			-SIG	Send signal SIG
1728		</screen>
1729		</para>
1730
1731		<para>
1732		Example:
1733		</para>
1734
1735		<para>
1736		<screen>
1737			$ ps | grep apache
1738			252 root     root     S [apache]
1739			263 www-data www-data S [apache]
1740			264 www-data www-data S [apache]
1741			265 www-data www-data S [apache]
1742			266 www-data www-data S [apache]
1743			267 www-data www-data S [apache]
1744			$ kill 252
1745		</screen>
1746		</para>
1747	</sect1>
1748
1749	<sect1 id="killall">
1750	    <title>killall</title>
1751
1752		<para>
1753		Usage: killall [OPTION] NAME...
1754		</para>
1755
1756		<para>
1757		Send a signal (default is SIGTERM) to the specified
1758		NAME(s).
1759		</para>
1760
1761		<para>
1762		Options:
1763		</para>
1764
1765		<para>
1766		<screen>
1767			-l	List all signal names and numbers
1768			-SIG	Send signal SIG
1769		</screen>
1770		</para>
1771
1772		<para>
1773		Example:
1774		</para>
1775
1776		<para>
1777		<screen>
1778			$ killall apache
1779		</screen>
1780		</para>
1781	</sect1>
1782
1783	<sect1 id="length">
1784	    <title>length</title>
1785
1786		<para>
1787		Usage: length STRING
1788		</para>
1789
1790		<para>
1791		Print the length of STRING.
1792		</para>
1793
1794		<para>
1795		Example:
1796		</para>
1797
1798		<para>
1799		<screen>
1800			$ length "Hello"
1801			5
1802		</screen>
1803		</para>
1804	</sect1>
1805
1806	<sect1 id="ln">
1807	    <title>ln</title>
1808
1809		<para>
1810		Usage: ln [OPTION]... TARGET FILE|DIRECTORY
1811		</para>
1812
1813		<para>
1814		Create a link named FILE or DIRECTORY to the specified
1815		TARGET.  You may use '--' to indicate that all following
1816		arguments are non-options.
1817		</para>
1818
1819		<para>
1820		Options:
1821		</para>
1822
1823		<para>
1824		<screen>
1825			-s	Make symbolic link instead of hard link
1826			-f	Remove existing destination file
1827		</screen>
1828		</para>
1829
1830		<para>
1831		Example:
1832		</para>
1833
1834		<para>
1835		<screen>
1836			$ ln -s BusyBox /tmp/ls
1837			$ ls -l /tmp/ls
1838			lrwxrwxrwx    1 root     root            7 Apr 12 18:39 ls -&gt; BusyBox*
1839		</screen>
1840		</para>
1841	</sect1>
1842
1843	<sect1 id="loadacm">
1844	    <title>loadacm</title>
1845
1846		<para>
1847		Usage: loadacm
1848		</para>
1849
1850		<para>
1851		Load an acm from stdin.
1852		</para>
1853
1854		<para>
1855		Example:
1856		</para>
1857
1858		<para>
1859		<screen>
1860			$ loadacm &lt; /etc/i18n/acmname
1861		</screen>
1862		</para>
1863	</sect1>
1864
1865	<sect1 id="loadfont">
1866	    <title>loadfont</title>
1867
1868		<para>
1869		Usage: loadfont
1870		</para>
1871
1872		<para>
1873		Load a console font from stdin.
1874		</para>
1875
1876		<para>
1877		Example:
1878		</para>
1879
1880		<para>
1881		<screen>
1882			$ loadfont &lt; /etc/i18n/fontname
1883		</screen>
1884		</para>
1885	</sect1>
1886
1887	<sect1 id="loadkmap">
1888	    <title>loadkmap</title>
1889
1890		<para>
1891		Usage: loadkmap
1892		</para>
1893
1894		<para>
1895		Load a binary keyboard translation table from stdin.
1896		</para>
1897
1898		<para>
1899		Example:
1900		</para>
1901
1902		<para>
1903		<screen>
1904			$ loadkmap &lt; /etc/i18n/lang-keymap
1905		</screen>
1906		</para>
1907	</sect1>
1908
1909	<sect1 id="logger">
1910	    <title>logger</title>
1911
1912		<para>
1913		Usage: logger [OPTION]... [MESSAGE]
1914		</para>
1915
1916		<para>
1917		Write MESSAGE to the system log.  If MESSAGE is omitted, log
1918		stdin.
1919		</para>
1920
1921		<para>
1922		Options:
1923		</para>
1924
1925		<para>
1926		<screen>
1927			-s	Log to stderr as well as the system log
1928			-t	Log using the specified tag (defaults to user name)
1929			-p	Enter the message with the specified priority
1930				This may be numerical or a ``facility.level'' pair
1931		</screen>
1932		</para>
1933
1934		<para>
1935		Example:
1936		</para>
1937
1938		<para>
1939		<screen>
1940			$ logger "hello"
1941		</screen>
1942		</para>
1943	</sect1>
1944
1945	<sect1 id="logname">
1946	    <title>logname</title>
1947
1948		<para>
1949		Usage: logname
1950		</para>
1951
1952		<para>
1953		Print the name of the current user.
1954		</para>
1955
1956		<para>
1957		Example:
1958		</para>
1959
1960		<para>
1961		<screen>
1962			$ logname
1963			root
1964		</screen>
1965		</para>
1966	</sect1>
1967
1968	<sect1 id="ls">
1969	    <title>ls</title>
1970
1971		<para>
1972		Usage: ls [OPTION]... [FILE]...
1973		</para>
1974
1975		<para>
1976		
1977		</para>
1978
1979		<para>
1980		Options:
1981		</para>
1982
1983		<para>
1984		<screen>
1985			-a	Do not hide entries starting with .
1986			-c	With  -l:  show ctime (the time of last
1987				modification of file status information)
1988			-d	List directory entries instead of contents
1989			-e	List both full date and full time
1990			-l	Use a long listing format
1991			-n	List numeric UIDs and GIDs instead of names
1992			-p	Append indicator (one of /=@|) to entries
1993			-u	With -l: show access time (the time of last
1994				access of the file)
1995			-x	List entries by lines instead of by columns
1996			-A	Do not list implied . and ..
1997			-C	List entries by columns
1998			-F	Append indicator (one of */=@|) to entries
1999			-L	list entries pointed to by symbolic links
2000			-R	List subdirectories recursively
2001		</screen>
2002		</para>
2003
2004		<para>
2005		Example:
2006		</para>
2007
2008		<para>
2009		<screen>
2010		</screen>
2011		</para>
2012	</sect1>
2013
2014	<sect1 id="lsmod">
2015	    <title>lsmod</title>
2016
2017		<para>
2018		Usage: lsmod
2019		</para>
2020
2021		<para>
2022		List currently loaded kernel modules.
2023		</para>
2024	</sect1>
2025
2026	<sect1 id="makedevs">
2027	    <title>makedevs</title>
2028
2029		<para>
2030		Usage: makedevsf NAME TYPE MAJOR MINOR FIRST LAST [s]
2031		</para>
2032
2033		<para>
2034		Create a range of block or character special files.
2035		</para>
2036
2037		<para>
2038		TYPE may be:
2039		</para>
2040
2041		<para>
2042		<screen>
2043			b	Make a block (buffered) device
2044			c or u	Make a character (un-buffered) device
2045			p	Make a named pipe. MAJOR and MINOR are ignored for named pipes
2046		</screen>
2047		</para>
2048
2049		<para>
2050		FIRST specifies the number appended to NAME to create
2051		the first device.  LAST specifies the number of the last
2052		item that should be created. If 's' is the last
2053		argument, the base device is created as well.
2054		</para>
2055
2056		<para>
2057		Example:
2058		</para>
2059
2060		<para>
2061		<screen>
2062			$ makedevs /dev/ttyS c 4 66 2 63
2063			[creates ttyS2-ttyS63]
2064			$ makedevs /dev/hda b 3 0 0 8 s
2065			[creates hda,hda1-hda8]
2066		</screen>
2067		</para>
2068	</sect1>
2069
2070	<sect1 id="md5sum">
2071	    <title>md5sum</title>
2072
2073		<para>
2074		Usage: md5sum [OPTION]... FILE...
2075		</para>
2076
2077		<para>
2078		Print or check MD5 checksums.
2079		</para>
2080
2081		<para>
2082		Options:
2083		</para>
2084
2085		<para>
2086		<screen>
2087			-b	Read files in binary mode
2088			-c	Check MD5 sums against given list
2089			-t	Read files in text mode (default)
2090			-g	Read a string
2091		</screen>
2092		</para>
2093
2094		<para>
2095		The following two options are useful only when verifying
2096		checksums:
2097		</para>
2098
2099		<para>
2100		<screen>
2101			-s	Don't output anything, status code shows success
2102			-w	Warn about improperly formated MD5 checksum lines
2103		</screen>
2104		</para>
2105
2106		<para>
2107		Example:
2108		</para>
2109
2110		<para>
2111		<screen>
2112			$ md5sum busybox
2113			6fd11e98b98a58f64ff3398d7b324003  busybox
2114			$ md5sum -c
2115			6fd11e98b98a58f64ff3398d7b324003  busybox
2116			6fd11e98b98a58f64ff3398d7b324002  busybox
2117			md5sum: MD5 check failed for 'busybox'
2118			^D
2119		</screen>
2120		</para>
2121	</sect1>
2122
2123	<sect1 id="mkdir">
2124	    <title>mkdir</title>
2125
2126		<para>
2127		Usage: mkdir [OPTION]... DIRECTORY...
2128		</para>
2129
2130		<para>
2131		Create the DIRECTORY(s), if they do not already exist.
2132		</para>
2133
2134		<para>
2135		Options:
2136		</para>
2137
2138		<para>
2139		<screen>
2140			-m	Set permission mode (as in chmod), not rwxrwxrwx - umask
2141			-p	No error if directory exists, make parent directories as needed
2142		</screen>
2143		</para>
2144
2145		<para>
2146		Example:
2147		</para>
2148
2149		<para>
2150		<screen>
2151			$ mkdir /tmp/foo
2152			$ mkdir /tmp/foo
2153			/tmp/foo: File exists
2154			$ mkdir /tmp/foo/bar/baz
2155			/tmp/foo/bar/baz: No such file or directory
2156			$ mkdir -p /tmp/foo/bar/baz
2157		</screen>
2158		</para>
2159	</sect1>
2160
2161	<sect1 id="mkfifo">
2162	    <title>mkfifo</title>
2163
2164		<para>
2165		Usage: mkfifo [OPTION] NAME
2166		</para>
2167
2168		<para>
2169		Create a named pipe (identical to 'mknod NAME p').
2170		</para>
2171
2172		<para>
2173		Options:
2174		</para>
2175
2176		<para>
2177		<screen>
2178			-m MODE	Create the pipe using the specified mode (default a=rw)
2179		</screen>
2180		</para>
2181	</sect1>
2182
2183	<sect1 id="mkfs.minix">
2184	    <title>mkfs.minix</title>
2185
2186		<para>
2187		Usage: mkfs.minix [OPTION]... NAME [BLOCKS]
2188		</para>
2189
2190		<para>
2191		Make a MINIX filesystem.
2192		</para>
2193
2194		<para>
2195		Options:
2196		</para>
2197
2198		<para>
2199		<screen>
2200			-c		Check the device for bad blocks
2201			-n [14|30]	Specify the maximum length of filenames
2202			-i		Specify the number of inodes for the filesystem
2203			-l FILENAME	Read the bad blocks list from FILENAME
2204			-v		Make a Minix version 2 filesystem
2205		</screen>
2206		</para>
2207	</sect1>
2208
2209	<sect1 id="mknod">
2210	    <title>mknod</title>
2211
2212		<para>
2213		Usage: mknod [OPTION]... NAME TYPE MAJOR MINOR
2214		</para>
2215
2216		<para>
2217		Create a special file (block, character, or pipe).
2218		</para>
2219
2220		<para>
2221		Options:
2222		</para>
2223
2224		<para>
2225		<screen>
2226			-m	Create the special file using the specified mode (default a=rw)
2227		</screen>
2228		</para>
2229
2230		<para>
2231		TYPE may be:
2232		</para>
2233
2234		<para>
2235		<screen>
2236			b	Make a block (buffered) device
2237			c or u	Make a character (un-buffered) device
2238			p	Make a named pipe. MAJOR and MINOR are ignored for named pipes
2239		</screen>
2240		</para>
2241
2242		<para>
2243		Example:
2244		</para>
2245
2246		<para>
2247		<screen>
2248			$ mknod /dev/fd0 b 2 0 
2249			$ mknod -m 644 /tmp/pipe p
2250		</screen>
2251		</para>
2252	</sect1>
2253
2254	<sect1 id="mkswap">
2255	    <title>mkswap</title>
2256
2257		<para>
2258		Usage: mkswap [OPTION]... DEVICE [BLOCKS]
2259		</para>
2260
2261		<para>
2262		Prepare a disk partition to be used as a swap partition.
2263		</para>
2264
2265		<para>
2266		Options:
2267		</para>
2268
2269		<para>
2270		<screen>
2271			-c	Check for read-ability.
2272			-v0	Make version 0 swap [max 128 Megs].
2273			-v1	Make version 1 swap [big!] (default for kernels &gt; 2.1.117).
2274			BLOCKS	Number of block to use (default is entire partition).
2275		</screen>
2276		</para>
2277	</sect1>
2278
2279	<sect1 id="mktemp">
2280	    <title>mktemp</title>
2281
2282		<para>
2283		Usage: mktemp TEMPLATE
2284		</para>
2285
2286		<para>
2287		Creates a temporary file with its name based on
2288		TEMPLATE.  TEMPLATE is any name with six `Xs' (i.e.,
2289		/tmp/temp.XXXXXX).
2290		</para>
2291
2292		<para>
2293		Example:
2294		</para>
2295
2296		<para>
2297		<screen>
2298			$ mktemp /tmp/temp.XXXXXX
2299			/tmp/temp.mWiLjM
2300			$ ls -la /tmp/temp.mWiLjM
2301			-rw-------    1 andersen andersen        0 Apr 25 17:10 /tmp/temp.mWiLjM
2302		</screen>
2303		</para>
2304	</sect1>
2305
2306	<sect1 id="more">
2307	    <title>more</title>
2308
2309		<para>
2310		Usage: more [FILE]...
2311		</para>
2312
2313		<para>
2314		Page through text one screenful at a time.
2315		</para>
2316
2317		<para>
2318		Example:
2319		</para>
2320
2321		<para>
2322		<screen>
2323			$ dmesg | more
2324		</screen>
2325		</para>
2326	</sect1>
2327
2328	<sect1 id="mount">
2329	    <title>mount</title>
2330
2331		<para>
2332		Usage: mount [OPTION]...
2333		</para>
2334
2335		<para>
2336		<screen>
2337		   or: mount [OPTION]... DEVICE DIRECTORY
2338		</screen>
2339		</para>
2340
2341		<para>
2342		Mount filesystems.
2343		</para>
2344
2345		<para>
2346		Options:
2347		</para>
2348
2349		<para>
2350		<screen>
2351			-a	Mount all filesystems in /etc/fstab
2352			-o	One of the many filesystem options listed below
2353			-r	Mount the filesystem read-only
2354			-t TYPE	Specify the filesystem type
2355			-w	Mount the filesystem read-write
2356		</screen>
2357		</para>
2358
2359		<para>
2360		Options for use with the -o flag:
2361		</para>
2362
2363		<para>
2364		<screen>
2365			async/sync	Writes are asynchronous / synchronous
2366			atime/noatime	Enable / disable updates to inode access times
2367			dev/nodev	Allow / disallow use of special device files
2368			exec/noexec	Allow / disallow use of executable files
2369			loop		Mount a file via loop device
2370			suid/nosuid	Allow / disallow set-user-id-root programs
2371			remount		Remount a currently mounted filesystem
2372			ro/rw		Mount filesystem read-only / read-write
2373		</screen>
2374		</para>
2375
2376		<para>
2377		There are even more flags that are filesystem specific.
2378		You'll have to see the written documentation for those.
2379		</para>
2380
2381		<para>
2382		Example:
2383		</para>
2384
2385		<para>
2386		<screen>
2387			$ mount
2388			/dev/hda3 on / type minix (rw)
2389			proc on /proc type proc (rw)
2390			devpts on /dev/pts type devpts (rw)
2391			$ mount /dev/fd0 /mnt -t msdos -o ro
2392			$ mount /tmp/diskimage /opt -t ext2 -o loop
2393		</screen>
2394		</para>
2395	</sect1>
2396
2397	<sect1 id="mt">
2398	    <title>mt</title>
2399
2400		<para>
2401		Usage: mt [OPTION] OPCODE VALUE
2402		</para>
2403
2404		<para>
2405		Control magnetic tape drive operation.
2406		</para>
2407
2408		<para>
2409		Options:
2410		</para>
2411
2412		<para>
2413		<screen>
2414			-f DEVICE	Control DEVICE
2415		</screen>
2416		</para>
2417	</sect1>
2418
2419	<sect1 id="mv">
2420	    <title>mv</title>
2421
2422		<para>
2423		Usage: mv SOURCE DEST
2424		</para>
2425
2426		<para>
2427		<screen>
2428		   or: mv SOURCE... DIRECTORY
2429		</screen>
2430		</para>
2431
2432		<para>
2433		Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
2434		</para>
2435
2436		<para>
2437		Example:
2438		</para>
2439
2440		<para>
2441		<screen>
2442			$ mv /tmp/foo /bin/bar
2443		</screen>
2444		</para>
2445	</sect1>
2446
2447	<sect1 id="nc">
2448	    <title>nc</title>
2449
2450		<para>
2451		Usage: nc HOST PORT
2452		</para>
2453
2454		<para>
2455		   or: nc -p PORT -l
2456		</para>
2457
2458
2459		<para>
2460		Open a pipe to HOST:PORT or listen for a connection on PORT.
2461		</para>
2462
2463		<para>
2464		Example:
2465		</para>
2466
2467		<para>
2468		<screen>
2469			$ nc foobar.somedomain.com 25
2470			220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
2471			help
2472			214-Commands supported:
2473			214-    HELO EHLO MAIL RCPT DATA AUTH
2474			214     NOOP QUIT RSET HELP
2475			quit
2476			221 foobar closing connection
2477		</screen>
2478		</para>
2479	</sect1>
2480
2481	<sect1 id="nslookup">
2482	    <title>nslookup</title>
2483
2484		<para>
2485		Usage: nslookup [HOST]
2486		</para>
2487
2488		<para>
2489		Query the nameserver for the IP address of the given
2490		HOST.
2491		</para>
2492
2493		<para>
2494		Example:
2495		</para>
2496
2497		<para>
2498		<screen>
2499			$ nslookup localhost
2500			Server:     default
2501			Address:    default
2502
2503			Name:       debian
2504			Address:    127.0.0.1
2505		</screen>
2506		</para>
2507	</sect1>
2508
2509	<sect1 id="ping">
2510	    <title>ping</title>
2511
2512		<para>
2513		Usage: ping [OPTION]... HOST
2514		</para>
2515
2516		<para>
2517		Send ICMP ECHO_REQUEST packets to HOST.
2518		</para>
2519
2520		<para>
2521		Options:
2522		</para>
2523
2524		<para>
2525		<screen>
2526			-c COUNT	Send only COUNT pings
2527			-s SIZE		Send SIZE data bytes in packets (default=56)
2528			-q		Quiet mode, only displays output at start and when finished
2529		</screen>
2530		</para>
2531
2532		<para>
2533		Example:
2534		</para>
2535
2536		<para>
2537		<screen>
2538			$ ping localhost
2539			PING slag (127.0.0.1): 56 data bytes
2540			64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
2541
2542			--- debian ping statistics ---
2543			1 packets transmitted, 1 packets received, 0% packet loss
2544			round-trip min/avg/max = 20.1/20.1/20.1 ms
2545		</screen>
2546		</para>
2547	</sect1>
2548
2549	<sect1 id="poweroff">
2550	    <title>poweroff</title>
2551
2552		<para>
2553		Usage: poweroff
2554		</para>
2555
2556		<para>
2557		Shut down the system, and request that the kernel turn
2558		off power upon halting.
2559		</para>
2560	</sect1>
2561
2562	<sect1 id="printf">
2563	    <title>printf</title>
2564
2565		<para>
2566		Usage: printf FORMAT [ARGUMENT]...
2567		</para>
2568
2569		<para>
2570		Format and print the given data in a manner similar to
2571		the C printf command.
2572		</para>
2573
2574		<para>
2575		Example:
2576		</para>
2577
2578		<para>
2579		<screen>
2580			$ printf "Val=%d\n" 5
2581			Val=5
2582		</screen>
2583		</para>
2584	</sect1>
2585
2586	<sect1 id="ps">
2587	    <title>ps</title>
2588
2589		<para>
2590		Usage: ps
2591		</para>
2592
2593		<para>
2594		Report process status.  This version of ps accepts no
2595		options.
2596		</para>
2597
2598		<para>
2599		Options:
2600		</para>
2601
2602		<para>
2603		<screen>
2604		</screen>
2605		</para>
2606
2607		<para>
2608		Example:
2609		</para>
2610
2611		<para>
2612		<screen>
2613			$ ps
2614			  PID  Uid      Gid State Command
2615			    1 root     root     S init
2616			    2 root     root     S [kflushd]
2617			    3 root     root     S [kupdate]
2618			    4 root     root     S [kpiod]
2619			    5 root     root     S [kswapd]
2620			  742 andersen andersen S [bash]
2621			  743 andersen andersen S -bash
2622			  745 root     root     S [getty]
2623			 2990 andersen andersen R ps
2624		</screen>
2625		</para>
2626	</sect1>
2627
2628	<sect1 id="pwd">
2629	    <title>pwd</title>
2630
2631		<para>
2632		Usage: pwd
2633		</para>
2634
2635		<para>
2636		Print the full filename of the current working
2637		directory.
2638		</para>
2639
2640		<para>
2641		Example:
2642		</para>
2643
2644		<para>
2645		<screen>
2646			$ pwd
2647			/root
2648		</screen>
2649		</para>
2650	</sect1>
2651
2652	<sect1 id="rdate">
2653	    <title>rdate</title>
2654
2655		<para>
2656		Usage: rdate [OPTION] HOST
2657		</para>
2658
2659		<para>
2660		Get and possibly set the system date and time from a remote HOST.
2661		</para>
2662
2663		<para>
2664		Options:
2665		</para>
2666
2667		<para>
2668		<screen>
2669			-s      Set the system date and time (default).
2670			-p      Print the date and time.
2671		</screen>
2672		</para>
2673	</sect1>
2674
2675	<sect1 id="reboot">
2676	    <title>reboot</title>
2677
2678		<para>
2679		Usage: reboot
2680		</para>
2681
2682		<para>
2683		Reboot the system.
2684		</para>
2685	</sect1>
2686
2687	<sect1 id="renice">
2688	    <title>renice</title>
2689
2690		<para>
2691		Usage: renice priority pid [pid ...]
2692		</para>
2693
2694		<para>
2695		Changes priority of running processes. Allowed priorities range
2696		from 20 (the process runs only when nothing else is running) to 0
2697		(default priority) to -20 (almost nothing else ever gets to run).
2698		</para>
2699	</sect1>
2700
2701	<sect1 id="reset">
2702	    <title>reset</title>
2703
2704		<para>
2705		Usage: reset
2706		</para>
2707
2708		<para>
2709		Resets the screen.
2710		</para>
2711	</sect1>
2712
2713	<sect1 id="rm">
2714	    <title>rm</title>
2715
2716		<para>
2717		Usage: rm [OPTION]... FILE...
2718		</para>
2719
2720		<para>
2721		Remove (unlink) the FILE(s).  You may use '--' to
2722		indicate that all following arguments are non-options.
2723		</para>
2724
2725		<para>
2726		Options:
2727		</para>
2728
2729		<para>
2730		<screen>
2731			-i		Always prompt before removing each destinations
2732			-f		Remove existing destinations, never prompt
2733			-r or -R	Remove the contents of directories recursively
2734		</screen>
2735		</para>
2736
2737		<para>
2738		Example:
2739		</para>
2740
2741		<para>
2742		<screen>
2743			$ rm -rf /tmp/foo
2744		</screen>
2745		</para>
2746	</sect1>
2747
2748	<sect1 id="rmdir">
2749	    <title>rmdir</title>
2750
2751		<para>
2752		Usage: rmdir DIRECTORY...
2753		</para>
2754
2755		<para>
2756		Remove DIRECTORY(s) if they are empty.
2757		</para>
2758
2759		<para>
2760		Example:
2761		</para>
2762
2763		<para>
2764		<screen>
2765			$ rmdir /tmp/foo
2766		</screen>
2767		</para>
2768	</sect1>
2769
2770	<sect1 id="rmmod">
2771	    <title>rmmod</title>
2772
2773		<para>
2774		Usage: rmmod [OPTION]... [MODULE]...
2775		</para>
2776
2777		<para>
2778		Unload MODULE(s) from the kernel.
2779		</para>
2780
2781		<para>
2782		Options:
2783		</para>
2784
2785		<para>
2786		<screen>
2787			-a	Try to remove all unused kernel modules
2788		</screen>
2789		</para>
2790
2791		<para>
2792		Example:
2793		</para>
2794
2795		<para>
2796		<screen>
2797			$ rmmod tulip
2798		</screen>
2799		</para>
2800	</sect1>
2801
2802	<sect1 id="sed">
2803	    <title>sed</title>
2804
2805		<para>
2806		Usage: sed [OPTION]... SCRIPT [FILE]...
2807		</para>
2808
2809		<para>
2810		Allowed sed scripts come in the following form:
2811		</para>
2812
2813		<para>
2814		<screen>
2815		ADDR [!] COMMAND
2816		</screen>
2817		</para>
2818
2819		<para>
2820		ADDR can be:
2821		</para>
2822
2823		<para>
2824		<screen>
2825			NUMBER    Match specified line number
2826			$         Match last line
2827			/REGEXP/  Match specified regexp
2828		</screen>
2829		</para>
2830
2831		<para>
2832		! inverts the meaning of the match
2833		</para>
2834
2835		<para>
2836		COMMAND can be:
2837		</para>
2838
2839		<para>
2840		<screen>
2841			s/regexp/replacement/[igp]
2842				which attempt to match regexp against the pattern space
2843				and if successful replaces the matched portion with replacement.
2844			aTEXT
2845				which appends TEXT after the pattern space
2846		</screen>
2847		</para>
2848
2849		<para>
2850		This version of sed matches full regular expressions.
2851		</para>
2852
2853		<para>
2854		Options:
2855		</para>
2856
2857		<para>
2858		<screen>
2859			-e	Add the script to the commands to be executed
2860			-n	Suppress automatic printing of pattern space
2861		</screen>
2862		</para>
2863
2864		<para>
2865		Example:
2866		</para>
2867
2868		<para>
2869		<screen>
2870			$ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
2871			bar
2872		</screen>
2873		</para>
2874	</sect1>
2875
2876	<sect1 id="setkeycodes">
2877	    <title>setkeycodes</title>
2878
2879		<para>
2880		Usage: setkeycodes SCANCODE KEYCODE ...
2881		</para>
2882
2883		<para>
2884		Set entries into the kernel's scancode-to-keycode map,
2885		allowing unusual keyboards to generate usable keycodes.
2886		</para>
2887
2888		<para>
2889		SCANCODE may be either xx or e0xx (hexadecimal), and
2890		KEYCODE is given in decimal.
2891		</para>
2892
2893		<para>
2894		Example:
2895		</para>
2896
2897		<para>
2898		<screen>
2899			$ setkeycodes e030 127
2900		</screen>
2901		</para>
2902	</sect1>
2903
2904
2905	<sect1 id="sh">
2906	    <title>sh</title>
2907
2908		<para>
2909		Usage: sh
2910		</para>
2911
2912		<para>
2913		lash -- the BusyBox LAme SHell (command interpreter)
2914		</para>
2915
2916		<para>
2917		This command does not yet have proper documentation.  
2918		</para>
2919
2920		<para>
2921		Use lash just as you would use any other shell. It
2922		properly handles pipes, redirects, job control, can be
2923		used as the shell for scripts (#!/bin/sh), and has a
2924		sufficient set of builtins to do what is needed. It does
2925		not (yet) support Bourne Shell syntax. If you need
2926		things like ``if-then-else'', ``while'', and such, use
2927		ash or bash. If you just need a very simple and
2928		extremely small shell, this will do the job.
2929		</para>
2930	</sect1>
2931
2932	<sect1 id="sleep">
2933	    <title>sleep</title>
2934
2935		<para>
2936		Usage: sleep N
2937		</para>
2938
2939		<para>
2940		Pause for N seconds.
2941		</para>
2942
2943		<para>
2944		Example:
2945		</para>
2946
2947		<para>
2948		<screen>
2949			$ sleep 2
2950			[2 second delay results]
2951		</screen>
2952		</para>
2953	</sect1>
2954
2955	<sect1 id="sort">
2956	    <title>sort</title>
2957
2958		<para>
2959		Usage: sort [OPTION]... [FILE]...
2960		</para>
2961
2962		<para>
2963		Sort lines of text in FILE(s).
2964		</para>
2965
2966		<para>
2967		Options:
2968		</para>
2969
2970		<para>
2971		<screen>
2972			-n	Compare numerically
2973			-r	Reverse after sorting
2974		</screen>
2975		</para>
2976
2977		<para>
2978		Example:
2979		</para>
2980
2981		<para>
2982		<screen>
2983			$ echo -e "e\nf\nb\nd\nc\na" | sort
2984			a
2985			b
2986			c
2987			d
2988			e
2989			f
2990		</screen>
2991		</para>
2992	</sect1>
2993
2994	<sect1 id="swapoff">
2995	    <title>swapoff</title>
2996
2997		<para>
2998		Usage: swapoff [OPTION] [DEVICE]
2999		</para>
3000
3001		<para>
3002		Stop swapping virtual memory pages on DEVICE.
3003		</para>
3004
3005		<para>
3006		Options:
3007		</para>
3008
3009		<para>
3010		<screen>
3011			-a	Stop swapping on all swap devices
3012		</screen>
3013		</para>
3014	</sect1>
3015
3016	<sect1 id="swapon">
3017	    <title>swapon</title>
3018
3019		<para>
3020		Usage: swapon [OPTION] [DEVICE]
3021		</para>
3022
3023		<para>
3024		Start swapping virtual memory pages on the given device.
3025		</para>
3026
3027		<para>
3028		Options:
3029		</para>
3030
3031		<para>
3032		<screen>
3033			-a	Start swapping on all swap devices
3034		</screen>
3035		</para>
3036	</sect1>
3037
3038	<sect1 id="sync">
3039	    <title>sync</title>
3040
3041		<para>
3042		Usage: sync
3043		</para>
3044
3045		<para>
3046		Write all buffered filesystem blocks to disk.
3047		</para>
3048	</sect1>
3049
3050	<sect1 id="syslogd">
3051	    <title>syslogd</title>
3052
3053		<para>
3054		Usage: syslogd [OPTION]...
3055		</para>
3056
3057		<para>
3058		Linux system and kernel (provides klogd) logging
3059		utility. Note that this version of syslogd/klogd ignores
3060		/etc/syslog.conf.
3061		</para>
3062
3063		<para>
3064		Options:
3065		</para>
3066
3067		<para>
3068		<screen>
3069			-m NUM	Interval between MARK lines (default=20min, 0=off)
3070			-n	Run as a foreground process
3071			-K	Do not start up the klogd process
3072			-O FILE	Use an alternate log file (default=/var/log/messages)
3073			-R HOST[:PORT] Log remotely to IP or hostname on PORT (default PORT=514/UDP)
3074			-L      Log locally as well as network logging (default is network only)
3075		</screen>
3076		</para>
3077
3078		<para>
3079		Example:
3080		</para>
3081
3082		<para>
3083		<screen>
3084		$ syslogd -R masterlog:514
3085		$ syslogd -R 192.168.1.1:601
3086		</screen>
3087		</para>
3088	</sect1>
3089
3090	<sect1 id="tail">
3091	    <title>tail</title>
3092
3093		<para>
3094		Usage: tail [OPTION] [FILE]...
3095		</para>
3096
3097		<para>
3098		Print last 10 lines of each FILE to standard output.
3099		With more than one FILE, precede each with a header
3100		giving the file name. With no FILE, or when FILE is -,
3101		read stdin.
3102		</para>
3103
3104		<para>
3105		Options:
3106		</para>
3107
3108		<para>
3109		<screen>
3110			-n NUM	Print last NUM lines instead of last 10
3111			-f	Output data as the file grows.  This version
3112				of 'tail -f' supports only one file at a time.
3113		</screen>
3114		</para>
3115
3116		<para>
3117		Example:
3118		</para>
3119
3120		<para>
3121		<screen>
3122			$ tail -n 1 /etc/resolv.conf
3123			nameserver 10.0.0.1
3124		</screen>
3125		</para>
3126	</sect1>
3127
3128	<sect1 id="tar">
3129	    <title>tar</title>
3130
3131		<para>
3132		Usage: tar [MODE] [OPTION] [FILE]...
3133		</para>
3134
3135		<para>
3136		
3137		</para>
3138
3139		<para>
3140		MODE may be chosen from
3141		</para>
3142
3143		<para>
3144		<screen>
3145			c	Create
3146			x	Extract
3147			t	List
3148		</screen>
3149		</para>
3150
3151		<para>
3152		Options:
3153		</para>
3154
3155		<para>
3156		<screen>
3157			f FILE			Use FILE for tarfile (or stdin if '-')
3158			O				Extract to stdout
3159			exclude FILE	File to exclude
3160			v				List files processed
3161		</screen>
3162		</para>
3163
3164		<para>
3165		Example:
3166		</para>
3167
3168		<para>
3169		<screen>
3170			$ zcat /tmp/tarball.tar.gz | tar -xf -
3171			$ tar -cf /tmp/tarball.tar /usr/local
3172		</screen>
3173		</para>
3174	</sect1>
3175
3176	<sect1 id="tee">
3177	    <title>tee</title>
3178
3179		<para>
3180		Usage: tee [OPTION]... [FILE]...
3181		</para>
3182
3183		<para>
3184		Copy stdin to FILE(s), and also to stdout.
3185		</para>
3186
3187		<para>
3188		Options:
3189		</para>
3190
3191		<para>
3192		<screen>
3193			-a	Append to the given FILEs, do not overwrite
3194		</screen>
3195		</para>
3196
3197		<para>
3198		Example:
3199		</para>
3200
3201		<para>
3202		<screen>
3203			$ echo "Hello" | tee /tmp/foo
3204			Hello
3205			$ cat /tmp/foo
3206			Hello
3207		</screen>
3208		</para>
3209	</sect1>
3210
3211	<sect1 id="telnet">
3212	    <title>telnet</title>
3213
3214		<para>
3215		Usage: telnet HOST [PORT]
3216		</para>
3217
3218		<para>
3219		Establish interactive communication with another
3220		computer over a network using the TELNET protocol.
3221		</para>
3222	</sect1>
3223
3224	<sect1 id="test">
3225	    <title>test, [</title>
3226
3227		<para>
3228		Usage: test EXPRESSION
3229		</para>
3230
3231		<para>
3232		   or: [ EXPRESSION ]
3233		</para>
3234
3235		<para>
3236		Check file types and compare values returning an exit
3237		code determined by the value of EXPRESSION.
3238		</para>
3239
3240		<para>
3241		Example:
3242		</para>
3243
3244		<para>
3245		<screen>
3246			$ test 1 -eq 2
3247			$ echo $?
3248			1
3249			$ test 1 -eq 1
3250			$ echo $?
3251			0
3252			$ [ -d /etc ]
3253			$ echo $?
3254			0
3255			$ [ -d /junk ]
3256			$ echo $?
3257			1
3258		</screen>
3259		</para>
3260	</sect1>
3261
3262	<sect1 id="touch">
3263	    <title>touch</title>
3264
3265		<para>
3266		Usage: touch [OPTION]... FILE...
3267		</para>
3268
3269		<para>
3270		Update the last-modified date on (or create) FILE(s).
3271		</para>
3272
3273		<para>
3274		Options:
3275		</para>
3276
3277		<para>
3278		<screen>
3279			-c	Do not create files
3280		</screen>
3281		</para>
3282
3283		<para>
3284		Example:
3285		</para>
3286
3287		<para>
3288		<screen>
3289			$ ls -l /tmp/foo
3290			/bin/ls: /tmp/foo: No such file or directory
3291			$ touch /tmp/foo
3292			$ ls -l /tmp/foo
3293			-rw-rw-r--    1 andersen andersen        0 Apr 15 01:11 /tmp/foo
3294		</screen>
3295		</para>
3296	</sect1>
3297
3298	<sect1 id="tr">
3299	    <title>tr</title>
3300
3301		<para>
3302		Usage: tr [OPTION]... STRING1 [STRING2]
3303		</para>
3304
3305		<para>
3306		Translate, squeeze, and/or delete characters from stdin,
3307		writing to stdout.
3308		</para>
3309
3310		<para>
3311		Options:
3312		</para>
3313
3314		<para>
3315		<screen>
3316			-c	Take complement of STRING1
3317			-d	Delete input characters coded STRING1
3318			-s	Squeeze multiple output characters of STRING2 into one character
3319		</screen>
3320		</para>
3321
3322		<para>
3323		Example:
3324		</para>
3325
3326		<para>
3327		<screen>
3328			$ echo "gdkkn vnqkc" | tr [a-y] [b-z]
3329			hello world
3330		</screen>
3331		</para>
3332	</sect1>
3333
3334	<sect1 id="true">
3335	    <title>true</title>
3336
3337		<para>
3338		Usage: true
3339		</para>
3340
3341		<para>
3342		Return an exit code of TRUE (1).
3343		</para>
3344
3345		<para>
3346		Example:
3347		</para>
3348
3349		<para>
3350		<screen>
3351			$ true
3352			$ echo $?
3353			0
3354		</screen>
3355		</para>
3356	</sect1>
3357
3358	<sect1 id="tty">
3359	    <title>tty</title>
3360
3361		<para>
3362		Usage: tty
3363		</para>
3364
3365		<para>
3366		Print the file name of the terminal connected to stdin.
3367		</para>
3368
3369		<para>
3370		Options:
3371		</para>
3372
3373		<para>
3374		<screen>
3375			-s	Print nothing, only return an exit status
3376		</screen>
3377		</para>
3378
3379		<para>
3380		Example:
3381		</para>
3382
3383		<para>
3384		<screen>
3385			$ tty
3386			/dev/tty2
3387		</screen>
3388		</para>
3389	</sect1>
3390
3391	<sect1 id="umount">
3392	    <title>umount</title>
3393
3394		<para>
3395		Usage: umount [OPTION]... DEVICE|DIRECTORY
3396		</para>
3397
3398		<para>
3399		
3400		</para>
3401
3402		<para>
3403		Options:
3404		</para>
3405
3406		<para>
3407		<screen>
3408			-a	Unmount all file systems
3409			-r	Try to remount devices as read-only if mount is busy
3410			-f	Force filesystem umount (i.e., unreachable NFS server)
3411			-l	Do not free loop device (if a loop device has been used)
3412		</screen>
3413		</para>
3414
3415		<para>
3416		Example:
3417		</para>
3418
3419		<para>
3420		<screen>
3421			$ umount /dev/hdc1 
3422		</screen>
3423		</para>
3424	</sect1>
3425
3426	<sect1 id="uname">
3427	    <title>uname</title>
3428
3429		<para>
3430		Usage: uname [OPTION]...
3431		</para>
3432
3433		<para>
3434		Print certain system information. With no OPTION, same
3435		as -s.
3436		</para>
3437
3438		<para>
3439		Options:
3440		</para>
3441
3442		<para>
3443		<screen>
3444			-a	Print all information
3445			-m	Print the machine (hardware) type
3446			-n	Print the machine's network node hostname
3447			-r	Print the operating system release
3448			-s	Print the operating system name
3449			-p	Print the host processor type
3450			-v	Print the operating system version
3451		</screen>
3452		</para>
3453
3454		<para>
3455		Example:
3456		</para>
3457
3458		<para>
3459		<screen>
3460			$ uname -a
3461			Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
3462		</screen>
3463		</para>
3464	</sect1>
3465
3466	<sect1 id="uniq">
3467	    <title>uniq</title>
3468
3469		<para>
3470		Usage: uniq [INPUT [OUTPUT]]
3471		</para>
3472
3473		<para>
3474		Discard all but one of successive identical lines from
3475		INPUT (or stdin), writing to OUTPUT (or stdout).
3476		</para>
3477
3478		<para>
3479		Options:
3480		</para>
3481
3482		<para>
3483		<screen>
3484		-c		prefix lines by the number of occurrences
3485		-d		only print duplicate lines
3486		-u		only print unique lines
3487		</screen>
3488		</para>
3489
3490		<para>
3491		Example:
3492		</para>
3493
3494		<para>
3495		<screen>
3496			$ echo -e "a\na\nb\nc\nc\na" | sort | uniq
3497			a
3498			b
3499			c
3500		</screen>
3501		</para>
3502	</sect1>
3503	
3504	<sect1 id="unix2dos">
3505	    <title>unix2dos</title>
3506
3507		<para>
3508		Usage: unix2dos < unixfile > dosfile
3509		</para>
3510
3511		<para>
3512		Converts a text file from unix format to dos format.
3513		</para>
3514
3515	</sect1>
3516
3517	<sect1 id="unrpm">
3518	    <title>unrpm</title>
3519
3520		<para>
3521		Usage: unrpm < package.rpm | gzip -d | cpio -idmuv
3522		</para>
3523
3524		<para>
3525		Extracts an rpm archive.
3526		</para>
3527
3528	</sect1>
3529
3530	<sect1 id="update">
3531	    <title>update</title>
3532
3533		<para>
3534		Usage: update [OPTION]...
3535		</para>
3536
3537		<para>
3538		Periodically flush filesystem buffers.
3539		</para>
3540
3541		<para>
3542		Options:
3543		</para>
3544
3545		<para>
3546		<screen>
3547			-S	Force use of sync(2) instead of flushing
3548			-s SECS	Call sync this often (default 30)
3549			-f SECS	Flush some buffers this often (default 5)
3550		</screen>
3551		</para>
3552	</sect1>
3553
3554	<sect1 id="uptime">
3555	    <title>uptime</title>
3556
3557		<para>
3558		Usage: uptime
3559		</para>
3560
3561		<para>
3562		Display how long the system has been running since boot.
3563		</para>
3564
3565		<para>
3566		Example:
3567		</para>
3568
3569		<para>
3570		<screen>
3571			$ uptime
3572			  1:55pm  up  2:30, load average: 0.09, 0.04, 0.00
3573		</screen>
3574		</para>
3575	</sect1>
3576
3577	<sect1 id="usleep">
3578	    <title>usleep</title>
3579
3580		<para>
3581		Usage: usleep N
3582		</para>
3583
3584		<para>
3585		Pause for N microseconds.
3586		</para>
3587
3588		<para>
3589		Example:
3590		</para>
3591
3592		<para>
3593		<screen>
3594			$ usleep 1000000
3595			[pauses for 1 second]
3596		</screen>
3597		</para>
3598	</sect1>
3599
3600	<sect1 id="uudecode">
3601	    <title>uudecode</title>
3602
3603		<para>
3604		Usage: uudecode [OPTION] [FILE]
3605		</para>
3606
3607		<para>
3608		Uudecode a uuencoded file.
3609		</para>
3610
3611		<para>
3612		Options:
3613		</para>
3614
3615		<para>
3616		<screen>
3617			-o FILE	Direct output to FILE
3618		</screen>
3619		</para>
3620
3621		<para>
3622		Example:
3623		</para>
3624
3625		<para>
3626		<screen>
3627			$ uudecode -o busybox busybox.uu
3628			$ ls -l busybox
3629			-rwxr-xr-x   1 ams      ams        245264 Jun  7 21:35 busybox
3630		</screen>
3631		</para>
3632	</sect1>
3633
3634	<sect1 id="uuencode">
3635	    <title>uuencode</title>
3636
3637		<para>
3638		Usage: uuencode [OPTION] [INFILE] OUTFILE
3639		</para>
3640
3641		<para>
3642		Uuencode a file.
3643		</para>
3644
3645		<para>
3646		Options:
3647		</para>
3648
3649		<para>
3650		<screen>
3651			-m	Use base64 encoding as of RFC1521
3652		</screen>
3653		</para>
3654
3655		<para>
3656		Example:
3657		</para>
3658
3659		<para>
3660		<screen>
3661			$ uuencode busybox busybox
3662			begin 755 busybox
3663			M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&amp;
3664			.....
3665			$ uudecode busybox busybox &gt; busybox.uu
3666			$
3667		</screen>
3668		</para>
3669	</sect1>
3670
3671	<sect1 id="watchdog">
3672	    <title>watchdog</title>
3673
3674		<para>
3675		Usage: watchdog device
3676		</para>
3677
3678		<para>
3679		Periodically writes to watchdog device B<device>.
3680		</para>
3681	</sect1>
3682
3683	<sect1 id="wc">
3684	    <title>wc</title>
3685
3686		<para>
3687		Usage: wc [OPTION]... [FILE]...
3688		</para>
3689
3690		<para>
3691		Print line, word, and byte counts for each FILE, and a
3692		total line if more than one FILE is specified. With no
3693		FILE, read stdin.
3694		</para>
3695
3696		<para>
3697		Options:
3698		</para>
3699
3700		<para>
3701		<screen>
3702			-c	Print the byte counts
3703			-l	Print the newline counts
3704			-L	Print the length of the longest line
3705			-w	Print the word counts
3706		</screen>
3707		</para>
3708
3709		<para>
3710		Example:
3711		</para>
3712
3713		<para>
3714		<screen>
3715			$ wc /etc/passwd
3716			     31      46    1365 /etc/passwd
3717		</screen>
3718		</para>
3719	</sect1>
3720
3721	<sect1 id="which">
3722	    <title>which</title>
3723
3724		<para>
3725		Usage: which [COMMAND]...
3726		</para>
3727
3728		<para>
3729		Locate COMMAND(s).
3730		</para>
3731
3732		<para>
3733		Example:
3734		</para>
3735
3736		<para>
3737		<screen>
3738			$ which login
3739			/bin/login
3740		</screen>
3741		</para>
3742	</sect1>
3743
3744	<sect1 id="whoami">
3745	    <title>whoami</title>
3746
3747		<para>
3748		Usage: whoami
3749		</para>
3750
3751		<para>
3752		Print the user name associated with the current
3753		effective user id.
3754		</para>
3755
3756		<para>
3757		Example:
3758		</para>
3759
3760		<para>
3761		<screen>
3762			$ whoami
3763			andersen
3764		</screen>
3765		</para>
3766	</sect1>
3767
3768	<sect1 id="xargs">
3769	    <title>xargs</title>
3770
3771		<para>
3772		Usage: xargs [OPTIONS] [COMMAND] [ARGS...]
3773		</para>
3774
3775		<para>
3776		Executes COMMAND on every item given by standard input.
3777		</para>
3778
3779		<para>
3780		Options:
3781		</para>
3782
3783		<para>
3784		<screen>
3785			-t      Print the command just before it is run
3786		</screen>
3787		</para>
3788
3789
3790		<para>
3791		Example:
3792		</para>
3793
3794		<para>
3795		<screen>
3796			$ ls | xargs gzip
3797			$ find . -name '*.c' -print | xargs rm
3798		</screen>
3799		</para>
3800	</sect1>
3801
3802	<sect1 id="yes">
3803	    <title>yes</title>
3804
3805		<para>
3806		Usage: yes [STRING]...
3807		</para>
3808
3809		<para>
3810		Repeatedly output a line with all specified STRING(s),
3811		or `y'.
3812		</para>
3813	</sect1>
3814
3815	<sect1 id="zcat">
3816	    <title>zcat</title>
3817
3818		<para>
3819		Usage: zcat [OPTION]... FILE
3820		</para>
3821
3822		<para>
3823		Uncompress FILE (or stdin if FILE is '-') to stdout.  
3824		</para>
3825
3826		<para>
3827		Options:
3828		</para>
3829
3830		<para>
3831		<screen>
3832			-t	Test compressed file integrity
3833		</screen>
3834		</para>
3835
3836		<para>
3837		Example:
3838		</para>
3839
3840		<para>
3841		<screen>
3842		</screen>
3843		</para>
3844	</sect1>
3845  </chapter>
3846
3847  <chapter id="LIBC-NSS">
3848    <title>LIBC NSS</title>
3849
3850	<para>
3851	GNU Libc uses the Name Service Switch (NSS) to configure the
3852	behavior of the C library for the local environment, and to
3853	configure how it reads system data, such as passwords and group
3854	information. BusyBox has made it Policy that it will never use
3855	NSS, and will never use libc calls that make use of NSS. This
3856	allows you to run an embedded system without the need for
3857	installing an /etc/nsswitch.conf file and without /lib/libnss_*
3858	libraries installed.
3859	</para>
3860
3861	<para>
3862	If you are using a system that is using a remote LDAP server for
3863	authentication via GNU libc NSS, and you want to use BusyBox,
3864	then you will need to adjust the BusyBox source. Chances are
3865	though, that if you have enough space to install of that stuff
3866	on your system, then you probably want the full GNU utilities.
3867	</para>
3868  </chapter>
3869
3870  <chapter id="SEE-ALSO">
3871    <title>SEE ALSO</title>
3872
3873	<para>
3874	<literal>textutils(1),</literal>
3875	<literal>shellutils(1),</literal>
3876	etc...
3877	</para>
3878  </chapter>
3879
3880  <chapter id="MAINTAINER">
3881    <title>MAINTAINER</title>
3882
3883	<para>
3884	Erik Andersen &lt;andersee@debian.org&gt; &lt;andersen@lineo.com&gt;
3885	</para>
3886  </chapter>
3887
3888  <chapter id="AUTHORS">
3889    <title>AUTHORS</title>
3890
3891	<para>
3892	The following people have made significant contributions to 
3893	BusyBox -- whether they know it or not.
3894	</para>
3895
3896	<para>
3897	Erik Andersen &lt;andersee@debian.org&gt;
3898	</para>
3899
3900	<para>
3901	Edward Betts &lt;edward@debian.org&gt;
3902	</para>
3903
3904	<para>
3905	John Beppu &lt;beppu@lineo.com&gt;
3906	</para>
3907
3908	<para>
3909	Brian Candler &lt;B.Candler@pobox.com&gt;
3910	</para>
3911
3912	<para>
3913	Randolph Chung &lt;tausq@debian.org&gt;
3914	</para>
3915
3916	<para>
3917	Dave Cinege &lt;dcinege@psychosis.com&gt;	
3918	</para>
3919
3920	<para>
3921	Karl M. Hegbloom &lt;karlheg@debian.org&gt;
3922	</para>
3923
3924	<para>
3925	Daniel Jacobowitz &lt;dan@debian.org&gt;
3926	</para>
3927
3928	<para>
3929	Matt Kraai &lt;kraai@alumni.carnegiemellon.edu&gt;
3930	</para>
3931
3932	<para>
3933	John Lombardo &lt;john@deltanet.com&gt;	
3934	</para>
3935
3936	<para>
3937	Glenn McGrath &lt;bug1@netconnect.com.au&gt;
3938	</para>
3939
3940	<para>
3941	Bruce Perens &lt;bruce@perens.com&gt;
3942	</para>
3943
3944	<para>
3945	Chip Rosenthal &lt;chip@unicom.com&gt;, &lt;crosenth@covad.com&gt;
3946	</para>
3947
3948	<para>
3949	Pavel Roskin &lt;proski@gnu.org&gt;
3950	</para>
3951
3952	<para>
3953	Gyepi Sam &lt;gyepi@praxis-sw.com&gt;
3954	</para>
3955
3956	<para>
3957	Linus Torvalds &lt;torvalds@transmeta.com&gt;
3958	</para>
3959
3960        <para>
3961        Mark Whitley &lt;markw@lineo.com&gt;
3962        </para>
3963
3964	<para>
3965	Charles P. Wright &lt;cpwright@villagenet.com&gt;
3966	</para>
3967
3968	<para>
3969	Enrique Zanardi &lt;ezanardi@ull.es&gt;
3970	</para>
3971
3972
3973  </chapter>
3974</book>    <!-- End of the book -->
3975