aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-06-02 03:23:28 +0000
committerEric Andersen <andersen@codepoet.org>2000-06-02 03:23:28 +0000
commitec480c49c271b502eb637a1cf38a88c4c22d1b3b (patch)
tree86b221ff24cb9b6543a2c777590b29409f1027b0
parent86ab8a32bd63b2f2a73bdcead8e2bb037589e175 (diff)
downloadbusybox-w32-ec480c49c271b502eb637a1cf38a88c4c22d1b3b.tar.gz
busybox-w32-ec480c49c271b502eb637a1cf38a88c4c22d1b3b.tar.bz2
busybox-w32-ec480c49c271b502eb637a1cf38a88c4c22d1b3b.zip
oops. Don't commit autogenerated stuff.
-Erik
-rw-r--r--docs/busybox.net/.cvsignore1
-rw-r--r--docs/busybox.net/BusyBox.html2492
2 files changed, 1 insertions, 2492 deletions
diff --git a/docs/busybox.net/.cvsignore b/docs/busybox.net/.cvsignore
new file mode 100644
index 000000000..88825af14
--- /dev/null
+++ b/docs/busybox.net/.cvsignore
@@ -0,0 +1 @@
BusyBox.html
diff --git a/docs/busybox.net/BusyBox.html b/docs/busybox.net/BusyBox.html
deleted file mode 100644
index 86c819198..000000000
--- a/docs/busybox.net/BusyBox.html
+++ /dev/null
@@ -1,2492 +0,0 @@
1<HTML>
2<HEAD>
3<TITLE>BusyBox - The Swiss Army Knife of Embedded Linux</TITLE>
4<LINK REV="made" HREF="mailto:none">
5</HEAD>
6
7<BODY>
8
9<!-- INDEX BEGIN -->
10
11<UL>
12
13 <LI><A HREF="#NAME">NAME</A>
14 <LI><A HREF="#SYNTAX">SYNTAX</A>
15 <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
16 <LI><A HREF="#USAGE">USAGE</A>
17 <LI><A HREF="#COMMON_OPTIONS">COMMON OPTIONS</A>
18 <LI><A HREF="#COMMANDS">COMMANDS</A>
19 <LI><A HREF="#LIBC_NSS">LIBC NSS</A>
20 <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
21 <LI><A HREF="#MAINTAINER">MAINTAINER</A>
22 <LI><A HREF="#AUTHORS">AUTHORS</A>
23</UL>
24<!-- INDEX END -->
25
26<HR>
27<P>
28<H1><A NAME="NAME">NAME</A></H1>
29<P>
30BusyBox - The Swiss Army Knife of Embedded Linux
31
32<P>
33<HR>
34<H1><A NAME="SYNTAX">SYNTAX</A></H1>
35<P>
36<PRE> BusyBox &lt;function&gt; [arguments...] # or
37</PRE>
38<P>
39<PRE> &lt;function&gt; [arguments...] # if symlinked
40</PRE>
41<P>
42<HR>
43<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
44<P>
45BusyBox combines tiny versions of many common UNIX utilities into a single
46small executable. It provides minimalist replacements for most of the
47utilities you usually find in fileutils, shellutils, findutils, textutils,
48grep, gzip, tar, etc. BusyBox provides a fairly complete POSIX environment
49for any small or emdedded system. The utilities in BusyBox generally have
50fewer options then their full featured GNU cousins; however, the options
51that are included provide the expected functionality and behave very much
52like their GNU counterparts.
53
54<P>
55BusyBox has been written with size-optimization and limited resources in
56mind. It is also extremely modular so you can easily include or exclude
57commands (or features) at compile time. This makes it easy to customize
58your embedded systems. To create a working system, just add a kernel, a
59shell (such as ash), and an editor (such as elvis-tiny or ae).
60
61<P>
62<HR>
63<H1><A NAME="USAGE">USAGE</A></H1>
64<P>
65When you create a link to BusyBox for the function you wish to use, when
66BusyBox is called using that link it will behave as if the command itself
67has been invoked.
68
69<P>
70For example, entering
71
72<P>
73<PRE> ln -s ./BusyBox ls
74 ./ls
75</PRE>
76<P>
77will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
78into BusyBox).
79
80<P>
81You can also invoke BusyBox by issuing the command as an argument on the
82command line. For example, entering
83
84<P>
85<PRE> ./BusyBox ls
86</PRE>
87<P>
88will also cause BusyBox to behave as 'ls'.
89
90<P>
91<HR>
92<H1><A NAME="COMMON_OPTIONS">COMMON OPTIONS</A></H1>
93<P>
94Most BusyBox commands support the <STRONG>--help</STRONG> option to provide a terse runtime description of their behavior.
95
96<P>
97<HR>
98<H1><A NAME="COMMANDS">COMMANDS</A></H1>
99<P>
100Currently defined functions include:
101
102<P>
103ar, basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, cut, date,
104dd, df, dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
105freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
106hostname, id, init, kill, killall, length, ln, loadacm, loadfont, loadkmap,
107logger, logname, ls, lsmod, makedevs, math, mkdir, mkfifo, mkfs.minix,
108mknod, mkswap, mktemp, nc, more, mount, mt, mv, nslookup, ping, poweroff,
109printf, ps, pwd, reboot, rm, rmdir, rmmod, sed, setkeycodes, sh, sfdisk,
110sleep, sort, sync, syslogd, swapon, swapoff, tail, tar, test, tee, touch,
111tr, true, tty, umount, uname, uniq, update, uptime, usleep, wc, whoami,
112yes, zcat, [
113
114<P>
115-------------------------------
116
117<DL>
118<DT><STRONG><A NAME="item_ar">ar</A></STRONG><DD>
119<P>
120Usage: ar [optxvV] archive [filenames]
121
122<P>
123Extract or list files from an ar archive.
124
125<P>
126Options:
127
128<P>
129<PRE> o preserve original dates
130 p extract to stdout
131 t list
132 x extract
133 v verbosely list files processed
134</PRE>
135<P>
136-------------------------------
137
138<DT><STRONG><A NAME="item_basename">basename</A></STRONG><DD>
139<P>
140Usage: basename FILE [SUFFIX]
141
142<P>
143Strips directory path and suffixes from FILE. If specified, also removes
144any trailing SUFFIX.
145
146<P>
147Example:
148
149<P>
150<PRE> $ basename /usr/local/bin/foo
151 foo
152 $ basename /usr/local/bin/
153 bin
154 $ basename /foo/bar.txt .txt
155 bar
156</PRE>
157<P>
158-------------------------------
159
160<DT><STRONG><A NAME="item_cat">cat</A></STRONG><DD>
161<P>
162Usage: cat [FILE ...]
163
164<P>
165Concatenates <CODE>FILE(s)</CODE> and prints them to the standard output.
166
167<P>
168Example:
169
170<P>
171<PRE> $ cat /proc/uptime
172 110716.72 17.67
173</PRE>
174<P>
175-------------------------------
176
177<DT><STRONG><A NAME="item_chgrp">chgrp</A></STRONG><DD>
178<P>
179Usage: chgrp [OPTION]... GROUP FILE...
180
181<P>
182Change the group membership of each FILE to GROUP.
183
184<P>
185Options:
186
187<P>
188<PRE> -R change files and directories recursively
189</PRE>
190<P>
191Example:
192
193<P>
194<PRE> $ ls -l /tmp/foo
195 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
196 $ chgrp root /tmp/foo
197 $ ls -l /tmp/foo
198 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
199</PRE>
200<P>
201-------------------------------
202
203<DT><STRONG><A NAME="item_chmod">chmod</A></STRONG><DD>
204<P>
205Usage: chmod [<STRONG>-R</STRONG>] MODE[,MODE]... FILE...
206
207<P>
208Changes file access permissions for the specified <CODE>FILE(s)</CODE> (or
209directories). Each MODE is defined by combining the letters for WHO has
210access to the file, an OPERATOR for selecting how the permissions should be
211changed, and a PERISSION for <CODE>FILE(s)</CODE> (or directories).
212
213<P>
214WHO may be chosen from
215
216<P>
217<PRE> u User who owns the file
218 g Users in the file's Group
219 o Other users not in the file's group
220 a All users
221</PRE>
222<P>
223OPERATOR may be chosen from
224
225<P>
226<PRE> + Add a permission
227 - Remove a permission
228 = Assign a permission
229
230PERMISSION may be chosen from
231</PRE>
232<P>
233<PRE> r Read
234 w Write
235 x Execute (or access for directories)
236 s Set user (or group) ID bit
237 t Stickey bit (for directories prevents removing files by non-owners)
238</PRE>
239<P>
240Alternately, permissions can be set numerically where the first three
241numbers are calculated by adding the octal values, such as
242
243<P>
244<PRE> 4 Read
245 2 Write
246 1 Execute
247</PRE>
248<P>
249An optional fourth digit can also be used to specify
250
251<P>
252<PRE> 4 Set user ID
253 2 Set group ID
254 1 Stickey bit
255</PRE>
256<P>
257Options:
258
259<P>
260<PRE> -R Change files and directories recursively.
261
262Example:
263</PRE>
264<P>
265<PRE> $ ls -l /tmp/foo
266 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
267 $ chmod u+x /tmp/foo
268 $ ls -l /tmp/foo
269 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
270 $ chmod 444 /tmp/foo
271 $ ls -l /tmp/foo
272 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
273</PRE>
274<P>
275-------------------------------
276
277<DT><STRONG><A NAME="item_chown">chown</A></STRONG><DD>
278<P>
279Usage: chown [OPTION]... OWNER[&lt;.|:&gt;[GROUP] FILE...
280
281<P>
282Changes the owner and/or group of each FILE to OWNER and/or GROUP.
283
284<P>
285Options:
286
287<P>
288<PRE> -R Changes files and directories recursively
289</PRE>
290<P>
291Example:
292
293<P>
294<PRE> $ ls -l /tmp/foo
295 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
296 $ chown root /tmp/foo
297 $ ls -l /tmp/foo
298 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
299 $ chown root.root /tmp/foo
300 ls -l /tmp/foo
301 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
302</PRE>
303<P>
304-------------------------------
305
306<DT><STRONG><A NAME="item_chroot">chroot</A></STRONG><DD>
307<P>
308Usage: chroot NEWROOT [COMMAND...]
309
310<P>
311Run COMMAND with root directory set to NEWROOT. Example:
312
313<P>
314<PRE> $ ls -l /bin/ls
315 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -&gt; /BusyBox
316 $ mount /dev/hdc1 /mnt -t minix
317 $ chroot /mnt
318 $ ls -l /bin/ls
319 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
320</PRE>
321<P>
322-------------------------------
323
324<DT><STRONG><A NAME="item_clear">clear</A></STRONG><DD>
325<P>
326Clears the screen.
327
328<P>
329-------------------------------
330
331<DT><STRONG><A NAME="item_chvt">chvt</A></STRONG><DD>
332<P>
333Usage: chvt N
334
335<P>
336Changes the foreground virtual terminal to /dev/ttyN
337
338<P>
339-------------------------------
340
341<DT><STRONG><A NAME="item_cp">cp</A></STRONG><DD>
342<P>
343Usage: cp [OPTION]... SOURCE DEST
344
345<P>
346<PRE> or: cp [OPTION]... SOURCE... DIRECTORY
347</PRE>
348<P>
349Copies SOURCE to DEST, or multiple <CODE>SOURCE(s)</CODE> to DIRECTORY.
350
351<P>
352Options:
353
354<P>
355<PRE> -a Same as -dpR
356 -d Preserves links
357 -p Preserves file attributes if possable
358 -R Copies directories recursively
359</PRE>
360<P>
361-------------------------------
362
363<DT><STRONG><A NAME="item_cut">cut</A></STRONG><DD>
364<P>
365Usage: cut [OPTION]... [FILE]...
366
367<P>
368Prints selected fields from each input FILE to standard output.
369
370<P>
371Options:
372
373<P>
374<PRE> -b LIST Output only bytes from LIST
375 -c LIST Output only characters from LIST
376 -d DELIM Use DELIM instead of tab as the field delimiter
377 -f N Print only these fields
378 -n Ignored
379</PRE>
380<P>
381Example:
382
383<P>
384<PRE> $ echo &quot;Hello world&quot; | cut -f 1 -d ' '
385 Hello
386 $ echo &quot;Hello world&quot; | cut -f 2 -d ' '
387 world
388</PRE>
389<P>
390-------------------------------
391
392<DT><STRONG><A NAME="item_date">date</A></STRONG><DD>
393<P>
394Usage: date [OPTION]... [+FORMAT]
395
396<P>
397<PRE> or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
398</PRE>
399<P>
400Displays the current time in the given FORMAT, or sets the system date.
401
402<P>
403Options:
404
405<P>
406<PRE> -R Outputs RFC-822 compliant date string
407 -s Sets time described by STRING
408 -u Prints or sets Coordinated Universal Time
409</PRE>
410<P>
411Example:
412
413<P>
414<PRE> $ date
415 Wed Apr 12 18:52:41 MDT 2000
416</PRE>
417<P>
418-------------------------------
419
420<DT><STRONG><A NAME="item_dd">dd</A></STRONG><DD>
421<P>
422Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
423
424<P>
425Copy a file, converting and formatting according to options
426
427<P>
428<PRE> if=FILE read from FILE instead of stdin
429 of=FILE write to FILE instead of stdout
430 bs=n read and write n bytes at a time
431 count=n copy only n input blocks
432 skip=n skip n input blocks
433 seek=n skip n output blocks
434</PRE>
435<P>
436Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
437Example:
438
439<P>
440<PRE> $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
441 4+0 records in
442 4+0 records out
443</PRE>
444<P>
445-------------------------------
446
447<DT><STRONG><A NAME="item_df">df</A></STRONG><DD>
448<P>
449Usage: df [filesystem ...]
450
451<P>
452Prints the filesystem space used and space available.
453
454<P>
455Example:
456
457<P>
458<PRE> $ df
459 Filesystem 1k-blocks Used Available Use% Mounted on
460 /dev/sda3 8690864 8553540 137324 98% /
461 /dev/sda1 64216 36364 27852 57% /boot
462 $ df /dev/sda3
463 Filesystem 1k-blocks Used Available Use% Mounted on
464 /dev/sda3 8690864 8553540 137324 98% /
465</PRE>
466<P>
467-------------------------------
468
469<DT><STRONG><A NAME="item_dirname">dirname</A></STRONG><DD>
470<P>
471Usage: dirname NAME
472
473<P>
474Strip non-directory suffix from file name
475
476<P>
477Example:
478
479<P>
480<PRE> $ dirname /tmp/foo
481 /tmp
482 $ dirname /tmp/foo/
483 /tmp
484</PRE>
485<P>
486-------------------------------
487
488<DT><STRONG><A NAME="item_dmesg">dmesg</A></STRONG><DD>
489<P>
490Usage: dmesg [<STRONG>-c</STRONG>] [<STRONG>-n</STRONG> level] [<STRONG>-s</STRONG> bufsize] Print or controls the kernel ring buffer.
491
492<P>
493-------------------------------
494
495<DT><STRONG><A NAME="item_du">du</A></STRONG><DD>
496<P>
497Usage: du [OPTION]... [FILE]...
498
499<P>
500Summarize disk space used for each FILE and/or directory. Disk space is
501printed in units of 1k (i.e. 1024 bytes).
502
503<P>
504Options:
505
506<P>
507<PRE> -l count sizes many times if hard linked
508 -s display only a total for each argument
509</PRE>
510<P>
511Example:
512
513<P>
514<PRE> $ ./BusyBox du
515 16 ./CVS
516 12 ./kernel-patches/CVS
517 80 ./kernel-patches
518 12 ./tests/CVS
519 36 ./tests
520 12 ./scripts/CVS
521 16 ./scripts
522 12 ./docs/CVS
523 104 ./docs
524 2417 .
525
526-------------------------------
527</PRE>
528<DT><STRONG><A NAME="item_dutmp">dutmp</A></STRONG><DD>
529<P>
530Usage: dutmp [FILE]
531
532<P>
533Dump utmp file format (pipe delimited) from FILE or stdin to stdout.
534
535<P>
536Example:
537
538<P>
539<PRE> $ dutmp /var/run/utmp
540 8|7||si|||0|0|0|955637625|760097|0
541 2|0|~|~~|reboot||0|0|0|955637625|782235|0
542 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
543 8|125||l4|||0|0|0|955637629|998367|0
544 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
545 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
546 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
547
548-------------------------------
549</PRE>
550<DT><STRONG><A NAME="item_echo">echo</A></STRONG><DD>
551<P>
552Usage: echo [-neE] [ARG ...]
553
554<P>
555Prints the specified ARGs to stdout
556
557<P>
558Options:
559
560<P>
561<PRE> -n suppress trailing newline
562 -e interpret backslash-escaped characters (i.e. \t=tab etc)
563 -E disable interpretation of backslash-escaped characters
564</PRE>
565<P>
566Example:
567
568<P>
569<PRE> $ echo &quot;Erik is cool&quot;
570 Erik is cool
571 $ echo -e &quot;Erik\nis\ncool&quot;
572 Erik
573 is
574 cool
575 $ echo &quot;Erik\nis\ncool&quot;
576 Erik\nis\ncool
577
578-------------------------------
579</PRE>
580<DT><STRONG><A NAME="item_false">false</A></STRONG><DD>
581<P>
582Returns an exit code of FALSE (1)
583
584<P>
585Example:
586
587<P>
588<PRE> $ false
589 $ echo $?
590 1
591</PRE>
592<P>
593-------------------------------
594
595<DT><STRONG><A NAME="item_fbset">fbset</A></STRONG><DD>
596<P>
597Usage: fbset [options] [mode]
598
599<P>
600Show and modify frame buffer device settings
601
602<P>
603Options:
604
605<P>
606<PRE> -h
607 -fb
608 -db
609 -a
610 -i
611 -g
612 -t
613 -accel
614 -hsync
615 -vsync
616 -laced
617 -double
618</PRE>
619<P>
620Example:
621
622<P>
623<PRE> $ fbset
624 mode &quot;1024x768-76&quot;
625 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
626 geometry 1024 768 1024 768 16
627 timings 12714 128 32 16 4 128 4
628 accel false
629 rgba 5/11,6/5,5/0,0/0
630 endmode
631</PRE>
632<P>
633-------------------------------
634
635<DT><STRONG><A NAME="item_fdflush">fdflush</A></STRONG><DD>
636<P>
637Usage: fdflush device
638
639<P>
640Force floppy disk drive to detect disk change
641
642<P>
643-------------------------------
644
645<DT><STRONG><A NAME="item_find">find</A></STRONG><DD>
646<P>
647Usage: find [PATH...] [EXPRESSION]
648
649<P>
650Search for files in a directory hierarchy. The default PATH is the current
651directory; default EXPRESSION is '-print'
652
653<P>
654EXPRESSION may consist of:
655
656<P>
657<PRE> -follow Dereference symbolic links.
658 -name PATTERN File name (leading directories removed) matches PATTERN.
659 -print print the full file name followed by a newline to stdout.
660</PRE>
661<P>
662Example:
663
664<P>
665<PRE> $ find / -name /etc/passwd
666 /etc/passwd
667</PRE>
668<P>
669-------------------------------
670
671<DT><STRONG><A NAME="item_free">free</A></STRONG><DD>
672<P>
673Usage: free
674
675<P>
676Displays the amount of free and used system memory.
677
678<P>
679Example:
680
681<P>
682<PRE> $ free
683 total used free shared buffers
684 Mem: 257628 248724 8904 59644 93124
685 Swap: 128516 8404 120112
686 Total: 386144 257128 129016
687</PRE>
688<P>
689-------------------------------
690
691<DT><STRONG><A NAME="item_freeramdisk">freeramdisk</A></STRONG><DD>
692<P>
693Usage: freeramdisk DEVICE
694
695<P>
696Frees all memory used by the specified ramdisk.
697
698<P>
699Example:
700
701<P>
702<PRE> $ freeramdisk /dev/ram2
703</PRE>
704<P>
705-------------------------------
706
707<DT><STRONG><A NAME="item_deallocvt">deallocvt</A></STRONG><DD>
708<P>
709Usage: deallocvt N
710
711<P>
712Deallocates unused virtual terminal /dev/ttyN
713
714<P>
715-------------------------------
716
717<DT><STRONG><A NAME="item_fsck">fsck.minix</A></STRONG><DD>
718<P>
719Usage: fsck.minix [<STRONG>-larvsmf</STRONG>] /dev/name
720
721<P>
722Performs a consistency check for MINIX filesystems.
723
724<P>
725OPTIONS:
726
727<P>
728<PRE> -l Lists all filenames
729 -r Perform interactive repairs
730 -a Perform automatic repairs
731 -v verbose
732 -s Outputs super-block information
733 -m Activates MINIX-like &quot;mode not cleared&quot; warnings
734 -f Force file system check.
735</PRE>
736<P>
737-------------------------------
738
739<DT><STRONG><A NAME="item_grep">grep</A></STRONG><DD>
740<P>
741Usage: grep [OPTIONS]... PATTERN [FILE]...
742
743<P>
744Search for PATTERN in each FILE or standard input.
745
746<P>
747OPTIONS:
748
749<P>
750<PRE> -h suppress the prefixing filename on output
751 -i ignore case distinctions
752 -n print line number with output lines
753 -q be quiet. Returns 0 if result was found, 1 otherwise
754 -v select non-matching lines
755</PRE>
756<P>
757This version of grep matches full regular expresions.
758
759<P>
760Example:
761
762<P>
763<PRE> $ grep root /etc/passwd
764 root:x:0:0:root:/root:/bin/bash
765 $ grep ^[rR]oo. /etc/passwd
766 root:x:0:0:root:/root:/bin/bash
767</PRE>
768<P>
769-------------------------------
770
771<DT><STRONG><A NAME="item_gunzip">gunzip</A></STRONG><DD>
772<P>
773Usage: gunzip [OPTION]... FILE
774
775<P>
776Uncompress FILE (or standard input if FILE is '-').
777
778<P>
779Options:
780
781<P>
782<PRE> -c Write output to standard output
783 -t Test compressed file integrity
784</PRE>
785<P>
786Example:
787
788<P>
789<PRE> $ ls -la /tmp/BusyBox*
790 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
791 $ gunzip /tmp/BusyBox-0.43.tar.gz
792 $ ls -la /tmp/BusyBox*
793 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
794</PRE>
795<P>
796-------------------------------
797
798<DT><STRONG><A NAME="item_gzip">gzip</A></STRONG><DD>
799<P>
800Usage: gzip [OPTION]... FILE
801
802<P>
803Compress FILE with maximum compression. When FILE is '-', reads standard
804input. Implies <STRONG>-c</STRONG>.
805
806<P>
807Options:
808
809<P>
810<PRE> -c Write output to standard output instead of FILE.gz
811</PRE>
812<P>
813Example:
814
815<P>
816<PRE> $ ls -la /tmp/BusyBox*
817 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
818 $ gzip /tmp/BusyBox-0.43.tar
819 $ ls -la /tmp/BusyBox*
820 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
821</PRE>
822<P>
823-------------------------------
824
825<DT><STRONG><A NAME="item_halt">halt</A></STRONG><DD>
826<P>
827Usage: halt
828
829<P>
830This comand halts the system.
831
832<P>
833-------------------------------
834
835<DT><STRONG><A NAME="item_head">head</A></STRONG><DD>
836<P>
837Usage: head [OPTION] [FILE]...
838
839<P>
840Print first 10 lines of each FILE to standard output. With more than one
841FILE, precede each with a header giving the file name. With no FILE, or
842when FILE is -, read standard input.
843
844<P>
845Options:
846
847<P>
848<PRE> -n NUM Print first NUM lines instead of first 10
849</PRE>
850<P>
851Example:
852
853<P>
854<PRE> $ head -n 2 /etc/passwd
855 root:x:0:0:root:/root:/bin/bash
856 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
857</PRE>
858<P>
859-------------------------------
860
861<DT><STRONG><A NAME="item_hostid">hostid</A></STRONG><DD>
862<P>
863Usage: hostid
864
865<P>
866Prints out a unique 32-bit identifier for the current machine. The 32-bit
867identifier is intended to be unique among all UNIX systems in existence.
868
869<P>
870-------------------------------
871
872<DT><STRONG><A NAME="item_hostname">hostname</A></STRONG><DD>
873<P>
874Usage: hostname [OPTION] {hostname | <STRONG>-F</STRONG> file}
875
876<P>
877Get or set the hostname or DNS domain name. If a hostname is given (or a
878file with the <STRONG>-F</STRONG> parameter), the host name will be set.
879
880<P>
881Options:
882
883<P>
884<PRE> -s Short
885 -i Addresses for the hostname
886 -d DNS domain name
887 -F FILE Use the contents of FILE to specify the hostname
888</PRE>
889<P>
890Example:
891
892<P>
893<PRE> $ hostname
894 slag
895</PRE>
896<P>
897-------------------------------
898
899<DT><STRONG><A NAME="item_id">id</A></STRONG><DD>
900<P>
901Print information for USERNAME or the current user
902
903<P>
904Options:
905
906<P>
907<PRE> -g prints only the group ID
908 -u prints only the user ID
909 -r prints the real user ID instead of the effective ID (with -ug)
910</PRE>
911<P>
912Example:
913
914<P>
915<PRE> $ id
916 uid=1000(andersen) gid=1000(andersen)
917</PRE>
918<P>
919-------------------------------
920
921<DT><STRONG><A NAME="item_init">init</A></STRONG><DD>
922<P>
923Usage: init
924
925<P>
926Init is the parent of all processes.
927
928<P>
929This version of init is designed to be run only by the kernel.
930
931<P>
932BusyBox init doesn't support multiple runlevels. The runlevels field of the
933/etc/inittab file is completely ignored by BusyBox init. If you want
934runlevels, use sysvinit.
935
936<P>
937BusyBox init works just fine without an inittab. If no inittab is found, it
938has the following default behavior:
939
940<P>
941<PRE> ::sysinit:/etc/init.d/rcS
942 ::askfirst:/bin/sh
943</PRE>
944<P>
945if it detects that /dev/console is _not_ a serial console, it will also
946run:
947
948<P>
949<PRE> tty2::askfirst:/bin/sh
950</PRE>
951<P>
952If you choose to use an /etc/inittab file, the inittab entry format is as
953follows:
954
955<P>
956<PRE> &lt;id&gt;:&lt;runlevels&gt;:&lt;action&gt;:&lt;process&gt;
957</PRE>
958<P>
959<PRE> &lt;id&gt;:
960</PRE>
961<P>
962<PRE> WARNING: This field has a non-traditional meaning for BusyBox init!
963 The id field is used by BusyBox init to specify the controlling tty for
964 the specified process to run on. The contents of this field are
965 appended to &quot;/dev/&quot; and used as-is. There is no need for this field to
966 be unique, although if it isn't you may have strange results. If this
967 field is left blank, it is completely ignored. Also note that if
968 BusyBox detects that a serial console is in use, then all entries
969 containing non-empty id fields will _not_ be run. BusyBox init does
970 nothing with utmp. We don't need no stinkin' utmp.
971</PRE>
972<P>
973<PRE> &lt;runlevels&gt;:
974</PRE>
975<P>
976<PRE> The runlevels field is completely ignored.
977</PRE>
978<P>
979<PRE> &lt;action&gt;:
980</PRE>
981<P>
982<PRE> Valid actions include: sysinit, respawn, askfirst, wait,
983 once, and ctrlaltdel.
984</PRE>
985<P>
986<PRE> askfirst acts just like respawn, but before running the specified
987 process it displays the line &quot;Please press Enter to activate this
988 console.&quot; and then waits for the user to press enter before starting
989 the specified process.
990</PRE>
991<P>
992<PRE> Unrecognised actions (like initdefault) will cause init to emit
993 an error message, and then go along with its business.
994</PRE>
995<P>
996<PRE> &lt;process&gt;:
997</PRE>
998<P>
999<PRE> Specifies the process to be executed and it's command line.
1000</PRE>
1001<P>
1002Example /etc/inittab file:
1003
1004<P>
1005<PRE> # This is run first except when booting in single-user mode.
1006 #
1007 ::sysinit:/etc/init.d/rcS
1008</PRE>
1009<P>
1010<PRE> # /bin/sh invocations on selected ttys
1011 #
1012 # Start an &quot;askfirst&quot; shell on the console (whatever that may be)
1013 ::askfirst:/bin/sh
1014 # Start an &quot;askfirst&quot; shell on /dev/tty2
1015 tty2::askfirst:/bin/sh
1016</PRE>
1017<P>
1018<PRE> # /sbin/getty invocations for selected ttys
1019 #
1020 tty4::respawn:/sbin/getty 38400 tty4
1021 tty5::respawn:/sbin/getty 38400 tty5
1022</PRE>
1023<P>
1024<PRE> # Example of how to put a getty on a serial line (for a terminal)
1025 #
1026 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
1027 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
1028 #
1029 # Example how to put a getty on a modem line.
1030 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
1031</PRE>
1032<P>
1033<PRE> # Stuff to do before rebooting
1034 ::ctrlaltdel:/bin/umount -a -r &gt; /dev/null 2&gt;&amp;1
1035 ::ctrlaltdel:/sbin/swapoff -a &gt; /dev/null 2&gt;&amp;1
1036</PRE>
1037<P>
1038-------------------------------
1039
1040<DT><STRONG><A NAME="item_kill">kill</A></STRONG><DD>
1041<P>
1042Usage: kill [<STRONG>-signal</STRONG>] process-id [process-id ...]
1043
1044<P>
1045Send a signal (default is SIGTERM) to the specified
1046<CODE>process(es).</CODE>
1047
1048<P>
1049Options:
1050
1051<P>
1052<PRE> -l List all signal names and numbers.
1053</PRE>
1054<P>
1055Example:
1056
1057<P>
1058<PRE> $ ps | grep apache
1059 252 root root S [apache]
1060 263 www-data www-data S [apache]
1061 264 www-data www-data S [apache]
1062 265 www-data www-data S [apache]
1063 266 www-data www-data S [apache]
1064 267 www-data www-data S [apache]
1065 $ kill 252
1066</PRE>
1067<P>
1068-------------------------------
1069
1070<DT><STRONG><A NAME="item_killall">killall</A></STRONG><DD>
1071<P>
1072Usage: killall [<STRONG>-signal</STRONG>] process-name [process-name ...]
1073
1074<P>
1075Send a signal (default is SIGTERM) to the specified
1076<CODE>process(es).</CODE>
1077
1078<P>
1079Options:
1080
1081<P>
1082<PRE> -l List all signal names and numbers.
1083</PRE>
1084<P>
1085Example:
1086
1087<P>
1088<PRE> $ killall apache
1089</PRE>
1090<P>
1091-------------------------------
1092
1093<DT><STRONG><A NAME="item_length">length</A></STRONG><DD>
1094<P>
1095Usage: length STRING
1096
1097<P>
1098Prints out the length of the specified STRING.
1099
1100<P>
1101Example:
1102
1103<P>
1104<PRE> $ length &quot;Hello&quot;
1105 5
1106</PRE>
1107<P>
1108-------------------------------
1109
1110<DT><STRONG><A NAME="item_ln">ln</A></STRONG><DD>
1111<P>
1112Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
1113
1114<P>
1115Create a link named LINK_NAME or DIRECTORY to the specified TARGET Options:
1116
1117<P>
1118<PRE> -s make symbolic links instead of hard links
1119 -f remove existing destination files
1120
1121Example:
1122</PRE>
1123<P>
1124<PRE> $ ln -s BusyBox /tmp/ls
1125 $ ls -l /tmp/ls
1126 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -&gt; BusyBox*
1127</PRE>
1128<P>
1129-------------------------------
1130
1131<DT><STRONG><A NAME="item_loadacm">loadacm</A></STRONG><DD>
1132<P>
1133Usage: loadacm
1134
1135<P>
1136Loads an acm from standard input.
1137
1138<P>
1139Example:
1140
1141<P>
1142<PRE> $ loadacm &lt; /etc/i18n/acmname
1143</PRE>
1144<P>
1145-------------------------------
1146
1147<DT><STRONG><A NAME="item_loadfont">loadfont</A></STRONG><DD>
1148<P>
1149Usage: loadfont
1150
1151<P>
1152Loads a console font from standard input.
1153
1154<P>
1155Example:
1156
1157<P>
1158<PRE> $ loadfont &lt; /etc/i18n/fontname
1159</PRE>
1160<P>
1161-------------------------------
1162
1163<DT><STRONG><A NAME="item_loadkmap">loadkmap</A></STRONG><DD>
1164<P>
1165Usage: loadkmap
1166
1167<P>
1168Loads a binary keyboard translation table from standard input.
1169
1170<P>
1171Example:
1172
1173<P>
1174<PRE> $ loadkmap &lt; /etc/i18n/lang-keymap
1175</PRE>
1176<P>
1177-------------------------------
1178
1179<DT><STRONG><A NAME="item_logger">logger</A></STRONG><DD>
1180<P>
1181Usage: logger [OPTION]... [MESSAGE]
1182
1183<P>
1184Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
1185
1186<P>
1187Options:
1188
1189<P>
1190<PRE> -s Log to stderr as well as the system log.
1191 -t Log using the specified tag (defaults to user name).
1192 -p Enter the message with the specified priority.
1193 This may be numerical or a ``facility.level'' pair.
1194</PRE>
1195<P>
1196Example:
1197
1198<P>
1199<PRE> $ logger &quot;hello&quot;
1200</PRE>
1201<P>
1202-------------------------------
1203
1204<DT><STRONG><A NAME="item_logname">logname</A></STRONG><DD>
1205<P>
1206Usage: logname
1207
1208<P>
1209Print the name of the current user.
1210
1211<P>
1212Example:
1213
1214<P>
1215<PRE> $ logname
1216 root
1217</PRE>
1218<P>
1219-------------------------------
1220
1221<DT><STRONG><A NAME="item_ls">ls</A></STRONG><DD>
1222<P>
1223Usage: ls [<STRONG>-1acdelnpuxACF</STRONG>] [filenames...]
1224
1225<P>
1226Options:
1227
1228<P>
1229<PRE> -a do not hide entries starting with .
1230 -c with -l: show ctime (the time of last
1231 modification of file status information)
1232 -d list directory entries instead of contents
1233 -e list both full date and full time
1234 -l use a long listing format
1235 -n list numeric UIDs and GIDs instead of names
1236 -p append indicator (one of /=@|) to entries
1237 -u with -l: show access time (the time of last
1238 access of the file)
1239 -x list entries by lines instead of by columns
1240 -A do not list implied . and ..
1241 -C list entries by columns
1242 -F append indicator (one of */=@|) to entries
1243</PRE>
1244<P>
1245-------------------------------
1246
1247<DT><STRONG><A NAME="item_lsmod">lsmod</A></STRONG><DD>
1248<P>
1249Usage: lsmod
1250
1251<P>
1252Shows a list of all currently loaded kernel modules.
1253
1254<P>
1255-------------------------------
1256
1257<DT><STRONG><A NAME="item_makedevs">makedevs</A></STRONG><DD>
1258<P>
1259Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
1260
1261<P>
1262Creates a range of block or character special files
1263
1264<P>
1265TYPEs include:
1266
1267<P>
1268<PRE> b: Make a block (buffered) device.
1269 c or u: Make a character (un-buffered) device.
1270 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
1271</PRE>
1272<P>
1273FIRST specifies the number appended to NAME to create the first device.
1274LAST specifies the number of the last item that should be created. If 's'
1275is the last argument, the base device is created as well.
1276
1277<P>
1278Example:
1279
1280<P>
1281<PRE> $ makedevs /dev/ttyS c 4 66 2 63
1282 [creates ttyS2-ttyS63]
1283 $ makedevs /dev/hda b 3 0 0 8 s
1284 [creates hda,hda1-hda8]
1285</PRE>
1286<P>
1287-------------------------------
1288
1289<DT><STRONG><A NAME="item_math">math</A></STRONG><DD>
1290<P>
1291Usage: math expression ...
1292
1293<P>
1294This is a Tiny RPN calculator that understands the following operations: +,
1295-, /, *, and, or, not, eor.
1296
1297<P>
1298Example:
1299
1300<P>
1301<PRE> $ math 2 2 add
1302 4
1303 $ math 8 8 \* 2 2 + /
1304 16
1305 $ math 0 1 and
1306 0
1307 $ math 0 1 or
1308 1
1309</PRE>
1310<P>
1311-------------------------------
1312
1313<DT><STRONG><A NAME="item_mkdir">mkdir</A></STRONG><DD>
1314<P>
1315Usage: mkdir [OPTION] DIRECTORY...
1316
1317<P>
1318Create the <CODE>DIRECTORY(ies),</CODE> if they do not already exist
1319
1320<P>
1321Options:
1322
1323<P>
1324<PRE> -m set permission mode (as in chmod), not rwxrwxrwx - umask
1325 -p no error if dir exists, make parent directories as needed
1326</PRE>
1327<P>
1328Example:
1329
1330<P>
1331<PRE> $ mkdir /tmp/foo
1332 $ mkdir /tmp/foo
1333 /tmp/foo: File exists
1334 $ mkdir /tmp/foo/bar/baz
1335 /tmp/foo/bar/baz: No such file or directory
1336 $ mkdir -p /tmp/foo/bar/baz
1337</PRE>
1338<P>
1339-------------------------------
1340
1341<DT><STRONG><A NAME="item_mkfifo">mkfifo</A></STRONG><DD>
1342<P>
1343Usage: mkfifo [OPTIONS] name
1344
1345<P>
1346Creates a named pipe (identical to 'mknod name p')
1347
1348<P>
1349Options:
1350
1351<P>
1352<PRE> -m create the pipe using the specified mode (default a=rw)
1353</PRE>
1354<P>
1355-------------------------------
1356
1357<DT><STRONG><A NAME="item_mkfs">mkfs.minix</A></STRONG><DD>
1358<P>
1359Usage: mkfs.minix [<STRONG>-c</STRONG> | <STRONG>-l</STRONG> filename] [<STRONG>-nXX</STRONG>] [<STRONG>-iXX</STRONG>] /dev/name [blocks]
1360
1361<P>
1362Make a MINIX filesystem.
1363
1364<P>
1365OPTIONS:
1366
1367<P>
1368<PRE> -c Check the device for bad blocks
1369 -n [14|30] Specify the maximum length of filenames
1370 -i Specify the number of inodes for the filesystem
1371 -l FILENAME Read the bad blocks list from FILENAME
1372 -v Make a Minix version 2 filesystem
1373</PRE>
1374<P>
1375-------------------------------
1376
1377<DT><STRONG><A NAME="item_mknod">mknod</A></STRONG><DD>
1378<P>
1379Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
1380
1381<P>
1382Create a special file (block, character, or pipe).
1383
1384<P>
1385Options:
1386
1387<P>
1388<PRE> -m create the special file using the specified mode (default a=rw)
1389</PRE>
1390<P>
1391TYPEs include: b: Make a block (buffered) device. c or u: Make a character
1392(un-buffered) device. p: Make a named pipe. MAJOR and MINOR are ignored for
1393named pipes.
1394
1395<P>
1396Example:
1397
1398<P>
1399<PRE> $ mknod /dev/fd0 b 2 0
1400 $ mknod -m 644 /tmp/pipe p
1401</PRE>
1402<P>
1403-------------------------------
1404
1405<DT><STRONG><A NAME="item_mkswap">mkswap</A></STRONG><DD>
1406<P>
1407Usage: mkswap [<STRONG>-c</STRONG>] [<STRONG>-v0</STRONG>|<STRONG>-v1</STRONG>] device [block-count]
1408
1409<P>
1410Prepare a disk partition to be used as a swap partition.
1411
1412<P>
1413Options:
1414
1415<P>
1416<PRE> -c Check for read-ability.
1417 -v0 Make version 0 swap [max 128 Megs].
1418 -v1 Make version 1 swap [big!] (default for kernels &gt; 2.1.117).
1419 block-count Number of block to use (default is entire partition).
1420</PRE>
1421<P>
1422-------------------------------
1423
1424<DT><STRONG><A NAME="item_mktemp">mktemp</A></STRONG><DD>
1425<P>
1426Usage: mktemp [<STRONG>-q</STRONG>] TEMPLATE
1427
1428<P>
1429Creates a temporary file with its name based on TEMPLATE. TEMPLATE is any
1430name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1431
1432<P>
1433Example:
1434
1435<P>
1436<PRE> $ mktemp /tmp/temp.XXXXXX
1437 /tmp/temp.mWiLjM
1438 $ ls -la /tmp/temp.mWiLjM
1439 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1440</PRE>
1441<P>
1442-------------------------------
1443
1444<DT><STRONG><A NAME="item_nc">nc</A></STRONG><DD>
1445<P>
1446Usage: nc [IP] [port]
1447
1448<P>
1449Netcat opens a pipe to IP:port
1450
1451<P>
1452Example:
1453
1454<P>
1455<PRE> $ nc foobar.somedomain.com 25
1456 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1457 help
1458 214-Commands supported:
1459 214- HELO EHLO MAIL RCPT DATA AUTH
1460 214 NOOP QUIT RSET HELP
1461 quit
1462 221 foobar closing connection
1463
1464-------------------------------
1465</PRE>
1466<DT><STRONG><A NAME="item_more">more</A></STRONG><DD>
1467<P>
1468Usage: more [file ...]
1469
1470<P>
1471More is a filter for paging through text one screenful at a time.
1472
1473<P>
1474Example:
1475
1476<P>
1477<PRE> $ dmesg | more
1478</PRE>
1479<P>
1480-------------------------------
1481
1482<DT><STRONG><A NAME="item_mount">mount</A></STRONG><DD>
1483<P>
1484Usage: mount [flags] mount [flags] device directory [<STRONG>-o</STRONG> options,more-options]
1485
1486<P>
1487Flags:
1488
1489<P>
1490<PRE> -a: Mount all file systems in fstab.
1491 -o option: One of many filesystem options, listed below.
1492 -r: Mount the filesystem read-only.
1493 -t fs-type: Specify the filesystem type.
1494 -w: Mount for reading and writing (default).
1495</PRE>
1496<P>
1497Options for use with the ``<STRONG>-o</STRONG>'' flag:
1498
1499<P>
1500<PRE> async/sync: Writes are asynchronous / synchronous.
1501 atime/noatime: Enable / disable updates to inode access times.
1502 dev/nodev: Allow use of special device files / disallow them.
1503 exec/noexec: Allow use of executable files / disallow them.
1504 loop: Mounts a file via loop device.
1505 suid/nosuid: Allow set-user-id-root programs / disallow them.
1506 remount: Re-mount a currently-mounted filesystem, changing its flags.
1507 ro/rw: Mount for read-only / read-write.
1508 There are EVEN MORE flags that are specific to each filesystem.
1509 You'll have to see the written documentation for those.
1510</PRE>
1511<P>
1512Example:
1513
1514<P>
1515<PRE> $ mount
1516 /dev/hda3 on / type minix (rw)
1517 proc on /proc type proc (rw)
1518 devpts on /dev/pts type devpts (rw)
1519 $ mount /dev/fd0 /mnt -t msdos -o ro
1520 $ mount /tmp/diskimage /opt -t ext2 -o loop
1521</PRE>
1522<P>
1523-------------------------------
1524
1525<DT><STRONG><A NAME="item_mt">mt</A></STRONG><DD>
1526<P>
1527Usage: mt [<STRONG>-f</STRONG> device] opcode value
1528
1529<P>
1530Control magnetic tape drive operation
1531
1532<P>
1533-------------------------------
1534
1535<DT><STRONG><A NAME="item_mv">mv</A></STRONG><DD>
1536<P>
1537Usage: mv SOURCE DEST
1538
1539<P>
1540<PRE> or: mv SOURCE... DIRECTORY
1541</PRE>
1542<P>
1543Rename SOURCE to DEST, or move <CODE>SOURCE(s)</CODE> to DIRECTORY.
1544
1545<P>
1546Example:
1547
1548<P>
1549<PRE> $ mv /tmp/foo /bin/bar
1550</PRE>
1551<P>
1552-------------------------------
1553
1554<DT><STRONG><A NAME="item_nslookup">nslookup</A></STRONG><DD>
1555<P>
1556Usage: nslookup [HOST]
1557
1558<P>
1559Queries the nameserver for the IP address of the given HOST
1560
1561<P>
1562Example:
1563
1564<P>
1565<PRE> $ nslookup localhost
1566 Server: default
1567 Address: default
1568</PRE>
1569<P>
1570<PRE> Name: debian
1571 Address: 127.0.0.1
1572</PRE>
1573<P>
1574-------------------------------
1575
1576<DT><STRONG><A NAME="item_ping">ping</A></STRONG><DD>
1577<P>
1578Usage: ping [OPTION]... host
1579
1580<P>
1581Send ICMP ECHO_REQUEST packets to network hosts.
1582
1583<P>
1584Options:
1585
1586<P>
1587<PRE> -c COUNT Send only COUNT pings.
1588 -q Quiet mode, only displays output at start
1589 and when finished.
1590Example:
1591</PRE>
1592<P>
1593<PRE> $ ping localhost
1594 PING slag (127.0.0.1): 56 data bytes
1595 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1596</PRE>
1597<P>
1598<PRE> --- debian ping statistics ---
1599 1 packets transmitted, 1 packets received, 0% packet loss
1600 round-trip min/avg/max = 20.1/20.1/20.1 ms
1601</PRE>
1602<P>
1603-------------------------------
1604
1605<DT><STRONG><A NAME="item_poweroff">poweroff</A></STRONG><DD>
1606<P>
1607Shuts down the system, and requests that the kernel turn off power upon
1608halting.
1609
1610<P>
1611-------------------------------
1612
1613<DT><STRONG><A NAME="item_printf">printf</A></STRONG><DD>
1614<P>
1615Usage: printf format [argument...]
1616
1617<P>
1618Formats and prints the given data in a manner similar to the C printf
1619command.
1620
1621<P>
1622Example:
1623
1624<P>
1625<PRE> $ printf &quot;Val=%d\n&quot; 5
1626 Val=5
1627</PRE>
1628<P>
1629-------------------------------
1630
1631<DT><STRONG><A NAME="item_ps">ps</A></STRONG><DD>
1632<P>
1633Usage: ps
1634
1635<P>
1636Report process status
1637
1638<P>
1639This version of ps accepts no options.
1640
1641<P>
1642Example:
1643
1644<P>
1645<PRE> $ ps
1646 PID Uid Gid State Command
1647 1 root root S init
1648 2 root root S [kflushd]
1649 3 root root S [kupdate]
1650 4 root root S [kpiod]
1651 5 root root S [kswapd]
1652 742 andersen andersen S [bash]
1653 743 andersen andersen S -bash
1654 745 root root S [getty]
1655 2990 andersen andersen R ps
1656</PRE>
1657<P>
1658-------------------------------
1659
1660<DT><STRONG><A NAME="item_pwd">pwd</A></STRONG><DD>
1661<P>
1662Prints the full filename of the current working directory.
1663
1664<P>
1665Example:
1666
1667<P>
1668<PRE> $ pwd
1669 /root
1670</PRE>
1671<P>
1672-------------------------------
1673
1674<DT><STRONG><A NAME="item_reboot">reboot</A></STRONG><DD>
1675<P>
1676Instructs the kernel to reboot the system.
1677
1678<P>
1679-------------------------------
1680
1681<DT><STRONG><A NAME="item_rm">rm</A></STRONG><DD>
1682<P>
1683Usage: rm [OPTION]... FILE...
1684
1685<P>
1686Remove (unlink) the <CODE>FILE(s).</CODE>
1687
1688<P>
1689Options:
1690
1691<P>
1692<PRE> -f remove existing destinations, never prompt
1693 -r or -R remove the contents of directories recursively
1694</PRE>
1695<P>
1696Example:
1697
1698<P>
1699<PRE> $ rm -rf /tmp/foo
1700</PRE>
1701<P>
1702-------------------------------
1703
1704<DT><STRONG><A NAME="item_rmdir">rmdir</A></STRONG><DD>
1705<P>
1706Usage: rmdir [OPTION]... DIRECTORY...
1707
1708<P>
1709Remove the <CODE>DIRECTORY(ies),</CODE> if they are empty.
1710
1711<P>
1712Example:
1713
1714<P>
1715<PRE> # rmdir /tmp/foo
1716</PRE>
1717<P>
1718-------------------------------
1719
1720<DT><STRONG><A NAME="item_rmmod">rmmod</A></STRONG><DD>
1721<P>
1722Usage: rmmod [OPTION]... [MODULE]...
1723
1724<P>
1725Unloads the specified kernel modules from the kernel.
1726
1727<P>
1728Options:
1729
1730<P>
1731<PRE> -a Try to remove all unused kernel modules.
1732</PRE>
1733<P>
1734Example:
1735
1736<P>
1737<PRE> $ rmmod tulip
1738</PRE>
1739<P>
1740-------------------------------
1741
1742<DT><STRONG><A NAME="item_sed">sed</A></STRONG><DD>
1743<P>
1744Usage: sed [<STRONG>-n</STRONG>] <STRONG>-e</STRONG> script [file...]
1745
1746<P>
1747Allowed sed scripts come in the following form:
1748
1749<P>
1750<PRE> 'ADDR [!] COMMAND'
1751</PRE>
1752<P>
1753<PRE> where address ADDR can be:
1754 NUMBER Match specified line number
1755 $ Match last line
1756 /REGEXP/ Match specified regexp
1757 (! inverts the meaning of the match)
1758</PRE>
1759<P>
1760<PRE> and COMMAND can be:
1761 s/regexp/replacement/[igp]
1762 which attempt to match regexp against the pattern space
1763 and if successful replaces the matched portion with replacement.
1764</PRE>
1765<P>
1766<PRE> aTEXT
1767 which appends TEXT after the pattern space
1768</PRE>
1769<P>
1770Options:
1771
1772<P>
1773<PRE> -e add the script to the commands to be executed
1774 -n suppress automatic printing of pattern space
1775</PRE>
1776<P>
1777This version of sed matches full regular expresions.
1778
1779<P>
1780Example:
1781
1782<P>
1783<PRE> $ echo &quot;foo&quot; | sed -e 's/f[a-zA-Z]o/bar/g'
1784 bar
1785</PRE>
1786<P>
1787-------------------------------
1788
1789<DT><STRONG><A NAME="item_setkeycodes">setkeycodes</A></STRONG><DD>
1790<P>
1791Usage: setkeycodes SCANCODE KEYCODE ...
1792
1793<P>
1794Set entries into the kernel's scancode-to-keycode map, allowing unusual
1795keyboards to generate usable keycodes.
1796
1797<P>
1798SCANCODE may be either xx or e0xx (hexadecimal), and KEYCODE is given in
1799decimal
1800
1801<P>
1802Example:
1803
1804<P>
1805<PRE> # setkeycodes e030 127
1806</PRE>
1807<P>
1808-------------------------------
1809
1810<DT><STRONG><A NAME="item_sh">sh</A></STRONG><DD>
1811<P>
1812Usage: sh
1813
1814<P>
1815lash -- the BusyBox LAme SHell (command interpreter)
1816
1817<P>
1818This command does not yet have proper documentation.
1819
1820<P>
1821Use lash just as you would use any other shell. It properly handles pipes,
1822redirects, job control, can be used as the shell for scripts (#!/bin/sh),
1823and has a sufficient set of builtins to do what is needed. It does not
1824(yet) support Bourne Shell syntax. If you need things like
1825``if-then-else'', ``while'', and such, use ash or bash. If you just need a
1826very simple and extremely small shell, this will do the job.
1827
1828<P>
1829-------------------------------
1830
1831<DT><STRONG><A NAME="item_sfdisk">sfdisk</A></STRONG><DD>
1832<P>
1833Usage: sfdisk [options] device ...
1834
1835<P>
1836device: something like /dev/hda or /dev/sda
1837
1838<P>
1839useful options:
1840
1841<P>
1842<PRE> -s [or --show-size]: list size of a partition
1843 -c [or --id]: print or change partition Id
1844 -l [or --list]: list partitions of each device
1845 -d [or --dump]: idem, but in a format suitable for later input
1846 -i [or --increment]: number cylinders etc. from 1 instead of from 0
1847 -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB
1848 -T [or --list-types]:list the known partition types
1849 -D [or --DOS]: for DOS-compatibility: waste a little space
1850 -R [or --re-read]: make kernel reread partition table
1851 -N# : change only the partition with number #
1852 -n : do not actually write to disk
1853 -O file : save the sectors that will be overwritten to file
1854 -I file : restore these sectors again
1855 -v [or --version]: print version
1856 -? [or --help]: print this message
1857</PRE>
1858<P>
1859dangerous options:
1860
1861<P>
1862<PRE> -g [or --show-geometry]: print the kernel's idea of the geometry
1863 -x [or --show-extended]: also list extended partitions on output
1864</PRE>
1865<P>
1866<PRE> or expect descriptors for them on input
1867 -L [or --Linux]: do not complain about things irrelevant for Linux
1868 -q [or --quiet]: suppress warning messages
1869 You can override the detected geometry using:
1870 -C# [or --cylinders #]:set the number of cylinders to use
1871 -H# [or --heads #]: set the number of heads to use
1872 -S# [or --sectors #]: set the number of sectors to use
1873</PRE>
1874<P>
1875You can disable all consistency checking with:
1876
1877<P>
1878<PRE> -f [or --force]: do what I say, even if it is stupid
1879</PRE>
1880<P>
1881-------------------------------
1882
1883<DT><STRONG><A NAME="item_sleep">sleep</A></STRONG><DD>
1884<P>
1885Usage: sleep N
1886
1887<P>
1888Pause for N seconds.
1889
1890<P>
1891Example:
1892
1893<P>
1894<PRE> $ sleep 2
1895 [2 second delay results]
1896</PRE>
1897<P>
1898-------------------------------
1899
1900<DT><STRONG><A NAME="item_sort">sort</A></STRONG><DD>
1901<P>
1902Usage: sort [<STRONG>-n</STRONG>] [<STRONG>-r</STRONG>] [FILE]...
1903
1904<P>
1905Sorts lines of text in the specified files
1906
1907<P>
1908Example:
1909
1910<P>
1911<PRE> $ echo -e &quot;e\nf\nb\nd\nc\na&quot; | sort
1912 a
1913 b
1914 c
1915 d
1916 e
1917 f
1918</PRE>
1919<P>
1920-------------------------------
1921
1922<DT><STRONG><A NAME="item_sync">sync</A></STRONG><DD>
1923<P>
1924Usage: sync
1925
1926<P>
1927Write all buffered filesystem blocks to disk.
1928
1929<P>
1930-------------------------------
1931
1932<DT><STRONG><A NAME="item_syslogd">syslogd</A></STRONG><DD>
1933<P>
1934Usage: syslogd [OPTION]...
1935
1936<P>
1937Linux system and kernel (provides klogd) logging utility. Note that this
1938version of syslogd/klogd ignores /etc/syslog.conf.
1939
1940<P>
1941Options:
1942
1943<P>
1944<PRE> -m Change the mark timestamp interval. default=20min. 0=off
1945 -n Do not fork into the background (for when run by init)
1946 -K Do not start up the klogd process (by default syslogd spawns klogd).
1947 -O Specify an alternate log file. default=/var/log/messages
1948</PRE>
1949<P>
1950-------------------------------
1951
1952<DT><STRONG><A NAME="item_swapon">swapon</A></STRONG><DD>
1953<P>
1954Usage: swapon [OPTION] [device]
1955
1956<P>
1957Start swapping virtual memory pages on the given device.
1958
1959<P>
1960Options:
1961
1962<P>
1963<PRE> -a Start swapping on all swap devices
1964</PRE>
1965<P>
1966-------------------------------
1967
1968<DT><STRONG><A NAME="item_swapoff">swapoff</A></STRONG><DD>
1969<P>
1970Usage: swapoff [OPTION] [device]
1971
1972<P>
1973Stop swapping virtual memory pages on the given device.
1974
1975<P>
1976Options:
1977
1978<P>
1979<PRE> -a Stop swapping on all swap devices
1980</PRE>
1981<P>
1982-------------------------------
1983
1984<DT><STRONG><A NAME="item_tail">tail</A></STRONG><DD>
1985<P>
1986Usage: tail [OPTION] [FILE]...
1987
1988<P>
1989Print last 10 lines of each FILE to standard output. With more than one
1990FILE, precede each with a header giving the file name. With no FILE, or
1991when FILE is -, read standard input.
1992
1993<P>
1994Options:
1995
1996<P>
1997<PRE> -n NUM Print last NUM lines instead of first 10
1998 -f Output data as the file grows. This version
1999 of 'tail -f' supports only one file at a time.
2000</PRE>
2001<P>
2002Example:
2003
2004<P>
2005<PRE> $ tail -n 1 /etc/resolv.conf
2006 nameserver 10.0.0.1
2007</PRE>
2008<P>
2009-------------------------------
2010
2011<DT><STRONG><A NAME="item_tar">tar</A></STRONG><DD>
2012<P>
2013Usage: tar -[cxtvO] [<STRONG>--exclude</STRONG> File] [<STRONG>-f</STRONG> tarFile] [FILE] ...
2014
2015<P>
2016Create, extract, or list files from a tar file. Note that this version of
2017tar treats hard links as separate files.
2018
2019<P>
2020Main operation mode:
2021
2022<P>
2023<PRE> c create
2024 x extract
2025 t list
2026</PRE>
2027<P>
2028File selection:
2029
2030<P>
2031<PRE> f name of tarfile or &quot;-&quot; for stdin
2032 O extract to stdout
2033 --exclude file to exclude
2034</PRE>
2035<P>
2036Informative output:
2037
2038<P>
2039<PRE> v verbosely list files processed
2040</PRE>
2041<P>
2042Example:
2043
2044<P>
2045<PRE> $ zcat /tmp/tarball.tar.gz | tar -xf -
2046 $ tar -cf /tmp/tarball.tar /usr/local
2047</PRE>
2048<P>
2049-------------------------------
2050
2051<DT><STRONG><A NAME="item_test">test, [</A></STRONG><DD>
2052<P>
2053Usage: test EXPRESSION or [ EXPRESSION ]
2054
2055<P>
2056Checks file types and compares values returning an exit code determined by
2057the value of EXPRESSION.
2058
2059<P>
2060Example:
2061
2062<P>
2063<PRE> $ test 1 -eq 2
2064 $ echo $?
2065 1
2066 $ test 1 -eq 1
2067 $ echo $?
2068 0
2069 $ [ -d /etc ]
2070 $ echo $?
2071 0
2072 $ [ -d /junk ]
2073 $ echo $?
2074 1
2075</PRE>
2076<P>
2077-------------------------------
2078
2079<DT><STRONG><A NAME="item_tee">tee</A></STRONG><DD>
2080<P>
2081Usage: tee [OPTION]... [FILE]...
2082
2083<P>
2084Copy standard input to each FILE, and also to standard output.
2085
2086<P>
2087Options:
2088
2089<P>
2090<PRE> -a append to the given FILEs, do not overwrite
2091</PRE>
2092<P>
2093Example:
2094
2095<P>
2096<PRE> $ echo &quot;Hello&quot; | tee /tmp/foo
2097 $ cat /tmp/foo
2098 Hello
2099</PRE>
2100<P>
2101-------------------------------
2102
2103<DT><STRONG><A NAME="item_touch">touch</A></STRONG><DD>
2104<P>
2105Usage: touch [<STRONG>-c</STRONG>] file [file ...]
2106
2107<P>
2108Update the last-modified date on (or create) the selected file[s].
2109
2110<P>
2111Example:
2112
2113<P>
2114<PRE> $ ls -l /tmp/foo
2115 /bin/ls: /tmp/foo: No such file or directory
2116 $ touch /tmp/foo
2117 $ ls -l /tmp/foo
2118 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
2119</PRE>
2120<P>
2121-------------------------------
2122
2123<DT><STRONG><A NAME="item_tr">tr</A></STRONG><DD>
2124<P>
2125Usage: tr [-cds] STRING1 [STRING2]
2126
2127<P>
2128Translate, squeeze, and/or delete characters from standard input, writing
2129to standard output.
2130
2131<P>
2132Options:
2133
2134<P>
2135<PRE> -c take complement of STRING1
2136 -d delete input characters coded STRING1
2137 -s squeeze multiple output characters of STRING2 into one character
2138</PRE>
2139<P>
2140Example:
2141
2142<P>
2143<PRE> $ echo &quot;gdkkn vnqkc&quot; | tr [a-y] [b-z]
2144 hello world
2145</PRE>
2146<P>
2147-------------------------------
2148
2149<DT><STRONG><A NAME="item_true">true</A></STRONG><DD>
2150<P>
2151Returns an exit code of TRUE (0)
2152
2153<P>
2154Example:
2155
2156<P>
2157<PRE> $ true
2158 $ echo $?
2159 0
2160</PRE>
2161<P>
2162-------------------------------
2163
2164<DT><STRONG><A NAME="item_tty">tty</A></STRONG><DD>
2165<P>
2166Usage: tty
2167
2168<P>
2169Print the file name of the terminal connected to standard input.
2170
2171<P>
2172Options:
2173
2174<P>
2175<PRE> -s print nothing, only return an exit status
2176</PRE>
2177<P>
2178Example:
2179
2180<P>
2181<PRE> $ tty
2182 /dev/tty2
2183</PRE>
2184<P>
2185-------------------------------
2186
2187<DT><STRONG><A NAME="item_umount">umount</A></STRONG><DD>
2188<P>
2189Usage: umount [flags] filesystem|directory
2190
2191<P>
2192Flags:
2193
2194<P>
2195<PRE> -a: Unmount all file systems
2196 -r: Try to remount devices as read-only if mount is busy
2197 -f: Force filesystem umount (i.e. unreachable NFS server)
2198 -l: Do not free loop device (if a loop device has been used)
2199</PRE>
2200<P>
2201Example:
2202
2203<P>
2204<PRE> $ umount /dev/hdc1
2205</PRE>
2206<P>
2207-------------------------------
2208
2209<DT><STRONG><A NAME="item_uname">uname</A></STRONG><DD>
2210<P>
2211Usage: uname [OPTION]...
2212
2213<P>
2214Print certain system information. With no OPTION, same as <STRONG>-s</STRONG>.
2215
2216<P>
2217Options:
2218
2219<P>
2220<PRE> -a print all information
2221 -m the machine (hardware) type
2222 -n print the machine's network node hostname
2223 -r print the operating system release
2224 -s print the operating system name
2225 -p print the host processor type
2226 -v print the operating system version
2227</PRE>
2228<P>
2229Example:
2230
2231<P>
2232<PRE> $ uname -a
2233 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
2234</PRE>
2235<P>
2236-------------------------------
2237
2238<DT><STRONG><A NAME="item_uniq">uniq</A></STRONG><DD>
2239<P>
2240Usage: uniq [OPTION]... [INPUT [OUTPUT]]
2241
2242<P>
2243Discard all but one of successive identical lines from INPUT (or standard
2244input), writing to OUTPUT (or standard output).
2245
2246<P>
2247Example:
2248
2249<P>
2250<PRE> $ echo -e &quot;a\na\nb\nc\nc\na&quot; | sort | uniq
2251 a
2252 b
2253 c
2254</PRE>
2255<P>
2256-------------------------------
2257
2258<DT><STRONG><A NAME="item_update">update</A></STRONG><DD>
2259<P>
2260Usage: update [options]
2261
2262<P>
2263Periodically flushes filesystem buffers.
2264
2265<P>
2266Options:
2267
2268<P>
2269<PRE> -S force use of sync(2) instead of flushing
2270 -s SECS call sync this often (default 30)
2271 -f SECS flush some buffers this often (default 5)
2272</PRE>
2273<P>
2274-------------------------------
2275
2276<DT><STRONG><A NAME="item_uptime">uptime</A></STRONG><DD>
2277<P>
2278Usage: uptime
2279
2280<P>
2281Tells how long the system has been running since boot.
2282
2283<P>
2284Example:
2285
2286<P>
2287<PRE> $ uptime
2288 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
2289</PRE>
2290<P>
2291-------------------------------
2292
2293<DT><STRONG><A NAME="item_usleep">usleep</A></STRONG><DD>
2294<P>
2295Usage: usleep N
2296
2297<P>
2298Pauses for N microseconds.
2299
2300<P>
2301Example:
2302
2303<P>
2304<PRE> $ usleep 1000000
2305 [pauses for 1 second]
2306</PRE>
2307<P>
2308-------------------------------
2309
2310<DT><STRONG><A NAME="item_wc">wc</A></STRONG><DD>
2311<P>
2312Usage: wc [OPTION]... [FILE]...
2313
2314<P>
2315Print line, word, and byte counts for each FILE, and a total line if more
2316than one FILE is specified. With no FILE, read standard input.
2317
2318<P>
2319Options:
2320
2321<P>
2322<PRE> -c print the byte counts
2323 -l print the newline counts
2324 -L print the length of the longest line
2325 -w print the word counts
2326</PRE>
2327<P>
2328Example:
2329
2330<P>
2331<PRE> $ wc /etc/passwd
2332 31 46 1365 /etc/passwd
2333</PRE>
2334<P>
2335-------------------------------
2336
2337<DT><STRONG><A NAME="item_whoami">whoami</A></STRONG><DD>
2338<P>
2339Usage: whoami
2340
2341<P>
2342Prints the user name associated with the current effective user id.
2343
2344<P>
2345Example:
2346
2347<P>
2348<PRE> $ whoami
2349 andersen
2350</PRE>
2351<P>
2352-------------------------------
2353
2354<DT><STRONG><A NAME="item_yes">yes</A></STRONG><DD>
2355<P>
2356Usage: yes [OPTION]... [STRING]...
2357
2358<P>
2359Repeatedly outputs a line with all specified <CODE>STRING(s),</CODE> or
2360`y'.
2361
2362<P>
2363-------------------------------
2364
2365<DT><STRONG><A NAME="item_zcat">zcat</A></STRONG><DD>
2366<P>
2367This is essentially an alias for invoking ``gunzip <STRONG>-c</STRONG>'', where it decompresses the file inquestion and send the output to
2368stdout.
2369
2370<P>
2371-------------------------------
2372
2373</DL>
2374<P>
2375<HR>
2376<H1><A NAME="LIBC_NSS">LIBC NSS</A></H1>
2377<P>
2378GNU Libc uses the Name Service Switch (NSS) to configure the behavior of
2379the C library for the local environment, and to configure how it reads
2380system data, such as passwords and group information. BusyBox has made it
2381Policy that it will never use NSS, and will never use and libc calls that
2382make use of NSS. This allows you to run an embedded system without the need
2383for installing an /etc/nsswitch.conf file and without and /lib/libnss_*
2384libraries installed.
2385
2386<P>
2387If you are using a system that is using a remote LDAP server for
2388authentication via GNU libc NSS, and you want to use BusyBox, then you will
2389need to adjust the BusyBox source. Chances are though, that if you have
2390enough space to install of that stuff on your system, then you probably
2391want the full GNU utilities.
2392
2393<P>
2394<HR>
2395<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
2396<P>
2397<CODE>textutils(1),</CODE> <CODE>shellutils(1),</CODE> etc...
2398
2399<P>
2400<HR>
2401<H1><A NAME="MAINTAINER">MAINTAINER</A></H1>
2402<P>
2403Erik Andersen &lt;<A
2404HREF="mailto:andersee@debian.org">andersee@debian.org</A>&gt; &lt;<A
2405HREF="mailto:andersen@lineo.com">andersen@lineo.com</A>&gt;
2406
2407<P>
2408<HR>
2409<H1><A NAME="AUTHORS">AUTHORS</A></H1>
2410<P>
2411The following people have contributed code to BusyBox whether they know it
2412or not.
2413
2414<P>
2415Erik Andersen &lt;<A
2416HREF="mailto:andersee@debian.org">andersee@debian.org</A>&gt;
2417
2418<br>
2419
2420<P>
2421John Beppu &lt;<A HREF="mailto:beppu@lineo.com">beppu@lineo.com</A>&gt;
2422
2423<br>
2424
2425<P>
2426Brian Candler &lt;<A
2427HREF="mailto:B.Candler@pobox.com">B.Candler@pobox.com</A>&gt;
2428
2429<br>
2430
2431<P>
2432Randolph Chung &lt;<A
2433HREF="mailto:tausq@debian.org">tausq@debian.org</A>&gt;
2434
2435<br>
2436
2437<P>
2438Dave Cinege &lt;<A
2439HREF="mailto:dcinege@psychosis.com">dcinege@psychosis.com</A>&gt;
2440
2441<br>
2442
2443<P>
2444Karl M. Hegbloom &lt;<A
2445HREF="mailto:karlheg@debian.org">karlheg@debian.org</A>&gt;
2446
2447<br>
2448
2449<P>
2450John Lombardo &lt;<A
2451HREF="mailto:john@deltanet.com">john@deltanet.com</A>&gt;
2452
2453<br>
2454
2455<P>
2456Glenn McGrath &lt;<A
2457HREF="mailto:bug1@netconnect.com.au">bug1@netconnect.com.au</A>&gt;
2458
2459<br>
2460
2461<P>
2462Bruce Perens &lt;<A HREF="mailto:bruce@perens.com">bruce@perens.com</A>&gt;
2463
2464<br>
2465
2466<P>
2467Pavel Roskin &lt;<A
2468HREF="mailto:pavel_roskin@geocities.com">pavel_roskin@geocities.com</A>&gt;
2469
2470<br>
2471
2472<P>
2473Linus Torvalds &lt;<A
2474HREF="mailto:torvalds@transmeta.com">torvalds@transmeta.com</A>&gt;
2475
2476<br>
2477
2478<P>
2479Charles P. Wright &lt;<A
2480HREF="mailto:cpwright@villagenet.com">cpwright@villagenet.com</A>&gt;
2481
2482<br>
2483
2484<P>
2485Enrique Zanardi &lt;<A
2486HREF="mailto:ezanardi@ull.es">ezanardi@ull.es</A>&gt;
2487
2488<br>
2489
2490</BODY>
2491
2492</HTML>