5 BusyBox - The Swiss Army Knife of Embedded Linux
9 BusyBox <function> [arguments...] # or
11 <function> [arguments...] # if symlinked
15 BusyBox combines tiny versions of many common UNIX utilities into a single
16 small executable. It provides minimalist replacements for most of the utilities
17 you usually find in fileutils, shellutils, findutils, textutils, grep, gzip,
18 tar, etc. BusyBox provides a fairly complete POSIX environment for any small
19 or emdedded system. The utilities in BusyBox generally have fewer options then
20 their full featured GNU cousins; however, the options that are included provide
21 the expected functionality and behave very much like their GNU counterparts.
23 BusyBox has been written with size-optimization and limited resources in mind.
24 It is also extremely modular so you can easily include or exclude commands (or
25 features) at compile time. This makes it easy to customize your embedded
26 systems. To create a working system, just add a kernel, a shell (such as ash),
27 and an editor (such as elvis-tiny or ae).
31 When you create a link to BusyBox for the function you wish to use, when BusyBox
32 is called using that link it will behave as if the command itself has been invoked.
39 will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
42 You can also invoke BusyBox by issuing the command as an argument on the
43 command line. For example, entering
47 will also cause BusyBox to behave as 'ls'.
51 Most BusyBox commands support the B<--help> option to provide a
52 terse runtime description of their behavior.
56 Currently defined functions include:
58 basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, date, dd, df,
59 dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
60 freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
61 hostname, init, kill, killall, length, ln, loadacm, loadfont, loadkmap, logger,
62 logname, ls, lsmod, makedevs, math, mkdir, mkfifo, mkfs.minix, mknod, mkswap,
63 mktemp, mnc, more, mount, mt, mv, nslookup, ping, poweroff, printf, ps, pwd,
64 reboot, rm, rmdir, rmmod, sed, setkeycodes, sh, sfdisk, sleep, sort, sync,
65 syslogd, swapon, swapoff, tail, tar, test, tee, touch, tr, true, tty, umount,
66 uname, uniq, update, uptime, usleep, wc, whoami, yes, zcat, [
72 Usage: basename [file ...]
74 Strips directory path and suffixes from FILE(s).
78 $ basename /usr/local/bin/foo
80 $ basename /usr/local/bin/
83 -------------------------------
89 Concatenates FILE(s) and prints them to the standard output.
96 -------------------------------
100 Usage: chgrp [OPTION]... GROUP FILE...
102 Change the group membership of each FILE to GROUP.
106 -R change files and directories recursively
111 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
112 $ chgrp root /tmp/foo
114 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
116 -------------------------------
120 Usage: chmod [B<-R>] MODE[,MODE]... FILE...
122 Changes file access permissions for the specified FILE(s) (or directories).
123 Each MODE is defined by combining the letters for WHO has access to the file,
124 an OPERATOR for selecting how the permissions should be changed, and a
125 PERISSION for FILE(s) (or directories).
127 WHO may be chosen from
129 u User who owns the file
130 g Users in the file's Group
131 o Other users not in the file's group
134 OPERATOR may be chosen from
137 - Remove a permission
138 = Assign a permission
140 PERMISSION may be chosen from
144 x Execute (or access for directories)
145 s Set user (or group) ID bit
146 t Stickey bit (for directories prevents removing files by non-owners)
148 Alternately, permissions can be set numerically where the first three
149 numbers are calculated by adding the octal values, such as
155 An optional fourth digit can also be used to specify
163 -R Change files and directories recursively.
168 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
171 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
174 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
176 -------------------------------
180 Usage: chown [OPTION]... OWNER[<.|:>[GROUP] FILE...
182 Changes the owner and/or group of each FILE to OWNER and/or GROUP.
186 -R Changes files and directories recursively
191 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
192 $ chown root /tmp/foo
194 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
195 $ chown root.root /tmp/foo
197 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
199 -------------------------------
203 Usage: chroot NEWROOT [COMMAND...]
205 Run COMMAND with root directory set to NEWROOT.
210 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox
211 $ mount /dev/hdc1 /mnt -t minix
214 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
216 -------------------------------
222 -------------------------------
228 Changes the foreground virtual terminal to /dev/ttyN
230 -------------------------------
234 Usage: cp [OPTION]... SOURCE DEST
236 or: cp [OPTION]... SOURCE... DIRECTORY
238 Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
242 -p Preserves file attributes if possable
243 -R Copies directories recursively
245 -------------------------------
249 Usage: date [OPTION]... [+FORMAT]
251 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
253 Displays the current time in the given FORMAT, or sets the system date.
256 -R Outputs RFC-822 compliant date string
257 -s Sets time described by STRING
258 -u Prints or sets Coordinated Universal Time
263 Wed Apr 12 18:52:41 MDT 2000
265 -------------------------------
269 Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
271 Copy a file, converting and formatting according to options
273 if=FILE read from FILE instead of stdin
274 of=FILE write to FILE instead of stdout
275 bs=n read and write n bytes at a time
276 count=n copy only n input blocks
277 skip=n skip n input blocks
278 seek=n skip n output blocks
280 Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
284 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
288 -------------------------------
292 Usage: df [filesystem ...]
294 Prints the filesystem space used and space available.
299 Filesystem 1k-blocks Used Available Use% Mounted on
300 /dev/sda3 8690864 8553540 137324 98% /
301 /dev/sda1 64216 36364 27852 57% /boot
303 Filesystem 1k-blocks Used Available Use% Mounted on
304 /dev/sda3 8690864 8553540 137324 98% /
306 -------------------------------
312 Strip non-directory suffix from file name
321 -------------------------------
325 Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
327 Print or controls the kernel ring buffer.
329 -------------------------------
333 Usage: du [OPTION]... [FILE]...
335 Summarize disk space used for each FILE and/or directory.
336 Disk space is printed in units of 1k (i.e. 1024 bytes).
340 -l count sizes many times if hard linked
341 -s display only a total for each argument
347 12 ./kernel-patches/CVS
357 -------------------------------
363 Dump utmp file format (pipe delimited) from FILE
368 $ dutmp /var/run/utmp
369 8|7||si|||0|0|0|955637625|760097|0
370 2|0|~|~~|reboot||0|0|0|955637625|782235|0
371 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
372 8|125||l4|||0|0|0|955637629|998367|0
373 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
374 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
375 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
377 -------------------------------
381 Usage: echo [-neE] [ARG ...]
383 Prints the specified ARGs to stdout
387 -n suppress trailing newline
388 -e interpret backslash-escaped characters (i.e. \t=tab etc)
389 -E disable interpretation of backslash-escaped characters
393 $ echo "Erik is cool"
395 $ echo -e "Erik\nis\ncool"
399 $ echo "Erik\nis\ncool"
402 -------------------------------
406 Returns an exit code of FALSE (1)
414 -------------------------------
418 Usage: fbset [options] [mode]
420 Show and modify frame buffer device settings
441 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
442 geometry 1024 768 1024 768 16
443 timings 12714 128 32 16 4 128 4
445 rgba 5/11,6/5,5/0,0/0
448 -------------------------------
452 Usage: fdflush device
454 Force floppy disk drive to detect disk change
456 -------------------------------
460 Usage: find [PATH...] [EXPRESSION]
462 Search for files in a directory hierarchy. The default PATH is
463 the current directory; default EXPRESSION is '-print'
466 EXPRESSION may consist of:
468 -follow Dereference symbolic links.
469 -name PATTERN File name (leading directories removed) matches PATTERN.
470 -print print the full file name followed by a newline to stdout.
474 $ find / -name /etc/passwd
477 -------------------------------
483 Displays the amount of free and used memory in the system.
488 total used free shared buffers
489 Mem: 257628 248724 8904 59644 93124
490 Swap: 128516 8404 120112
491 Total: 386144 257128 129016
493 -------------------------------
497 Usage: freeramdisk DEVICE
499 Free all memory used by the specified ramdisk.
503 $ freeramdisk /dev/ram2
505 -------------------------------
511 Deallocates unused virtual terminal /dev/ttyN
513 -------------------------------
517 Usage: fsck.minix [B<-larvsmf>] /dev/name
519 Performs a consistency check for MINIX filesystems.
523 -l Lists all filenames
524 -r Perform interactive repairs
525 -a Perform automatic repairs
527 -s Outputs super-block information
528 -m Activates MINIX-like "mode not cleared" warnings
529 -f Force file system check.
531 -------------------------------
535 Usage: grep [OPTIONS]... PATTERN [FILE]...
537 Search for PATTERN in each FILE or standard input.
541 -h suppress the prefixing filename on output
542 -i ignore case distinctions
543 -n print line number with output lines
544 -q be quiet. Returns 0 if result was found, 1 otherwise
545 -v select non-matching lines
547 This version of grep matches full regular expresions.
551 $ grep root /etc/passwd
552 root:x:0:0:root:/root:/bin/bash
553 $ grep ^[rR]oo. /etc/passwd
554 root:x:0:0:root:/root:/bin/bash
556 -------------------------------
560 Usage: gunzip [OPTION]... FILE
562 Uncompress FILE (or standard input if FILE is '-').
566 -c Write output to standard output
567 -t Test compressed file integrity
571 $ ls -la /tmp/BusyBox*
572 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
573 $ gunzip /tmp/BusyBox-0.43.tar.gz
574 $ ls -la /tmp/BusyBox*
575 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
577 -------------------------------
581 Usage: gzip [OPTION]... FILE
583 Compress FILE with maximum compression.
584 When FILE is '-', reads standard input. Implies B<-c>.
588 -c Write output to standard output instead of FILE.gz
592 $ ls -la /tmp/BusyBox*
593 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
594 $ gzip /tmp/BusyBox-0.43.tar
595 $ ls -la /tmp/BusyBox*
596 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
599 -------------------------------
605 This comand halts the system.
607 -------------------------------
611 Usage: head [OPTION] [FILE]...
613 Print first 10 lines of each FILE to standard output.
614 With more than one FILE, precede each with a header giving the
615 file name. With no FILE, or when FILE is -, read standard input.
619 -n NUM Print first NUM lines instead of first 10
623 $ head -n 2 /etc/passwd
624 root:x:0:0:root:/root:/bin/bash
625 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
627 -------------------------------
633 Prints out a unique 32-bit identifier for the current
634 machine. The 32-bit identifier is intended to be unique
635 among all UNIX systems in existence.
637 -------------------------------
641 Usage: hostname [OPTION] {hostname | B<-F> file}
643 Get or set the hostname or DNS domain name. If a hostname is given
644 (or a file with the B<-F> parameter), the host name will be set.
649 -i Addresses for the hostname
651 -F FILE Use the contents of FILE to specify the hostname
658 -------------------------------
664 Init is the parent of all processes.
666 This version of init is designed to be run only by the kernel.
668 BusyBox init doesn't support multiple runlevels. The runlevels field of
669 the /etc/inittab file is completely ignored by BusyBox init. If you want
670 runlevels, use sysvinit.
672 BusyBox init works just fine without an inittab. If no inittab is found,
673 it has the following default behavior:
675 ::sysinit:/etc/init.d/rcS
678 if it detects that /dev/console is _not_ a serial console, it will also run:
680 tty2::askfirst:/bin/sh
682 If you choose to use an /etc/inittab file, the inittab entry format is as follows:
684 <id>:<runlevels>:<action>:<process>
688 WARNING: This field has a non-traditional meaning for BusyBox init!
689 The id field is used by BusyBox init to specify the controlling tty for
690 the specified process to run on. The contents of this field are
691 appended to "/dev/" and used as-is. There is no need for this field to
692 be unique, although if it isn't you may have strange results. If this
693 field is left blank, it is completely ignored. Also note that if
694 BusyBox detects that a serial console is in use, then all entries
695 containing non-empty id fields will _not_ be run. BusyBox init does
696 nothing with utmp. We don't need no stinkin' utmp.
700 The runlevels field is completely ignored.
704 Valid actions include: sysinit, respawn, askfirst, wait,
705 once, and ctrlaltdel.
707 askfirst acts just like respawn, but before running the specified
708 process it displays the line "Please press Enter to activate this
709 console." and then waits for the user to press enter before starting
710 the specified process.
712 Unrecognised actions (like initdefault) will cause init to emit
713 an error message, and then go along with its business.
717 Specifies the process to be executed and it's command line.
720 Example /etc/inittab file:
722 # This is run first except when booting in single-user mode.
724 ::sysinit:/etc/init.d/rcS
726 # /bin/sh invocations on selected ttys
728 # Start an "askfirst" shell on the console (whatever that may be)
730 # Start an "askfirst" shell on /dev/tty2
731 tty2::askfirst:/bin/sh
733 # /sbin/getty invocations for selected ttys
735 tty4::respawn:/sbin/getty 38400 tty4
736 tty5::respawn:/sbin/getty 38400 tty5
739 # Example of how to put a getty on a serial line (for a terminal)
741 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
742 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
744 # Example how to put a getty on a modem line.
745 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
747 # Stuff to do before rebooting
748 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
749 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
751 -------------------------------
755 Usage: kill [B<-signal>] process-id [process-id ...]
757 Send a signal (default is SIGTERM) to the specified process(es).
761 -l List all signal names and numbers.
766 252 root root S [apache]
767 263 www-data www-data S [apache]
768 264 www-data www-data S [apache]
769 265 www-data www-data S [apache]
770 266 www-data www-data S [apache]
771 267 www-data www-data S [apache]
774 -------------------------------
778 Usage: killall [B<-signal>] process-name [process-name ...]
780 Send a signal (default is SIGTERM) to the specified process(es).
784 -l List all signal names and numbers.
790 -------------------------------
796 Prints out the length of the specified string.
802 -------------------------------
806 Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
807 Create a link named LINK_NAME or DIRECTORY to the specified TARGET
811 -s make symbolic links instead of hard links
812 -f remove existing destination files
816 $ ln -s BusyBox /tmp/ls
817 [andersen@debian BusyBox]$ ls -l /tmp/ls
818 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
820 -------------------------------
826 Loads an acm from standard input.
830 $ loadacm < /etc/i18n/acmname
832 -------------------------------
838 Loads a console font from standard input.
842 $ loadfont < /etc/i18n/fontname
844 -------------------------------
850 Loads a binary keyboard translation table from standard input.
854 $ loadkmap < /etc/i18n/lang-keymap
856 -------------------------------
860 Usage: logger [OPTION]... [MESSAGE]
862 Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
866 -s Log to stderr as well as the system log.
867 -t Log using the specified tag (defaults to user name).
868 -p Enter the message with the specified priority.
869 This may be numerical or a ``facility.level'' pair.
875 -------------------------------
881 Print the name of the current user.
888 -------------------------------
892 Usage: ls [B<-1acdelnpuxACF>] [filenames...]
896 -a do not hide entries starting with .
897 -c with -l: show ctime (the time of last
898 modification of file status information)
899 -d list directory entries instead of contents
900 -e list both full date and full time
901 -l use a long listing format
902 -n list numeric UIDs and GIDs instead of names
903 -p append indicator (one of /=@|) to entries
904 -u with -l: show access time (the time of last
906 -x list entries by lines instead of by columns
907 -A do not list implied . and ..
908 -C list entries by columns
909 -F append indicator (one of */=@|) to entries
911 -------------------------------
917 Shows a list of all currently loaded kernel modules.
919 -------------------------------
923 Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
925 Creates a range of block or character special files
929 b: Make a block (buffered) device.
930 c or u: Make a character (un-buffered) device.
931 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
933 FIRST specifies the number appended to NAME to create the first device.
934 LAST specifies the number of the last item that should be created.
935 If 's' is the last argument, the base device is created as well.
939 $ makedevs /dev/ttyS c 4 66 2 63
940 [creates ttyS2-ttyS63]
941 $ makedevs /dev/hda b 3 0 0 8 s
942 [creates hda,hda1-hda8]
944 -------------------------------
948 Usage: math expression ...
950 This is a Tiny RPN calculator that understands the
951 following operations: +, -, /, *, and, or, not, eor.
957 $ math 8 8 \* 2 2 + /
964 -------------------------------
968 Usage: mkdir [OPTION] DIRECTORY...
970 Create the DIRECTORY(ies), if they do not already exist
974 -m set permission mode (as in chmod), not rwxrwxrwx - umask
975 -p no error if dir exists, make parent directories as needed
981 /tmp/foo: File exists
982 $ mkdir /tmp/foo/bar/baz
983 /tmp/foo/bar/baz: No such file or directory
984 $ mkdir -p /tmp/foo/bar/baz
986 -------------------------------
990 Usage: mkfifo [OPTIONS] name
992 Creates a named pipe (identical to 'mknod name p')
996 -m create the pipe using the specified mode (default a=rw)
998 -------------------------------
1002 Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1004 Make a MINIX filesystem.
1008 -c Check the device for bad blocks
1009 -n [14|30] Specify the maximum length of filenames
1010 -i Specify the number of inodes for the filesystem
1011 -l FILENAME Read the bad blocks list from FILENAME
1012 -v Make a Minix version 2 filesystem
1014 -------------------------------
1018 Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
1020 Create a special file (block, character, or pipe).
1024 -m create the special file using the specified mode (default a=rw)
1027 b: Make a block (buffered) device.
1028 c or u: Make a character (un-buffered) device.
1029 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
1033 $ mknod /dev/fd0 b 2 0
1034 $ mknod -m 644 /tmp/pipe p
1036 -------------------------------
1040 Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1042 Prepare a disk partition to be used as a swap partition.
1046 -c Check for read-ability.
1047 -v0 Make version 0 swap [max 128 Megs].
1048 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1049 block-count Number of block to use (default is entire partition).
1051 -------------------------------
1055 Usage: mktemp [-q] TEMPLATE
1057 Creates a temporary file with its name based on TEMPLATE.
1058 TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1062 $ mktemp /tmp/temp.XXXXXX
1064 $ ls -la /tmp/temp.mWiLjM
1065 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1067 -------------------------------
1071 Usage: mnc [IP] [port]
1073 mini-netcat opens a pipe to IP:port
1077 $ mnc foobar.somedomain.com 25
1078 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1080 214-Commands supported:
1081 214- HELO EHLO MAIL RCPT DATA AUTH
1082 214 NOOP QUIT RSET HELP
1084 221 foobar closing connection
1086 -------------------------------
1090 Usage: more [file ...]
1092 More is a filter for paging through text one screenful at a time.
1098 -------------------------------
1102 Usage: mount [flags]
1103 mount [flags] device directory [B<-o> options,more-options]
1107 -a: Mount all file systems in fstab.
1108 -o option: One of many filesystem options, listed below.
1109 -r: Mount the filesystem read-only.
1110 -t filesystem-type: Specify the filesystem type.
1111 -w: Mount for reading and writing (default).
1113 Options for use with the "B<-o>" flag:
1115 async / sync: Writes are asynchronous / synchronous.
1116 dev / nodev: Allow use of special device files / disallow them.
1117 exec / noexec: Allow use of executable files / disallow them.
1118 loop: Mounts a file via loop device.
1119 suid / nosuid: Allow set-user-id-root programs / disallow them.
1120 remount: Re-mount a currently-mounted filesystem, changing its flags.
1121 ro / rw: Mount for read-only / read-write.
1122 There are EVEN MORE flags that are specific to each filesystem.
1123 You'll have to see the written documentation for those.
1128 /dev/hda3 on / type minix (rw)
1129 proc on /proc type proc (rw)
1130 devpts on /dev/pts type devpts (rw)
1131 $ mount /dev/fd0 /mnt -t msdos -o ro
1132 $ mount /tmp/diskimage /opt -t ext2 -o loop
1134 -------------------------------
1138 Usage: mt [B<-f> device] opcode value
1140 Control magnetic tape drive operation
1142 -------------------------------
1146 Usage: mv SOURCE DEST
1148 or: mv SOURCE... DIRECTORY
1150 Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
1154 $ mv /tmp/foo /bin/bar
1156 -------------------------------
1160 Usage: nslookup [HOST]
1162 Queries the nameserver for the IP address of the given HOST
1166 $ nslookup localhost
1173 -------------------------------
1177 Usage: ping [OPTION]... host
1179 Send ICMP ECHO_REQUEST packets to network hosts.
1183 -c COUNT Send only COUNT pings.
1184 -q Quiet mode, only displays output at start
1189 PING slag (127.0.0.1): 56 data bytes
1190 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1192 --- debian ping statistics ---
1193 1 packets transmitted, 1 packets received, 0% packet loss
1194 round-trip min/avg/max = 20.1/20.1/20.1 ms
1196 -------------------------------
1200 Shuts down the system, and requests that the kernel turn off power upon halting.
1202 -------------------------------
1206 Usage: printf format [argument...]
1208 Formats and prints the given data in a manner similar to the C printf command.
1212 $ printf "Val=%d\n" 5
1215 -------------------------------
1221 Report process status
1223 This version of ps accepts no options.
1228 PID Uid Gid State Command
1230 2 root root S [kflushd]
1231 3 root root S [kupdate]
1232 4 root root S [kpiod]
1233 5 root root S [kswapd]
1234 742 andersen andersen S [bash]
1235 743 andersen andersen S -bash
1236 745 root root S [getty]
1237 2990 andersen andersen R ps
1239 -------------------------------
1243 Prints the full filename of the current working directory.
1250 -------------------------------
1254 Instructs the kernel to reboot the system.
1256 -------------------------------
1260 Usage: rm [OPTION]... FILE...
1262 Remove (unlink) the FILE(s).
1266 -f remove existing destinations, never prompt
1267 -r or -R remove the contents of directories recursively
1273 -------------------------------
1277 Usage: rmdir [OPTION]... DIRECTORY...
1279 Remove the DIRECTORY(ies), if they are empty.
1285 -------------------------------
1289 Usage: rmmod [OPTION]... [MODULE]...
1291 Unloads the specified kernel modules from the kernel.
1295 -a Try to remove all unused kernel modules.
1301 -------------------------------
1305 Usage: sed [B<-n>] B<-e> script [file...]
1307 Allowed sed scripts come in the following form:
1311 where address ADDR can be:
1312 NUMBER Match specified line number
1314 /REGEXP/ Match specified regexp
1315 (! inverts the meaning of the match)
1318 s/regexp/replacement/[igp]
1319 which attempt to match regexp against the pattern space
1320 and if successful replaces the matched portion with replacement.
1323 which appends TEXT after the pattern space
1327 -e add the script to the commands to be executed
1328 -n suppress automatic printing of pattern space
1330 This version of sed matches full regular expresions.
1334 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1337 -------------------------------
1341 Usage: setkeycodes SCANCODE KEYCODE ...
1343 Set entries into the kernel's scancode-to-keycode map,
1344 allowing unusual keyboards to generate usable keycodes.
1346 SCANCODE may be either xx or e0xx (hexadecimal),
1347 and KEYCODE is given in decimal
1351 # setkeycodes e030 127
1353 -------------------------------
1359 lash -- the BusyBox LAme SHell (command interpreter)
1361 This command does not yet have proper documentation.
1363 Use lash just as you would use any other shell. It properly handles pipes,
1364 redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1365 has a sufficient set of builtins to do what is needed. It does not (yet)
1366 support Bourne Shell syntax. If you need things like "if-then-else", "while",
1367 and such, use ash or bash. If you just need a very simple and extremely small
1368 shell, this will do the job.
1370 -------------------------------
1374 Usage: sfdisk [options] device ...
1376 device: something like /dev/hda or /dev/sda
1380 -s [or --show-size]: list size of a partition
1381 -c [or --id]: print or change partition Id
1382 -l [or --list]: list partitions of each device
1383 -d [or --dump]: idem, but in a format suitable for later input
1384 -i [or --increment]: number cylinders etc. from 1 instead of from 0
1385 -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB
1386 -T [or --list-types]:list the known partition types
1387 -D [or --DOS]: for DOS-compatibility: waste a little space
1388 -R [or --re-read]: make kernel reread partition table
1389 -N# : change only the partition with number #
1390 -n : do not actually write to disk
1391 -O file : save the sectors that will be overwritten to file
1392 -I file : restore these sectors again
1393 -v [or --version]: print version
1394 -? [or --help]: print this message
1398 -g [or --show-geometry]: print the kernel's idea of the geometry
1399 -x [or --show-extended]: also list extended partitions on output
1401 or expect descriptors for them on input
1402 -L [or --Linux]: do not complain about things irrelevant for Linux
1403 -q [or --quiet]: suppress warning messages
1404 You can override the detected geometry using:
1405 -C# [or --cylinders #]:set the number of cylinders to use
1406 -H# [or --heads #]: set the number of heads to use
1407 -S# [or --sectors #]: set the number of sectors to use
1409 You can disable all consistency checking with:
1411 -f [or --force]: do what I say, even if it is stupid
1413 -------------------------------
1419 Pause for N seconds.
1424 [2 second delay results]
1426 -------------------------------
1430 Usage: sort [B<-n>] [B<-r>] [FILE]...
1432 Sorts lines of text in the specified files
1436 $ echo -e "e\nf\nb\nd\nc\na" | sort
1444 -------------------------------
1450 Write all buffered filesystem blocks to disk.
1452 -------------------------------
1456 Usage: syslogd [OPTION]...
1458 Linux system and kernel (provides klogd) logging utility.
1459 Note that this version of syslogd/klogd ignores /etc/syslog.conf.
1463 -m Change the mark timestamp interval. default=20min. 0=off
1464 -n Do not fork into the background (for when run by init)
1465 -K Do not start up the klogd process (by default syslogd spawns klogd).
1466 -O Specify an alternate log file. default=/var/log/messages
1468 -------------------------------
1472 Usage: swapon [OPTION] [device]
1474 Start swapping virtual memory pages on the given device.
1478 -a Start swapping on all swap devices
1480 -------------------------------
1484 Usage: swapoff [OPTION] [device]
1486 Stop swapping virtual memory pages on the given device.
1490 -a Stop swapping on all swap devices
1492 -------------------------------
1496 Usage: tail [OPTION] [FILE]...
1498 Print last 10 lines of each FILE to standard output.
1499 With more than one FILE, precede each with a header giving the
1500 file name. With no FILE, or when FILE is -, read standard input.
1504 -n NUM Print last NUM lines instead of first 10
1505 -f Output data as the file grows. This version
1506 of 'tail -f' supports only one file at a time.
1510 $ tail -n 1 /etc/resolv.conf
1513 -------------------------------
1517 Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
1519 Create, extract, or list files from a tar file. Note that
1520 this version of tar treats hard links as separate files.
1522 Main operation mode:
1530 f name of tarfile or "-" for stdin
1532 --exclude file to exclude
1536 v verbosely list files processed
1540 $ zcat /tmp/tarball.tar.gz | tar -xf -
1541 $ tar -cf /tmp/tarball.tar /usr/local
1543 -------------------------------
1547 Usage: test EXPRESSION
1550 Checks file types and compares values returning an exit
1551 code determined by the value of EXPRESSION.
1568 -------------------------------
1572 Usage: tee [OPTION]... [FILE]...
1574 Copy standard input to each FILE, and also to standard output.
1578 -a append to the given FILEs, do not overwrite
1582 $ echo "Hello" | tee /tmp/foo
1586 -------------------------------
1590 Usage: touch [B<-c>] file [file ...]
1592 Update the last-modified date on (or create) the selected file[s].
1597 /bin/ls: /tmp/foo: No such file or directory
1600 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1602 -------------------------------
1606 Usage: tr [B<-cdsu>] string1 [string2]
1608 Translate, squeeze, and/or delete characters from standard
1609 input, writing to standard output.
1613 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1616 -------------------------------
1620 Returns an exit code of TRUE (0)
1628 -------------------------------
1634 Print the file name of the terminal connected to standard input.
1638 -s print nothing, only return an exit status
1645 -------------------------------
1649 Usage: umount [flags] filesystem|directory
1653 -a: Unmount all file systems
1654 -r: Try to remount devices as read-only if mount is busy
1655 -f: Do not free loop device (if a loop device has been used)
1661 -------------------------------
1665 Usage: uname [OPTION]...
1667 Print certain system information. With no OPTION, same as B<-s>.
1671 -a print all information
1672 -m the machine (hardware) type
1673 -n print the machine's network node hostname
1674 -r print the operating system release
1675 -s print the operating system name
1676 -p print the host processor type
1677 -v print the operating system version
1682 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
1684 -------------------------------
1688 Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1690 Discard all but one of successive identical lines from INPUT
1691 (or standard input), writing to OUTPUT (or standard output).
1695 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1700 -------------------------------
1704 Usage: update [options]
1706 Periodically flushes filesystem buffers.
1710 -S force use of sync(2) instead of flushing
1711 -s SECS call sync this often (default 30)
1712 -f SECS flush some buffers this often (default 5)
1714 -------------------------------
1720 Tells how long the system has been running since boot.
1725 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
1727 -------------------------------
1733 Pauses for N microseconds.
1738 [pauses for 1 second]
1740 -------------------------------
1744 Usage: wc [OPTION]... [FILE]...
1746 Print line, word, and byte counts for each FILE, and a total line if
1747 more than one FILE is specified. With no FILE, read standard input.
1751 -c print the byte counts
1752 -l print the newline counts
1753 -L print the length of the longest line
1754 -w print the word counts
1759 31 46 1365 /etc/passwd
1761 -------------------------------
1767 Prints the user name associated with the current effective user id.
1774 -------------------------------
1778 Usage: yes [OPTION]... [STRING]...
1780 Repeatedly outputs a line with all specified STRING(s), or `y'.
1782 -------------------------------
1786 This is essentially an alias for invoking "gunzip B<-c>", where
1787 it decompresses the file inquestion and send the output to stdout.
1789 -------------------------------
1795 textutils(1), shellutils(1), etc...
1799 Erik Andersen <andersee@debian.org> <andersen@lineo.com>
1803 The following people have contributed code to BusyBox whether
1804 they know it or not.
1806 Erik Andersen <andersee@debian.org>
1810 John Beppu <beppu@lineo.com>
1814 Brian Candler <B.Candler@pobox.com>
1818 Randolph Chung <tausq@debian.org>
1822 Dave Cinege <dcinege@psychosis.com>
1826 Karl M. Hegbloom <karlheg@debian.org>
1830 John Lombardo <john@deltanet.com>
1834 Bruce Perens <bruce@perens.com>
1838 Linus Torvalds <torvalds@transmeta.com>
1842 Charles P. Wright <cpwright@villagenet.com>
1846 Enrique Zanardi <ezanardi@ull.es>
1852 # $Id: busybox.pod,v 1.24 2000/04/28 00:18:56 erik Exp $