The following document includes a continuous description of the current commands, functions and utilities included in the busybox. John Cooper johnc@lineo.com _______________________________________________________________________________________________________ BusyBox 0.38, Functions and the Arguments they Support New Apps that have been added to BusyBox since this document was written: ping, hostname, mkfifo, free, tail, du, tee, head, sort, uniq, lsmod, rmmod, fbset, and loadacm. ______________________________________________________________________________________________________ cat [file] Display file contents to standard output. _______________________________________________________________________________________________________ chmod [-R] Mode,[Mode] file Change file access permissions (mode) of one or more files. -R Follows the directory tree from the current location thru all sub-directories, applying changes. Mode = u User g Group o Other a All Permission = r Read w Write s Set user (or group) ID t Sticky bit file cannot be removed by other than the owner. ________________________________________________________________________________________________________ chown [option] owner[group]file Change owner and (or) group of file to owner and (or) group. Only the current owner or a priveleged user may change an owner. -R Follows the directory tree from the current location thru all sub-directories, applying changes. ________________________________________________________________________________________________________ chgrp [option] newgroup file Change group of file or files to new group name or ID number located in /etc/group. Only the current owner or a priveleged user may change the group name or ID -R Follows the directory tree from the current location thru all sub-directories, applying changes. ________________________________________________________________________________________________________ chroot NEWROOT [Command...] (System Admin Command) Run command with root directory set to NEWROOT. Only the current owner or a priveleged user may use this command. ________________________________________________________________________________________________________ clear Clear screen. ________________________________________________________________________________________________________ cp [option] fileA fileB Copy fileA to fileB or fileA to directory maintaining fileA name. -a archive Maintain file attributes whenever possible. Same as -dpR -d no dereference Maintain hard link relationships between fileA and fileB. No dereference of symbolic links. -p maintain file Maintain all file attributes and information including owner attributes group permissions and time information. -R recursive Copies directories recursively _________________________________________________________________________________________________________ date [option [+format] [date] date [option] [MMDDhhmm[[CC]YY][.SS]] Display the current system date and time. -R RFC-822 string Output an RFC-822 compliant date string. -s set DATE Set date where date is entered in MMDDhhmm etc. format. -u universal Print or set Coordinated Universal Time. _______________________________________________________________________________________________________ dd [if=name] [of=name] [bs=n] [count=n] Copy a file, converting and formatting according to options. Most useful when copying from physical input and output devices. if=fileA (instead of standard input) of=fileB (instead of standard output) bs=n Read and write N Bytes at a time. count=n Copy only n input blocks. Bytes may be suffixed by k for x1024, b for x512 and w for x2. ________________________________________________________________________________________________________ df Display filesystem, number of blocks used, number of blocks available, number of blocks in use, and mount point. ________________________________________________________________________________________________________ dmesg [-c] [-n level] [-s bufsize] (System Admin Command) Display system control messages. Stored in the kernel ring buffer are all messages since the last system boot, or the most recent if the buffer had been full. -c Clear buffer after printing messages. -n level Set the level of system message to be displayed on the console. -s bufsize Display the size of the kernel ring buffer. ________________________________________________________________________________________________________ find [PATH] [EXPRESSION] Search for files in the current directory, and all subdirectories for patterns that match expression. Expressions may consist of the following. -follow Dereference symbolic links. -name PATTERN Find files that match PATTERN. Metacharacters should be escaped or quoted. -print Print full file name, followed by a newline, to standard out. ________________________________________________________________________________________________________ chvt N Change foreground virtual terminal to /dev/ttyN. ________________________________________________________________________________________________________ deallocvt N Deallocate unused virtual terminal /dev/ttyN. ________________________________________________________________________________________________________ fsck.minix [-larvsmf] /dev/name Perform a consistency check for minix filesystems. -l List filenames. -r Perform interactive repairs. -a Perform automatic repairs -v Verbose -s Output superblock information -m Activates minix-like "mode not cleared" warnings. -f Force file system check. ________________________________________________________________________________________________________ mkfs.minix [-c | -l filename ] [-nXX] [-iXX] /dev/name [blocks] Make a minix file system. -c Check device for bad blocks. -n [ 14|30 ] Specify max length of filenames. -i Specify number of inodes for filesystem. -l filename Read the bad blocks list from filename. -v Make a minix version 2 filesystem. ________________________________________________________________________________________________________ grep [OPTIONS] PATTERN [FILE] Search for PATTERN in each FILE or from standard input. -h Suppress prefixing filename on output. -i Ignore case distinctions. -n Print line number with output lines. ________________________________________________________________________________________________________ init The parent of all processes. Only to be run by the kernel. ________________________________________________________________________________________________________ kill [ -s sigspec | -signum | -sigspec ] [pid | job ] or kill -l [ exitstatus ] Currently no information help page for this command ________________________________________________________________________________________________________ ln [option] TARGET... LINK_NAME|DIRECTORY Create a link named LINK_NAME or DIRECTORY to TARGET. -s Make symbolic links instead of hard links. -f Remove existing destination files. ________________________________________________________________________________________________________ ls [ -1acdelnpuxACF ] [FILENAMES] List contents of directories. -1 Single entry per column of output. -a All files including hidden files beginning with a .. -c Files are listed by status change time. -d List directories, not there contents. -e List both full date and full time -l List in long format including permissions, owner, size modification time etc. -n Similar to -l, except use group ID and user ID instead of owner and group names. -p Directories are marked with a /. -u Display files sorted by file access time. -x Display files across the screen in rows. -A Display hidden and all other files except . and ... -C (Default, display files in columns) -F Tag files by type by appending: / to directories * to executables @ to symbolic links | to fifo's = to sockets ________________________________________________________________________________________________________ mkdir [OPTION] directory Create directories if they do not already exist. You must have write permission to create directories. Default mode can be modified by users umask. -m Used to set permission mode. (See chmod description) -p Make parent directories if they don't already exist. Return error code if they already exist. ________________________________________________________________________________________________________ mknod NAME TYPE MAJOR MINOR Make block or character special files. TYPEs include: 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. ________________________________________________________________________________________________________ mkswap [-c] [ -v0|-v1 ] device [block-count] Prepare a disk partition to be used as a swap partition. -c Check for read-ability. -v0 Make version 0 swap [max 128 megs] -v1 Make version 1 swap [big |] default for kernels > 2.1.117. block-count Number of blocks to use. (Default is the entire partition). ________________________________________________________________________________________________________ more [file] Display file one screen page at a time. ________________________________________________________________________________________________________ mount [flags] mount [flags] device directory [-o options, more options ] Mount a filesystem for file access. -a Mount all file systems in fstab. -o option async/sync: Writes are asynchronous/synchronous. dev/nodev: Allow use of special device files /disallow them. exec/noexec: Allow use of executable files /disallow them. suid/nosuid: Allow set-user-id-root programs /disallow them. remount: Remount a currently-mounted filesystem changing it's flags. ro/rw: Mount for read-only/read-write. (There are more flags specific to each filesystem. See the written documentation for those.) -r Mount the filesystem read only. -t FILESYSTEM TYPE Specify the filesystem type. -w Mount for reading and writing default ________________________________________________________________________________________________________ mv fileA fileB or mv fileA dirA Move fileA to fileB. (Renames fileA to fileB) Move fileA to dirA (Moves fileA into dirA) ________________________________________________________________________________________________________ ps Report process status. No options are currently supported. ________________________________________________________________________________________________________ pwd Print working directory ________________________________________________________________________________________________________ reboot Reboot system. No options are currently supported. ________________________________________________________________________________________________________ rm [option] file Remove or unlink the files. -f Remove existing destinations. Never prompt. -r or -R Remove contents of directories recursively. ________________________________________________________________________________________________________ rmdir [OPTION] ... directory Remove directories if they are empty. ________________________________________________________________________________________________________ sed Usage: sed [-n] -e script [file...] Allowed sed scripts come in the following form: 'ADDR [!] COMMAND' where address ADDR can be: NUMBER Match specified line number $ Match last line /REGEXP/ Match specified regexp (! inverts the meaning of the match) and COMMAND can be: s/regexp/replacement/[igp] which attempt to match regexp against the pattern space and if successful replaces the matched portion with replacement. aTEXT which appends TEXT after the pattern space Options: -e add the script to the commands to be executed -n suppress automatic printing of pattern space This version of sed matches full regular expresions. ________________________________________________________________________________________________________ sleep N Pause for N seconds. ________________________________________________________________________________________________________ tar -[cxtvOf] [tarFileName] [file] Create, extract or list files from a tar file. c=create x=extract t=list contents v=verbose O=extract to stdout f=tarfile or "-" for standard input ________________________________________________________________________________________________________ swapon device Start swapping virtual memory pages on the given device. ________________________________________________________________________________________________________ swapoff device Stop swapping virtual memory pages on the given device. ________________________________________________________________________________________________________ sync Write all buffered filesystem blocks to disk. ________________________________________________________________________________________________________ touch [-c] file [file...] Update the last modified date on given file(s). ________________________________________________________________________________________________________ true A null command that returns a successful 0 exit status code. (See false) ________________________________________________________________________________________________________ false A null command that returns an unsuccessful or non-zero exit status. ________________________________________________________________________________________________________ uname [option] Print certain system information. With no option, same as -s. -a Display all information -m Display machine hardware type. -n Display machine network node hostname. -r Display OS release -s Display OS Name. -p Display Host processor type. -v Display OS Version. ________________________________________________________________________________________________________ umount [flags] filesystem | directory Unmounts designated filesystem previously mounted on device. -a Unmount all file systems. ________________________________________________________________________________________________________ update cvs update [options] files Incorporates recent changes from the repository into files in your working directory. No options are currently supported. ________________________________________________________________________________________________________ zcat [options] files Usage: zcat [OPTION]... FILE Uncompress FILE (or standard input if FILE is '-'). (When invoked as zcat, defaults to having -c turned on) Options: -c Write output to standard output -t Test compressed file integrity ________________________________________________________________________________________________________ gunzip (Same as zcat, but without the "-c" option.) ________________________________________________________________________________________________________ gzip [OPTION]... FILE Compress FILE with maximum compression. When FILE is -, reads standard input. Implies -c. Options: -c Write output to standard output instead of FILE.gz ________________________________________________________________________________________________________ loadfont No information available with --help. ________________________________________________________________________________________________________ loadkmap No information available with --help ________________________________________________________________________________________________________ linuxrc No information available with --help ________________________________________________________________________________________________________