BusyBox combines tiny versions of many common UNIX utilities into a single
small executable. It provides minimalist replacements for most of the utilities
you usually find in fileutils, shellutils, findutils, textutils, grep, gzip,
tar, etc. BusyBox provides a fairly complete POSIX environment for any small
or embedded system. The utilities in BusyBox generally have fewer options than
their full-featured GNU cousins; however, the options that are included provide
the expected functionality and behave very much like their GNU counterparts.

BusyBox has been written with size-optimization and limited resources in mind.
It is also extremely modular so you can easily include or exclude commands (or
features) at compile time. This makes it easy to customize your embedded
systems. To create a working system, just add a kernel, a shell (such as ash),
and an editor (such as elvis-tiny or ae).

-b LIST Output only bytes from LIST
-c LIST Output only characters from LIST
-d CHAR Use CHAR instead of tab as the field delimiter
-s Output only the lines containing delimiter
-f N Print only these fields
-n Ignored

Beware that many operators need to be escaped or quoted for shells.
Comparisons are arithmetic if both ARGs are numbers, else
lexicographical. Pattern matches return the string matched between
\( and \) or null; if \( and \) are not used, they return the number
of characters matched or 0.

-type X Filetype matches X (where X is one of: f,d,l,b,c,...)
-perm PERMS Permissions match any of (+NNN); all of (-NNN);
or exactly (NNN)
-mtime TIME Modified time is greater than (+N); less than (-N);
or exactly (N) days
-newer FILE Modified time is more recent than FILE's

-a, --alternative Allow long options starting with single -
-l, --longoptions=longopts Long options to be recognized
-n, --name=progname The name under which errors are reported
-o, --options=optstring Short options to be recognized
-q, --quiet Disable error reporting by getopt(3)
-Q, --quiet-output No normal output
-s, --shell=shell Set shell quoting conventions
-T, --test Test for getopt(1) version
-u, --unqote Do not quote the output

if it detects that /dev/console is _not_ a serial console, it will also run:

tty2::askfirst:/bin/sh
tty3::askfirst:/bin/sh
tty4::askfirst:/bin/sh

If you choose to use an /etc/inittab file, the inittab entry format is as follows:

<id>:<runlevels>:<action>:<process>

<id>:

WARNING: This field has a non-traditional meaning for BusyBox init!
The id field is used by BusyBox init to specify the controlling tty for
the specified process to run on. The contents of this field are
appended to "/dev/" and used as-is. There is no need for this field to
be unique, although if it isn't you may have strange results. If this
field is left blank, the controlling tty is set to the console. Also
note that if BusyBox detects that a serial console is in use, then only
entries whose controlling tty is either the serial console or /dev/null
will be run. BusyBox init does nothing with utmp. We don't need no
stinkin' utmp.

The available actions can be classified into two groups: actions
that are run only once, and actions that are re-run when the specified
process exits.

Run only-once actions:

'sysinit' is the first item run on boot. init waits until all
sysinit actions are completed before continuing. Following the
completion of all sysinit actions, all 'wait' actions are run.
'wait' actions, like 'sysinit' actions, cause init to wait until
the specified task completes. 'once' actions are asynchronous,
therefore, init does not wait for them to complete. 'restart' is
the action taken to restart the init process. By default this should
simply run /sbin/init, but can be a script which runs pivot_root or it
can do all sorts of other interesting things. The 'ctrlaltdel' init
actions are run when the system detects that someone on the system
console has pressed the CTRL-ALT-DEL key combination. Typically one
wants to run 'reboot' at this point to cause the system to reboot.
Finally the 'shutdown' action specifies the actions to taken when
init is told to reboot. Unmounting filesystems and disabling swap
is a very good here

Run repeatedly actions:

