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, date,
40 dd, df, dirname, dmesg, du, dutmp, echo, false, 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, mv, 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, tty, umount, uname, uptime, uniq, update,
48 usleep, wc, whoami, yes, zcat
52 Most BusyBox commands support the B<--help> option to provide a
53 terse runtime description of their behavior.
59 Usage: basename [file ...]
61 Strips directory and suffix from filenames.
65 $ basename /usr/local/bin/foo
67 $ basename /usr/local/bin/
70 -------------------------------
76 Concatenates files and prints them to the standard output.
83 -------------------------------
87 Usage: chmod [B<-R>] MODE[,MODE]... FILE...
89 Changes file access permissions for the specified file(s) or directory(s).
90 Each MODE is defined by combining the letters for WHO has access to the file,
91 an OPERATOR for selecting how the permissions should be changed, and a
92 PERISSION for the file(s) or directory(s).
94 WHO may be chosen from:
96 u the User who owns the file
97 g users in the file's Group
98 o Other users not in the file's group
101 OPERATOR may be chosen from:
104 - remove a permission
105 = assign a permission
107 PERMISSION may be chosen from:
111 x eXecute (or access for directories)
112 s Set user (or group) ID bit
113 t sTickey bit (for directories prevents removing files by non-owners)
115 Alternately, permissions may be set numerically where the first three
116 numbers are calculated by adding the octal values:
122 An optional fourth digit may also be used to specify
130 -R change files and directories recursively.
135 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
138 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
141 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
143 -------------------------------
147 Usage: chown [OPTION]... OWNER[.[GROUP] FILE...
149 Changes the owner and/or group of each FILE to OWNER and/or GROUP.
153 -R change files and directories recursively
158 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
159 $ chown root /tmp/foo
161 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
162 $ chown root.root /tmp/foo
164 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
166 -------------------------------
170 Usage: chgrp [OPTION]... GROUP FILE...
172 Change the group membership of each FILE to GROUP.
176 -R change files and directories recursively
181 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
182 $ chgrp root /tmp/foo
184 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
186 -------------------------------
190 Usage: chroot NEWROOT [COMMAND...]
192 Run COMMAND with root directory set to NEWROOT.
197 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /busybox
198 $ mount /dev/hdc1 /mnt -t minix
201 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
203 -------------------------------
209 -------------------------------
215 Change foreground virtual terminal to /dev/ttyN
217 -------------------------------
221 Usage: cp [OPTION]... SOURCE DEST
223 or: cp [OPTION]... SOURCE... DIRECTORY
225 Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
229 -p preserve file attributes if possable
230 -R copy directories recursively
232 -------------------------------
236 Usage: date [OPTION]... [+FORMAT]
238 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
240 Display the current time in the given FORMAT, or set the system date.
244 -R output RFC-822 compliant date string
245 -s set time described by STRING
246 -u print or set Coordinated Universal Time
251 Wed Apr 12 18:52:41 MDT 2000
253 -------------------------------
257 Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
259 Copy a file, converting and formatting according to options
261 if=FILE read from FILE instead of stdin
262 of=FILE write to FILE instead of stdout
263 bs=n read and write n bytes at a time
264 count=n copy only n input blocks
265 skip=n skip n input blocks
266 seek=n skip n output blocks
268 Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
272 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
276 -------------------------------
280 Usage: df [filesystem ...]
282 Prints the filesystem space used and space available.
287 Filesystem 1k-blocks Used Available Use% Mounted on
288 /dev/sda3 8690864 8553540 137324 98% /
289 /dev/sda1 64216 36364 27852 57% /boot
291 Filesystem 1k-blocks Used Available Use% Mounted on
292 /dev/sda3 8690864 8553540 137324 98% /
294 -------------------------------
300 Strip non-directory suffix from file name
309 -------------------------------
313 Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
315 Print or controls the kernel ring buffer.
317 -------------------------------
321 Usage: du [OPTION]... [FILE]...
323 Summarize disk space used for each FILE and/or directory.
324 Disk space is printed in units of 1k (i.e. 1024 bytes).
328 -l count sizes many times if hard linked
329 -s display only a total for each argument
335 12 ./kernel-patches/CVS
345 -------------------------------
351 Dump utmp file format (pipe delimited) from FILE
356 $ dutmp /var/run/utmp
357 8|7||si|||0|0|0|955637625|760097|0
358 2|0|~|~~|reboot||0|0|0|955637625|782235|0
359 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
360 8|125||l4|||0|0|0|955637629|998367|0
361 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
362 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
363 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
365 -------------------------------
369 Usage: echo [-neE] [ARG ...]
371 Prints the specified ARGs to stdout
375 -n suppress trailing newline
376 -e interpret backslash-escaped characters (i.e. \t=tab etc)
377 -E disable interpretation of backslash-escaped characters
381 $ echo "Erik is cool"
383 $ echo -e "Erik\nis\ncool"
387 $ echo "Erik\nis\ncool"
390 -------------------------------
394 -------------------------------
398 Usage: fbset [options] [mode]
400 Show and modify frame buffer device settings
421 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
422 geometry 1024 768 1024 768 16
423 timings 12714 128 32 16 4 128 4
425 rgba 5/11,6/5,5/0,0/0
428 -------------------------------
432 Usage: fdflush device
434 Force floppy disk drive to detect disk change
436 -------------------------------
440 Usage: find [PATH...] [EXPRESSION]
442 Search for files in a directory hierarchy. The default PATH is
443 the current directory; default EXPRESSION is '-print'
446 EXPRESSION may consist of:
448 -follow Dereference symbolic links.
449 -name PATTERN File name (leading directories removed) matches PATTERN.
450 -print print the full file name followed by a newline to stdout.
454 $ find / -name /etc/passwd
457 -------------------------------
463 Displays the amount of free and used memory in the system.
468 total used free shared buffers
469 Mem: 257628 248724 8904 59644 93124
470 Swap: 128516 8404 120112
471 Total: 386144 257128 129016
473 -------------------------------
477 Usage: freeramdisk DEVICE
479 Free all memory used by the specified ramdisk.
483 $ freeramdisk /dev/ram2
485 -------------------------------
491 Deallocates unused virtual terminal /dev/ttyN
493 -------------------------------
497 Usage: fsck.minix [B<-larvsmf>] /dev/name
499 Performs a consistency check for MINIX filesystems.
503 -l Lists all filenames
504 -r Perform interactive repairs
505 -a Perform automatic repairs
507 -s Outputs super-block information
508 -m Activates MINIX-like "mode not cleared" warnings
509 -f Force file system check.
511 -------------------------------
515 Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
517 Make a MINIX filesystem.
521 -c Check the device for bad blocks
522 -n [14|30] Specify the maximum length of filenames
523 -i Specify the number of inodes for the filesystem
524 -l FILENAME Read the bad blocks list from FILENAME
525 -v Make a Minix version 2 filesystem
527 -------------------------------
531 Usage: grep [OPTIONS]... PATTERN [FILE]...
533 Search for PATTERN in each FILE or standard input.
537 -h suppress the prefixing filename on output
538 -i ignore case distinctions
539 -n print line number with output lines
540 -q be quiet. Returns 0 if result was found, 1 otherwise
542 This version of grep matches full regular expresions.
546 $ grep root /etc/passwd
547 root:x:0:0:root:/root:/bin/bash
548 $ grep ^[rR]oo. /etc/passwd
549 root:x:0:0:root:/root:/bin/bash
551 -------------------------------
556 -------------------------------
561 -------------------------------
566 -------------------------------
570 Usage: head [OPTION] [FILE]...
572 Print first 10 lines of each FILE to standard output.
573 With more than one FILE, precede each with a header giving the
574 file name. With no FILE, or when FILE is -, read standard input.
578 -n NUM Print first NUM lines instead of first 10
582 $ head -n 2 /etc/passwd
583 root:x:0:0:root:/root:/bin/bash
584 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
586 -------------------------------
591 -------------------------------
595 Usage: hostname [OPTION] {hostname | B<-F> file}
597 Get or set the hostname or DNS domain name. If a hostname is given
598 (or a file with the B<-F> parameter), the host name will be set.
603 -i Addresses for the hostname
605 -F FILE Use the contents of FILE to specify the hostname
612 -------------------------------
617 -------------------------------
621 Usage: kill [B<-signal>] process-id [process-id ...]
623 Send a signal (default is SIGTERM) to the specified process(es).
627 -l List all signal names and numbers.
632 252 root root S [apache]
633 263 www-data www-data S [apache]
634 264 www-data www-data S [apache]
635 265 www-data www-data S [apache]
636 266 www-data www-data S [apache]
637 267 www-data www-data S [apache]
640 -------------------------------
644 -------------------------------
649 -------------------------------
653 Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
654 Create a link named LINK_NAME or DIRECTORY to the specified TARGET
658 -s make symbolic links instead of hard links
659 -f remove existing destination files
663 $ ln -s busybox /tmp/ls
664 [andersen@debian busybox]$ ls -l /tmp/ls
665 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> busybox*
667 -------------------------------
671 -------------------------------
675 -------------------------------
679 -------------------------------
683 Usage: ls [B<-1acdelnpuxACF>] [filenames...]
687 -a do not hide entries starting with .
688 -c with -l: show ctime (the time of last
689 modification of file status information)
690 -d list directory entries instead of contents
691 -e list both full date and full time
692 -l use a long listing format
693 -n list numeric UIDs and GIDs instead of names
694 -p append indicator (one of /=@|) to entries
695 -u with -l: show access time (the time of last
697 -x list entries by lines instead of by columns
698 -A do not list implied . and ..
699 -C list entries by columns
700 -F append indicator (one of */=@|) to entries
702 -------------------------------
708 Shows information about all loaded modules.
710 -------------------------------
714 -------------------------------
718 -------------------------------
722 Usage: mkdir [OPTION] DIRECTORY...
724 Create the DIRECTORY(ies), if they do not already exist
728 -m set permission mode (as in chmod), not rwxrwxrwx - umask
729 -p no error if dir exists, make parent directories as needed
735 /tmp/foo: File exists
736 $ mkdir /tmp/foo/bar/baz
737 /tmp/foo/bar/baz: No such file or directory
738 $ mkdir -p /tmp/foo/bar/baz
740 -------------------------------
744 -------------------------------
748 Usage: mknod NAME TYPE MAJOR MINOR
750 Make block or character special files.
754 b: Make a block (buffered) device.
755 c or u: Make a character (un-buffered) device.
756 p: Make a named pipe. Major and minor are ignored for named pipes.
760 $ mknod /dev/fd0 b 2 0
762 -------------------------------
766 Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
768 Prepare a disk partition to be used as a swap partition.
772 -c Check for read-ability.
773 -v0 Make version 0 swap [max 128 Megs].
774 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
775 block-count Number of block to use (default is entire partition).
777 -------------------------------
781 -------------------------------
785 Usage: more [file ...]
787 More is a filter for paging through text one screenful at a time.
793 -------------------------------
798 mount [flags] device directory [B<-o> options,more-options]
802 -a: Mount all file systems in fstab.
803 -o option: One of many filesystem options, listed below.
804 -r: Mount the filesystem read-only.
805 -t filesystem-type: Specify the filesystem type.
806 -w: Mount for reading and writing (default).
808 Options for use with the "B<-o>" flag:
810 async / sync: Writes are asynchronous / synchronous.
811 dev / nodev: Allow use of special device files / disallow them.
812 exec / noexec: Allow use of executable files / disallow them.
813 loop: Mounts a file via loop device.
814 suid / nosuid: Allow set-user-id-root programs / disallow them.
815 remount: Re-mount a currently-mounted filesystem, changing its flags.
816 ro / rw: Mount for read-only / read-write.
817 There are EVEN MORE flags that are specific to each filesystem.
818 You'll have to see the written documentation for those.
823 /dev/hda3 on / type minix (rw)
824 proc on /proc type proc (rw)
825 devpts on /dev/pts type devpts (rw)
826 $ mount /dev/fd0 /mnt -t msdos -o ro
827 $ mount /tmp/diskimage /opt -t ext2 -o loop
829 -------------------------------
833 -------------------------------
837 Usage: mv SOURCE DEST
839 or: mv SOURCE... DIRECTORY
841 Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
845 $ mv /tmp/foo /bin/bar
847 -------------------------------
851 -------------------------------
855 -------------------------------
859 Usage: ping [OPTION]... host
861 Send ICMP ECHO_REQUEST packets to network hosts.
865 -c COUNT Send only COUNT pings.
866 -q Quiet mode, only displays output at start
871 PING slag (127.0.0.1): 56 data bytes
872 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
874 --- debian ping statistics ---
875 1 packets transmitted, 1 packets received, 0% packet loss
876 round-trip min/avg/max = 20.1/20.1/20.1 ms
878 -------------------------------
882 -------------------------------
886 -------------------------------
890 -------------------------------
894 -------------------------------
898 -------------------------------
902 -------------------------------
906 -------------------------------
910 -------------------------------
914 -------------------------------
918 -------------------------------
922 -------------------------------
926 -------------------------------
930 -------------------------------
934 -------------------------------
938 -------------------------------
942 -------------------------------
946 -------------------------------
950 -------------------------------
954 -------------------------------
958 -------------------------------
962 -------------------------------
966 -------------------------------
970 -------------------------------
974 -------------------------------
978 -------------------------------
982 -------------------------------
986 -------------------------------
990 -------------------------------
996 textutils(1), shellutils(1), etc...
1000 Erik Andersen <erik@lineo.com>
1004 The following people have contributed code to BusyBox whether
1005 they know it or not.
1007 Erik Andersen <erik@lineo.com>
1011 John Beppu <beppu@lineo.com>
1015 Brian Candler <B.Candler@pobox.com>
1019 Randolph Chung <tausq@debian.org>
1023 Dave Cinege <dcinege@psychosis.com>
1027 Bruce Perens <bruce@perens.com>
1031 Linus Torvalds <torvalds@transmeta.com>
1035 Charles P. Wright <cpwright@villagenet.com>
1039 Enrique Zanardi <ezanardi@ull.es>
1043 Karl M. Hegbloom <karlheg@debian.org>