1 # pod2man --center=Lineo --release="version 0.43" busybox.pod > busybox.1
5 busybox - I am BusyBox of Borg. Unix will be assimilated.
9 busybox <function> [arguments...] # or
11 <function> [arguments...] # if symlinked
15 BusyBox is a multi-call binary that combines many common Unix utilities into a
16 single executable. Most people will create a link to busybox for each function
17 they wish to use, and BusyBox will act like whatever it was invoked as. For
23 will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
24 into busybox). You can also invoke BusyBox by providing it the command to run
25 on the command line. For example,
29 will also cause BusyBox to behave as 'ls'.
31 BusyBox has been written with size-optimization in mind. It is very easy to
32 include or exclude the commands (or features) you want installed. BusyBox
33 tries to make itself useful to small systems with limited resources.
37 Currently defined functions include:
39 basename, cat, chmod, chown, chgrp, chroot, clear, chvt, cp, mv, date,
40 dd, df, dirname, dmesg, du, dutmp, echo, fbset, fdflush, find, free,
41 freeramdisk, deallocvt, fsck.minix, mkfs.minix, grep, gunzip, gzip,
42 halt, head, hostid, hostname, init, kill, killall, length, ln, loadacm,
43 loadfont, loadkmap, ls, lsmod, makedevs, math, mkdir, mkfifo, mknod,
44 mkswap, mnc, more, mount, mt, nslookup, poweroff, ping, printf, ps,
45 pwd, reboot, rm, rmdir, rmmod, sed, sh, fdisk, sfdisk, sleep, sort,
46 sync, syslogd, logger, logname, swapon, swapoff, tail, tar, [, test,
47 tee, touch, tr, true, false, tty, umount, uname, uptime, uniq, update,
48 usleep, wc, whoami, yes, zcat
54 Most BusyBox commands support the B<--help> option to provide a
55 terse runtime description of their behavior.
61 Usage: basename [file ...]
63 Strips directory and suffix from filenames.
67 $ basename /usr/local/bin/foo
69 $ basename /usr/local/bin/
76 Concatenates files and prints them to the standard output.
85 Usage: chmod [B<-R>] MODE[,MODE]... FILE...
87 Changes file access permissions for the specified file(s) or directory(s).
88 Each MODE is defined by combining the letters for WHO has access to the file,
89 an OPERATOR for selecting how the permissions should be changed, and a
90 PERISSION for the file(s) or directory(s).
92 WHO may be chosen from:
94 u the User who owns the file
95 g users in the file's Group
96 o Other users not in the file's group
99 OPERATOR may be chosen from:
102 - remove a permission
103 = assign a permission
105 PERMISSION may be chosen from:
109 x eXecute (or access for directories)
110 s Set user (or group) ID bit
111 t sTickey bit (for directories prevents removing files by non-owners)
113 Alternately, permissions may be set numerically where the first three
114 numbers are calculated by adding the octal values:
120 An optional fourth digit may also be used to specify
128 -R change files and directories recursively.
133 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
136 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
139 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
143 Usage: chown [OPTION]... OWNER[.[GROUP] FILE...
145 Changes the owner and/or group of each FILE to OWNER and/or GROUP.
149 -R change files and directories recursively
154 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
155 $ chown root /tmp/foo
157 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
158 $ chown root.root /tmp/foo
160 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
164 Usage: chgrp [OPTION]... GROUP FILE...
166 Change the group membership of each FILE to GROUP.
170 -R change files and directories recursively
175 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
176 $ chgrp root /tmp/foo
178 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
182 Usage: chroot NEWROOT [COMMAND...]
184 Run COMMAND with root directory set to NEWROOT.
189 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /bin/busybox
190 $ mount /dev/hdc1 /mnt -t minix
193 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
203 Change foreground virtual terminal to /dev/ttyN
208 Usage: cp [OPTION]... SOURCE DEST
210 or: cp [OPTION]... SOURCE... DIRECTORY
212 Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
216 -p preserve file attributes if possable
217 -R copy directories recursively
221 Usage: date [OPTION]... [+FORMAT]
223 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
225 Display the current time in the given FORMAT, or set the system date.
229 -R output RFC-822 compliant date string
230 -s set time described by STRING
231 -u print or set Coordinated Universal Time
236 Wed Apr 12 18:52:41 MDT 2000
240 Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
242 Copy a file, converting and formatting according to options
244 if=FILE read from FILE instead of stdin
245 of=FILE write to FILE instead of stdout
246 bs=n read and write n bytes at a time
247 count=n copy only n input blocks
248 skip=n skip n input blocks
249 seek=n skip n output blocks
251 Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
256 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
262 Usage: df [filesystem ...]
264 Prints the filesystem space used and space available.
269 Filesystem 1k-blocks Used Available Use% Mounted on
270 /dev/sda3 8690864 8553540 137324 98% /
271 /dev/sda1 64216 36364 27852 57% /boot
273 Filesystem 1k-blocks Used Available Use% Mounted on
274 /dev/sda3 8690864 8553540 137324 98% /
278 Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
280 Print or controls the kernel ring buffer.
284 Usage: du [OPTION]... [FILE]...
286 Summarize disk space used for each FILE and/or directory.
287 Disk space is printed in units of 1k (i.e. 1024 bytes).
291 -l count sizes many times if hard linked
292 -s display only a total for each argument
298 12 ./kernel-patches/CVS
311 Usage: fbset [options] [mode]
313 Show and modify frame buffer device settings
333 Usage: find [PATH...] [EXPRESSION]
335 Search for files in a directory hierarchy. The default PATH is
336 the current directory; default EXPRESSION is '-print'
339 EXPRESSION may consist of:
341 Dereference symbolic links.
343 File name (with leading directories removed) matches PATTERN.
345 print the full file name followed by a newline to stdout.
349 $ find / -name /etc/passwd
356 Displays the amount of free and used memory in the system.
361 total used free shared buffers
362 Mem: 257628 248724 8904 59644 93124
363 Swap: 128516 8404 120112
364 Total: 386144 257128 129016
371 Deallocates unused virtual terminal /dev/ttyN
376 Usage: fsck.minix [B<-larvsmf>] /dev/name
378 Performs a consistency check for MINIX filesystems.
382 -l Lists all filenames
383 -r Perform interactive repairs
384 -a Perform automatic repairs
386 -s Outputs super-block information
387 -m Activates MINIX-like "mode not cleared" warnings
388 -f Force file system check.
393 Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
395 Make a MINIX filesystem.
399 -c Check the device for bad blocks
400 -n [14|30] Specify the maximum length of filenames
401 -i Specify the number of inodes for the filesystem
402 -l FILENAME Read the bad blocks list from FILENAME
403 -v Make a Minix version 2 filesystem
408 Usage: grep [OPTIONS]... PATTERN [FILE]...
410 Search for PATTERN in each FILE or standard input.
414 -h suppress the prefixing filename on output
415 -i ignore case distinctions
416 -n print line number with output lines
417 -q be quiet. Returns 0 if result was found, 1 otherwise
419 This version of grep matches full regular expresions.
424 $ grep root /etc/passwd
425 root:x:0:0:root:/root:/bin/bash
426 $ grep ^[rR]oo. /etc/passwd
427 root:x:0:0:root:/root:/bin/bash
431 Usage: head [OPTION] [FILE]...
433 Print first 10 lines of each FILE to standard output.
434 With more than one FILE, precede each with a header giving the
435 file name. With no FILE, or when FILE is -, read standard input.
439 -n NUM Print first NUM lines instead of first 10
443 $ head -n 2 /etc/passwd
444 root:x:0:0:root:/root:/bin/bash
445 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
449 Usage: hostname [OPTION] {hostname | B<-F> file}
451 Get or set the hostname or DNS domain name. If a hostname is given
452 (or a file with the B<-F> parameter), the host name will be set.
457 -i Addresses for the hostname
459 -F FILE Use the contents of FILE to specify the hostname
468 Usage: kill [B<-signal>] process-id [process-id ...]
470 Send a signal (default is SIGTERM) to the specified process(es).
474 -l List all signal names and numbers.
479 252 root root S [apache]
480 263 www-data www-data S [apache]
481 264 www-data www-data S [apache]
482 265 www-data www-data S [apache]
483 266 www-data www-data S [apache]
484 267 www-data www-data S [apache]
489 Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
490 Create a link named LINK_NAME or DIRECTORY to the specified TARGET
494 -s make symbolic links instead of hard links
495 -f remove existing destination files
500 Usage: ls [B<-1acdelnpuxACF>] [filenames...]
509 Usage: Usage: mkdir [OPTION] DIRECTORY...
510 Create the DIRECTORY(ies), if they do not already exist
514 -m set permission mode (as in chmod), not rwxrwxrwx - umask
515 -p no error if existing, make parent directories as needed
520 Usage: mknod NAME TYPE MAJOR MINOR
521 Make block or character special files.
525 b: Make a block (buffered) device.
526 c or u: Make a character (un-buffered) device.
527 p: Make a named pipe. Major and minor are ignored for named pipes.
532 Usage: mkswap [B<-c>] [-v0|-v1] device [block-count]
533 Prepare a disk partition to be used as a swap partition.
537 -c Check for read-ability.
538 -v0 Make version 0 swap [max 128 Megs].
539 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
540 block-count Number of block to use (default is entire partition).
545 Usage: more [file ...]
552 mount [flags] device directory [B<-o> options,more-options]
555 -a: Mount all file systems in fstab.
556 -o option: One of many filesystem options, listed below.
557 -r: Mount the filesystem read-only.
558 -t filesystem-type: Specify the filesystem type.
559 -w: Mount for reading and writing (default).
560 Options for use with the "-o" flag:
561 async / sync: Writes are asynchronous / synchronous.
562 dev / nodev: Allow use of special device files / disallow them.
563 exec / noexec: Allow use of executable files / disallow them.
564 loop: Mounts a file via loop device.
565 suid / nosuid: Allow set-user-id-root programs / disallow them.
566 remount: Re-mount a currently-mounted filesystem, changing its flags.
567 ro / rw: Mount for read-only / read-write.
569 There are EVEN MORE flags that are specific to each filesystem.
570 You'll have to see the written documentation for those.
575 Usage: mv SOURCE DEST
577 or: mv SOURCE... DIRECTORY
579 Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
594 Report process status.
595 This version of ps accepts no options.
608 Usage: rm [OPTION]... FILE...
609 Remove (unlink) the FILE(s).
613 -f remove existing destinations, never prompt
614 -r or -R remove the contents of directories recursively
619 Usage: rmdir [OPTION]... DIRECTORY...
620 Remove the DIRECTORY(ies), if they are empty.
625 Usage: sed [B<-n>] B<-e> script [file...]
626 Allowed sed scripts come in the following form:
629 where address ADDR can be:
630 NUMBER Match specified line number
632 /REGEXP/ Match specified regexp
633 (! inverts the meaning of the match)
635 s/regexp/replacement/[igp]
636 which attempt to match regexp against the pattern space
637 and if successful replaces the matched portion with replacement.
639 which appends TEXT after the pattern space
643 -e add the script to the commands to be executed
644 -n suppress automatic printing of pattern space
646 This version of sed matches full regular expresions.
658 Usage: Usage: sort [OPTION]... [FILE]...
665 Write all buffered filesystem blocks to disk.
670 Usage: syslogd [OPTION]...
672 Linux system and kernel (provides klogd) logging utility.
673 Note that this version of syslogd/klogd ignores /etc/syslog.conf.
677 -m Change the mark timestamp interval. default=20min. 0=off
678 -n Do not fork into the background (for when run by init)
679 -K Do not start up the klogd process (by default syslogd spawns klogd).
680 -O Specify an alternate log file. default=/var/log/messages
687 Start swapping virtual memory pages on the given device.
692 Usage: swapoff device
694 Stop swapping virtual memory pages on the given device.
699 Usage: tail [OPTION]... [FILE]...
701 Print last 10 lines of each FILE to standard output.
702 With more than one FILE, precede each with a header giving the file name.
703 With no FILE, or when FILE is -, read standard input.
705 -c=N[kbm] output the last N bytes
706 -f output appended data as the file grows
707 -n=N output the last N lines, instead of last 10
708 -q never output headers giving file names
709 -v always output headers giving file names
710 --help display this help and exit
712 If the first character of N (bytes or lines) is a `+', output begins with
713 the Nth item from the start of each file, otherwise, print the last N items
714 in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).
723 Usage: tee [OPTION]... [FILE]...
724 Copy standard input to each FILE, and also to standard output.
728 -a append to the given FILEs, do not overwrite
733 Usage: touch [B<-c>] file [file ...]
734 Update the last-modified date on the given file[s].
747 Usage: uname [OPTION]...
749 Print certain system information. With no OPTION, same as B<-s>.
753 -a print all information
754 -m the machine (hardware) type
755 -n print the machine's network node hostname
756 -r print the operating system release
757 -s print the operating system name
758 -p print the host processor type
759 -v print the operating system version
764 Usage: Usage: umount [flags] filesystem|directory
768 -a: Unmount all file systems
773 Usage: Usage: uniq [OPTION]... [INPUT [OUTPUT]]
775 Discard all but one of successive identical lines from INPUT (or
776 standard input), writing to OUTPUT (or standard output).
778 -h display this help and exit
780 A field is a run of whitespace, then non-whitespace characters.
781 Fields are skipped before chars.
786 Usage: gunzip [OPTION]... FILE
788 Uncompress FILE (or standard input if FILE is '-').
792 -c Write output to standard output
793 -t Test compressed file integrity
798 Usage: gunzip [OPTION]... FILE
800 Uncompress FILE (or standard input if FILE is '-').
804 -c Write output to standard output
805 -t Test compressed file integrity
810 Usage: gzip [OPTION]... FILE
812 Compress FILE with maximum compression.
813 When FILE is -, reads standard input. Implies B<-c>.
817 -c Write output to standard output instead of FILE.gz
825 textutils(1), shellutils(1), etc...
829 Erik Andersen <erik@lineo.com>
833 The following people have contributed code to BusyBox whether
836 Erik Andersen <erik@lineo.com>
840 John Beppu <beppu@lineo.com>
844 Brian Candler <B.Candler@pobox.com>
848 Randolph Chung <tausq@debian.org>
852 Dave Cinege <dcinege@psychosis.com>
856 Bruce Perens <bruce@perens.com>
860 Linus Torvalds <torvalds@transmeta.com>
864 Charles P. Wright <cpwright@villagenet.com>
868 Enrique Zanardi <ezanardi@ull.es>