'respawn' actions are run after the 'once' actions. When a process
started with a 'respawn' action exits, init automatically restarts
it. Unlike sysvinit, BusyBox init does not stop processes from
respawning out of control. The 'askfirst' actions acts just like
respawn, except that before running the specified process it
displays the line "Please press Enter to activate this console."
and then waits for the user to press enter before starting the
specified process.

Unrecognized actions (like initdefault) will cause init to emit an
error message, and then go along with its business. All actions are
run in the reverse order from how they appear in /etc/inittab.

<process>:

Specifies the process to be executed and it's command line.

Example /etc/inittab file:

# This is run first except when booting in single-user mode.
#
::sysinit:/etc/init.d/rcS

Use lash just as you would use any other shell. It properly handles pipes,
redirects, job control, can be used as the shell for scripts, and has a
sufficient set of builtins to do what is needed. It does not (yet) support
Bourne Shell syntax. If you need things like ``if-then-else'', ``while'', and such
use ash or bash. If you just need a very simple and extremely small shell,
this will do the job.

-s Log to stderr as well as the system log.
-t Log using the specified tag (defaults to user name).
-p Enter the message with the specified priority.
This may be numerical or a ``facility.level'' pair.

-1 list files in a single column
-A do not list implied . and ..
-a do not hide entries starting with .
-C list entries by columns
-c with -l: show ctime
-d list directory entries instead of contents
-e list both full date and full time
-F append indicator (one of */=@|) to entries
-i list the i-node for each file
-l use a long listing format
-n list numeric UIDs and GIDs instead of names
-p append indicator (one of /=@|) to entries
-L list entries pointed to by symbolic links
-R list subdirectories recursively
-r sort the listing in reverse order
-S sort the listing by file size
-s list the size of each file, in blocks
-T NUM assume Tabstop every NUM columns
-t with -l: show modification time
-u with -l: show access time
-v sort the listing by version
-w NUM assume the terminal is NUM columns wide
-x list entries by lines instead of by columns
-X sort the listing by extension
-h print sizes in human readable format (e.g., 1K 243M 2G )
-k print sizes in kilobytes(default)

b: Make a block (buffered) device.
c or u: Make a character (un-buffered) device.
p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.

FIRST specifies the number appended to NAME to create the first device.
LAST specifies the number of the last item that should be created.
If 's' is the last argument, the base device is created as well.

-c Check the device for bad blocks
-n [14|30] Specify the maximum length of filenames
-i INODES Specify the number of inodes for the filesystem
-l FILENAME Read the bad blocks list from FILENAME
-v Make a Minix version 2 filesystem

-n suppress automatic printing of pattern space
-e script add the script to the commands to be executed
-f scriptfile add the contents of script-file to the commands to be executed

If no -e or -f is given, the first non-option argument is taken as the
sed script to interpret. All remaining arguments are names of input
files; if no input files are specified, then the standard input is read.

If the first character of N (bytes or lines) is a '+', output begins with
the Nth item from the start of each file, otherwise, print the last N items
in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).

-d set SO_DEBUG options to socket
-n Print hop addresses numerically rather than symbolically
-r Bypass the normal routing tables and send directly to a host
-v Verbose output
-m max_ttl Set the max time-to-live (max number of hops)
-p port# Set the base UDP port number used in probes
(default is 33434)
-q nqueries Set the number of probes per ``ttl'' to nqueries
(default is 3)
-s src_addr Use the following IP address as the source address
-t tos Set the type-of-service in probe packets to the following value
(default 0)
-w wait Set the time (in seconds) to wait for a response to a probe
(default 3 sec.).

GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
library for the local environment, and to configure how it reads system data,
such as passwords and group information. BusyBox has made it Policy that it
will never use NSS, and will never use and libc calls that make use of NSS.
This allows you to run an embedded system without the need for installing an
/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.

If you are using a system that is using a remote LDAP server for authentication
via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
BusyBox source. Chances are though, that if you have enough space to install
of that stuff on your system, then you probably want the full GNU utilities.