menu "Posix commands"

# toys/posix/basename.c
config BASENAME
  bool "basename"
  default y
  help
    usage: basename [-a] [-s SUFFIX] NAME... | NAME [SUFFIX]

    Return non-directory portion of a pathname removing suffix.

    -a		All arguments are names
    -s SUFFIX	Remove suffix (implies -a)

# toys/posix/cal.c
config CAL
  bool "cal"
  default y
  help
    usage: cal [[MONTH] YEAR]

    Print a calendar.

    With one argument, prints all months of the specified year.
    With two arguments, prints calendar for month and year.

    -h	Don't highlight today

# toys/posix/cat.c
config CAT
  bool "cat"
  default y
  help
    usage: cat [-u] [FILE...]

    Copy (concatenate) files to stdout.  If no files listed, copy from stdin.
    Filename "-" is a synonym for stdin.

    -u	Copy one byte at a time (slow)

config CAT_V
  bool "cat -etv"
  default n
  depends on CAT
  help
    usage: cat [-evt]

    -e	Mark each newline with $
    -t	Show tabs as ^I
    -v	Display nonprinting characters as escape sequences with M-x for
    	high ascii characters (>127), and ^x for other nonprinting chars

config CATV
  bool "catv"
  default y
  help
    usage: catv [-evt] [FILE...]

    Display nonprinting characters as escape sequences. Use M-x for
    high ascii characters (>127), and ^x for other nonprinting chars.

    -e	Mark each newline with $
    -t	Show tabs as ^I
    -v	Don't use ^x or M-x escapes

# toys/posix/chgrp.c
config CHGRP
  bool "chgrp"
  default y
  help
    usage: chgrp/chown [-RHLP] [-fvh] GROUP FILE...

    Change group of one or more files.

    -f	Suppress most error messages
    -h	Change symlinks instead of what they point to
    -R	Recurse into subdirectories (implies -h)
    -H	With -R change target of symlink, follow command line symlinks
    -L	With -R change target of symlink, follow all symlinks
    -P	With -R change symlink, do not follow symlinks (default)
    -v	Verbose

config CHOWN
  bool "chown"
  default y
  help
    see: chgrp

# toys/posix/chmod.c
config CHMOD
  bool "chmod"
  default y
  help
    usage: chmod [-R] MODE FILE...

    Change mode of listed file[s] (recursively with -R).

    MODE can be (comma-separated) stanzas: [ugoa][+-=][rwxstXugo]

    Stanzas are applied in order: For each category (u = user,
    g = group, o = other, a = all three, if none specified default is a),
    set (+), clear (-), or copy (=), r = read, w = write, x = execute.
    s = u+s = suid, g+s = sgid, o+s = sticky. (+t is an alias for o+s).
    suid/sgid: execute as the user/group who owns the file.
    sticky: can't delete files you don't own out of this directory
    X = x for directories or if any category already has x set.

    Or MODE can be an octal value up to 7777	ug uuugggooo	top +
    bit 1 = o+x, bit 1<<8 = u+w, 1<<11 = g+1	sstrwxrwxrwx	bottom

    Examples:
    chmod u+w file - allow owner of "file" to write to it.
    chmod 744 file - user can read/write/execute, everyone else read only

# toys/posix/cksum.c
config CKSUM
  bool "cksum"
  default y
  help
    usage: cksum [-IPLN] [FILE...]

    For each file, output crc32 checksum value, length and name of file.
    If no files listed, copy from stdin.  Filename "-" is a synonym for stdin.

    -H	Hexadecimal checksum (defaults to decimal)
    -L	Little endian (defaults to big endian)
    -P	Pre-inversion
    -I	Skip post-inversion
    -N	Do not include length in CRC calculation (or output)

config CRC32
  bool "crc32"
  default y
  help
    usage: crc32 [file...]

    Output crc32 checksum for each file.

# toys/posix/cmp.c
config CMP
  bool "cmp"
  default y
  help
    usage: cmp [-l] [-s] FILE1 [FILE2 [SKIP1 [SKIP2]]]

    Compare the contents of two files. (Or stdin and file if only one given.)

    -l	Show all differing bytes
    -s	Silent

# toys/posix/comm.c
config COMM
  bool "comm"
  default y
  help
    usage: comm [-123] FILE1 FILE2

    Read FILE1 and FILE2, which should be ordered, and produce three text
    columns as output: lines only in FILE1; lines only in FILE2; and lines
    in both files. Filename "-" is a synonym for stdin.

    -1	Suppress the output column of lines unique to FILE1
    -2	Suppress the output column of lines unique to FILE2
    -3	Suppress the output column of lines duplicated in FILE1 and FILE2

# toys/posix/cp.c
config CP
  bool "cp"
  default y
  help
    usage: cp [-adfHiLlnPpRrsTv] [--preserve=motcxa] SOURCE... DEST

    Copy files from SOURCE to DEST.  If more than one SOURCE, DEST must
    be a directory.

    -a	Same as -dpr
    -D	Create leading dirs under DEST (--parents)
    -d	Don't dereference symlinks
    -F	Delete any existing destination file first (--remove-destination)
    -f	Delete destination files we can't write to
    -H	Follow symlinks listed on command line
    -i	Interactive, prompt before overwriting existing DEST
    -L	Follow all symlinks
    -l	Hard link instead of copy
    -n	No clobber (don't overwrite DEST)
    -P	Do not follow symlinks [default]
    -p	Preserve timestamps, ownership, and mode
    -R	Recurse into subdirectories (DEST must be a directory)
    -r	Synonym for -R
    -s	Symlink instead of copy
    -T	DEST always treated as file, max 2 arguments
    -v	Verbose

    Arguments to --preserve are the first letter(s) of:

            mode - permissions (ignore umask for rwx, copy suid and sticky bit)
       ownership - user and group
      timestamps - file creation, modification, and access times.
         context - security context
           xattr - extended attributes
             all - all of the above

config MV
  bool "mv"
  default y
  help
    usage: mv [-finTv] SOURCE... DEST

    -f	Force copy by deleting destination file
    -i	Interactive, prompt before overwriting existing DEST
    -n	No clobber (don't overwrite DEST)
    -T	DEST always treated as file, max 2 arguments
    -v	Verbose

config INSTALL
  bool "install"
  default y
  help
    usage: install [-dDpsv] [-o USER] [-g GROUP] [-m MODE] [SOURCE...] DEST

    Copy files and set attributes.

    -d	Act like mkdir -p
    -D	Create leading directories for DEST
    -g	Make copy belong to GROUP
    -m	Set permissions to MODE
    -o	Make copy belong to USER
    -p	Preserve timestamps
    -s	Call "strip -p"
    -v	Verbose

# toys/posix/cpio.c
config CPIO
  bool "cpio"
  default y
  help
    usage: cpio -{o|t|i|p DEST} [-v] [--verbose] [-F FILE] [--no-preserve-owner]
           [ignored: -mdu -H newc]

    Copy files into and out of a "newc" format cpio archive.

    -F FILE	Use archive FILE instead of stdin/stdout
    -p DEST	Copy-pass mode, copy stdin file list to directory DEST
    -i	Extract from archive into file system (stdin=archive)
    -o	Create archive (stdin=list of files, stdout=archive)
    -t	Test files (list only, stdin=archive, stdout=list of files)
    -v	Verbose
    --no-preserve-owner (don't set ownership during extract)

# toys/posix/cut.c
config CUT
  bool "cut"
  default y
  help
    usage: cut [-Ds] [-bcfF LIST] [-dO DELIM] [FILE...]

    Print selected parts of lines from each FILE to standard output.

    Each selection LIST is comma separated, either numbers (counting from 1)
    or dash separated ranges (inclusive, with X- meaning to end of line and -X
    from start). By default selection ranges are sorted and collated, use -D
    to prevent that.

    -b	Select bytes
    -c	Select UTF-8 characters
    -C	Select unicode columns
    -d	Use DELIM (default is TAB for -f, run of whitespace for -F)
    -D	Don't sort/collate selections or match -fF lines without delimiter
    -f	Select fields (words) separated by single DELIM character
    -F	Select fields separated by DELIM regex
    -O	Output delimiter (default one space for -F, input delim for -f)
    -s	Skip lines without delimiters

# toys/posix/date.c
config DATE
  bool "date"
  default y
  help
    usage: date [-u] [-r FILE] [-d DATE] [+DISPLAY_FORMAT] [-D SET_FORMAT] [SET]

    Set/get the current date/time. With no SET shows the current date.

    -d	Show DATE instead of current time (convert date format)
    -D	+FORMAT for SET or -d (instead of MMDDhhmm[[CC]YY][.ss])
    -r	Use modification time of FILE instead of current date
    -u	Use UTC instead of current timezone

    Supported input formats:

    MMDDhhmm[[CC]YY][.ss]     POSIX
    @UNIXTIME[.FRACTION]      seconds since midnight 1970-01-01
    YYYY-MM-DD [hh:mm[:ss]]   ISO 8601
    hh:mm[:ss]                24-hour time today

    All input formats can be preceded by TZ="id" to set the input time zone
    separately from the output time zone. Otherwise $TZ sets both.

    +FORMAT specifies display format string using strftime(3) syntax:

    %% literal %             %n newline              %t tab
    %S seconds (00-60)       %M minute (00-59)       %m month (01-12)
    %H hour (0-23)           %I hour (01-12)         %p AM/PM
    %y short year (00-99)    %Y year                 %C century
    %a short weekday name    %A weekday name         %u day of week (1-7, 1=mon)
    %b short month name      %B month name           %Z timezone name
    %j day of year (001-366) %d day of month (01-31) %e day of month ( 1-31)
    %N nanosec (output only)

    %U Week of year (0-53 start Sunday)   %W Week of year (0-53 start Monday)
    %V Week of year (1-53 start Monday, week < 4 days not part of this year)

    %F "%Y-%m-%d"     %R "%H:%M"        %T "%H:%M:%S"    %z numeric timezone
    %D "%m/%d/%y"     %r "%I:%M:%S %p"  %h "%b"          %s unix epoch time
    %x locale date    %X locale time    %c locale date/time

# toys/posix/df.c
config DF
  bool "df"
  default y
  help
    usage: df [-HPkhi] [-t type] [FILE...]

    The "disk free" command shows total/used/available disk space for
    each filesystem listed on the command line, or all currently mounted
    filesystems.

    -a	Show all (including /proc and friends)
    -P	The SUSv3 "Pedantic" option
    -k	Sets units back to 1024 bytes (the default without -P)
    -h	Human readable (K=1024)
    -H	Human readable (k=1000)
    -i	Show inodes instead of blocks
    -t type	Display only filesystems of this type

    Pedantic provides a slightly less useful output format dictated by Posix,
    and sets the units to 512 bytes instead of the default 1024 bytes.

# toys/posix/dirname.c
config DIRNAME
  bool "dirname"
  default y
  help
    usage: dirname PATH...

    Show directory portion of path.

# toys/posix/du.c
config DU
  bool "du"
  default y
  help
    usage: du [-d N] [-askxHLlmc] [FILE...]

    Show disk usage, space consumed by files and directories.

    Size in:
    -b	Apparent bytes (directory listing size, not space used)
    -k	1024 byte blocks (default)
    -K	512 byte blocks (posix)
    -m	Megabytes
    -h	Human readable (e.g., 1K 243M 2G)

    What to show:
    -a	All files, not just directories
    -H	Follow symlinks on cmdline
    -L	Follow all symlinks
    -s	Only total size of each argument
    -x	Don't leave this filesystem
    -c	Cumulative total
    -d N	Only depth < N
    -l	Disable hardlink filter

# toys/posix/echo.c
config ECHO
  bool "echo"
  default y
  help
    usage: echo [-neE] [ARG...]

    Write each argument to stdout, with one space between each, followed
    by a newline.

    -n	No trailing newline
    -E	Print escape sequences literally (default)
    -e	Process the following escape sequences:
    	\\	Backslash
    	\0NNN	Octal values (1 to 3 digits)
    	\a	Alert (beep/flash)
    	\b	Backspace
    	\c	Stop output here (avoids trailing newline)
    	\f	Form feed
    	\n	Newline
    	\r	Carriage return
    	\t	Horizontal tab
    	\v	Vertical tab
    	\xHH	Hexadecimal values (1 to 2 digits)

# toys/posix/env.c
config ENV
  bool "env"
  default y
  help
    usage: env [-i] [-u NAME] [NAME=VALUE...] [COMMAND...]

    Set the environment for command invocation, or list environment variables.

    -i	Clear existing environment
    -u NAME	Remove NAME from the environment
    -0	Use null instead of newline in output

# toys/posix/expand.c
config EXPAND
  bool "expand"
  default y
  help
    usage: expand [-t TABLIST] [FILE...]

    Expand tabs to spaces according to tabstops.

    -t	TABLIST

    Specify tab stops, either a single number instead of the default 8,
    or a comma separated list of increasing numbers representing tabstop
    positions (absolute, not increments) with each additional tab beyond
    that becoming one space.

# toys/posix/false.c
config FALSE
  bool "false"
  default y
  help
    usage: false

    Return nonzero.

# toys/posix/file.c
config FILE
  bool "file"
  default y
  help
    usage: file [-bhLs] [FILE...]

    Examine the given files and describe their content types.

    -b	Brief (no filename)
    -h	Don't follow symlinks (default)
    -L	Follow symlinks
    -s	Show block/char device contents

# toys/posix/find.c
config FIND
  bool "find"
  default y
  help
    usage: find [-HL] [DIR...] [<options>]

    Search directories for matching files.
    Default: search ".", match all, -print matches.

    -H  Follow command line symlinks         -L  Follow all symlinks

    Match filters:
    -name  PATTERN   filename with wildcards  (-iname case insensitive)
    -path  PATTERN   path name with wildcards (-ipath case insensitive)
    -user  UNAME     belongs to user UNAME     -nouser     user ID not known
    -group GROUP     belongs to group GROUP    -nogroup    group ID not known
    -perm  [-/]MODE  permissions (-=min /=any) -prune      ignore dir contents
    -size  N[c]      512 byte blocks (c=bytes) -xdev       only this filesystem
    -links N         hardlink count            -atime N[u] accessed N units ago
    -ctime N[u]      created N units ago       -mtime N[u] modified N units ago
    -newer FILE      newer mtime than FILE     -mindepth N at least N dirs down
    -depth           ignore contents of dir    -maxdepth N at most N dirs down
    -inum N          inode number N            -empty      empty files and dirs
    -type [bcdflps]  type is (block, char, dir, file, symlink, pipe, socket)
    -true            always true               -false      always false
    -context PATTERN security context
    -newerXY FILE    X=acm time > FILE's Y=acm time (Y=t: FILE is literal time)

    Numbers N may be prefixed by a - (less than) or + (greater than). Units for
    -Xtime are d (days, default), h (hours), m (minutes), or s (seconds).

    Combine matches with:
    !, -a, -o, ( )    not, and, or, group expressions

    Actions:
    -print  Print match with newline  -print0        Print match with null
    -exec   Run command with path     -execdir       Run command in file's dir
    -ok     Ask before exec           -okdir         Ask before execdir
    -delete Remove matching file/dir  -printf FORMAT Print using format string

    Commands substitute "{}" with matched file. End with ";" to run each file,
    or "+" (next argument after "{}") to collect and run with multiple files.

    -printf FORMAT characters are \ escapes and:
    %b  512 byte blocks used
    %f  basename            %g  textual gid          %G  numeric gid
    %i  decimal inode       %l  target of symlink    %m  octal mode
    %M  ls format type/mode %p  path to file         %P  path to file minus DIR
    %s  size in bytes       %T@ mod time as unixtime
    %u  username            %U  numeric uid          %Z  security context

# toys/posix/getconf.c
config GETCONF
  bool "getconf"
  default y
  help
    usage: getconf -a [PATH] | -l | NAME [PATH]

    Get system configuration values. Values from pathconf(3) require a path.

    -a	Show all (defaults to "/" if no path given)
    -l	List available value names (grouped by source)

# toys/posix/grep.c
config GREP
  bool "grep"
  default y
  help
    usage: grep [-EFrivwcloqsHbhn] [-ABC NUM] [-m MAX] [-e REGEX]... [-MS PATTERN]... [-f REGFILE] [FILE]...

    Show lines matching regular expressions. If no -e, first argument is
    regular expression to match. With no files (or "-" filename) read stdin.
    Returns 0 if matched, 1 if no match found, 2 for command errors.

    -e  Regex to match. (May be repeated.)
    -f  File listing regular expressions to match.

    file search:
    -r  Recurse into subdirectories (defaults FILE to ".")
    -R  Recurse into subdirectories and symlinks to directories
    -M  Match filename pattern (--include)
    -S  Skip filename pattern (--exclude)
    --exclude-dir=PATTERN  Skip directory pattern
    -I  Ignore binary files

    match type:
    -A  Show NUM lines after     -B  Show NUM lines before match
    -C  NUM lines context (A+B)  -E  extended regex syntax
    -F  fixed (literal match)    -a  always text (not binary)
    -i  case insensitive         -m  match MAX many lines
    -v  invert match             -w  whole word (implies -E)
    -x  whole line               -z  input NUL terminated

    display modes: (default: matched line)
    -c  count of matching lines  -l  show only matching filenames
    -o  only matching part       -q  quiet (errors only)
    -s  silent (no error msg)    -Z  output NUL terminated

    output prefix (default: filename if checking more than 1 file)
    -H  force filename           -b  byte offset of match
    -h  hide filename            -n  line number of match

config EGREP
  bool
  default y
  depends on GREP

config FGREP
  bool
  default y
  depends on GREP

# toys/posix/head.c
config HEAD
  bool "head"
  default y
  help
    usage: head [-n NUM] [FILE...]

    Copy first lines from files to stdout. If no files listed, copy from
    stdin. Filename "-" is a synonym for stdin.

    -n	Number of lines to copy
    -c	Number of bytes to copy
    -q	Never print headers
    -v	Always print headers

# toys/posix/iconv.c
config ICONV
  bool "iconv"
  default y
  depends on TOYBOX_ICONV
  help
    usage: iconv [-f FROM] [-t TO] [FILE...]

    Convert character encoding of files.

    -c	Omit invalid chars
    -f	Convert from (default UTF-8)
    -t	Convert to   (default UTF-8)

# toys/posix/id.c
config ID
  bool "id"
  default y
  help
    usage: id [-nGgru] [USER...]

    Print user and group ID.

    -G	Show all group IDs
    -g	Show only the effective group ID
    -n	Print names instead of numeric IDs (to be used with -Ggu)
    -r	Show real ID instead of effective ID
    -u	Show only the effective user ID

config ID_Z
  bool
  default y
  depends on ID && !TOYBOX_LSM_NONE
  help
    usage: id [-Z]

    -Z	Show only security context

config GROUPS
  bool "groups"
  default y
  help
    usage: groups [user]

    Print the groups a user is in.

config LOGNAME
  bool "logname"
  default y
  help
    usage: logname

    Print the current user name.

config WHOAMI
  bool "whoami"
  default y
  help
    usage: whoami

    Print the current user name.

# toys/posix/kill.c
config KILL
  bool "kill"
  default y
  help
    usage: kill [-l [SIGNAL] | -s SIGNAL | -SIGNAL] PID...

    Send signal to process(es).

    -l	List signal name(s) and number(s)
    -s	Send SIGNAL (default SIGTERM)

config KILLALL5
  bool "killall5"
  default y
  depends on KILL
  help
    usage: killall5 [-l [SIGNAL]] [-SIGNAL|-s SIGNAL] [-o PID]...

    Send a signal to all processes outside current session.

    -l	List signal name(s) and number(s)
    -o PID	Omit PID
    -s	Send SIGNAL (default SIGTERM)

# toys/posix/link.c
config LINK
  bool "link"
  default y
  help
    usage: link FILE NEWLINK

    Create hardlink to a file.

# toys/posix/ln.c
config LN
  bool "ln"
  default y
  help
    usage: ln [-sfnv] [-t DIR] [FROM...] TO

    Create a link between FROM and TO.
    One/two/many arguments work like "mv" or "cp".

    -s	Create a symbolic link
    -f	Force the creation of the link, even if TO already exists
    -n	Symlink at TO treated as file
    -r	Create relative symlink from -> to
    -t	Create links in DIR
    -T	TO always treated as file, max 2 arguments
    -v	Verbose

# toys/posix/logger.c
config LOGGER
  bool "logger"
  default y
  help
    usage: logger [-s] [-t TAG] [-p [FACILITY.]PRIORITY] [MESSAGE...]

    Log message (or stdin) to syslog.

    -s	Also write message to stderr
    -t	Use TAG instead of username to identify message source
    -p	Specify PRIORITY with optional FACILITY. Default is "user.notice"

# toys/posix/ls.c
config LS
  bool "ls"
  default y
  help
    usage: ls [-ACFHLRSZacdfhiklmnpqrstuwx1] [--color[=auto]] [FILE...]

    List files.

    what to show:
    -a  all files including .hidden    -b  escape nongraphic chars
    -c  use ctime for timestamps       -d  directory, not contents
    -i  inode number                   -p  put a '/' after dir names
    -q  unprintable chars as '?'       -s  storage used (1024 byte units)
    -u  use access time for timestamps -A  list all files but . and ..
    -H  follow command line symlinks   -L  follow symlinks
    -R  recursively list in subdirs    -F  append /dir *exe @sym |FIFO
    -Z  security context

    output formats:
    -1  list one file per line         -C  columns (sorted vertically)
    -g  like -l but no owner           -h  human readable sizes
    -l  long (show full details)       -m  comma separated
    -n  like -l but numeric uid/gid    -o  like -l but no group
    -w  set column width               -x  columns (horizontal sort)
    -ll long with nanoseconds (--full-time)
    --color  device=yellow  symlink=turquoise/red  dir=blue  socket=purple
             files: exe=green  suid=red  suidfile=redback  stickydir=greenback
             =auto means detect if output is a tty.

    sorting (default is alphabetical):
    -f  unsorted    -r  reverse    -t  timestamp    -S  size

# toys/posix/mkdir.c
config MKDIR
  bool "mkdir"
  default y
  help
    usage: mkdir [-vp] [-m MODE] [DIR...]

    Create one or more directories.

    -m	Set permissions of directory to mode
    -p	Make parent directories as needed
    -v	Verbose

config MKDIR_Z
  bool
  default y
  depends on MKDIR && !TOYBOX_LSM_NONE
  help
    usage: [-Z context]

    -Z	Set security context

# toys/posix/mkfifo.c
config MKFIFO
  bool "mkfifo"
  default y
  help
    usage: mkfifo [NAME...]

    Create FIFOs (named pipes).

config MKFIFO_Z
  bool
  default y
  depends on MKFIFO && !TOYBOX_LSM_NONE
  help
    usage: mkfifo [-Z CONTEXT]

    -Z	Security context

# toys/posix/nice.c
config NICE
  bool "nice"
  default y
  help
    usage: nice [-n PRIORITY] COMMAND...

    Run a command line at an increased or decreased scheduling priority.

    Higher numbers make a program yield more CPU time, from -20 (highest
    priority) to 19 (lowest).  By default processes inherit their parent's
    niceness (usually 0).  By default this command adds 10 to the parent's
    priority.  Only root can set a negative niceness level.

# toys/posix/nl.c
config NL
  bool "nl"
  default y
  help
    usage: nl [-E] [-l #] [-b MODE] [-n STYLE] [-s SEPARATOR] [-v #] [-w WIDTH] [FILE...]

    Number lines of input.

    -E	Use extended regex syntax (when doing -b pREGEX)
    -b	Which lines to number: a (all) t (non-empty, default) pREGEX (pattern)
    -l	Only count last of this many consecutive blank lines
    -n	Number STYLE: ln (left justified) rn (right justified) rz (zero pad)
    -s	Separator to use between number and line (instead of TAB)
    -v	Starting line number for each section (default 1)
    -w	Width of line numbers (default 6)

# toys/posix/nohup.c
config NOHUP
  bool "nohup"
  default y
  help
    usage: nohup COMMAND...

    Run a command that survives the end of its terminal.

    Redirect tty on stdin to /dev/null, tty on stdout to "nohup.out".

# toys/posix/od.c
config OD
  bool "od"
  default y
  help
    usage: od [-bcdosxv] [-j #] [-N #] [-w #] [-A doxn] [-t acdfoux[#]]

    Dump data in octal/hex.

    -A	Address base (decimal, octal, hexadecimal, none)
    -j	Skip this many bytes of input
    -N	Stop dumping after this many bytes
    -t	Output type a(scii) c(har) d(ecimal) f(loat) o(ctal) u(nsigned) (he)x
    	plus optional size in bytes
    	aliases: -b=-t o1, -c=-t c, -d=-t u2, -o=-t o2, -s=-t d2, -x=-t x2
    -v	Don't collapse repeated lines together
    -w	Total line width in bytes (default 16)

# toys/posix/paste.c
config PASTE
  bool "paste"
  default y
  help
    usage: paste [-s] [-d DELIMITERS] [FILE...]

    Merge corresponding lines from each input file.

    -d	List of delimiter characters to separate fields with (default is \t)
    -s	Sequential mode: turn each input file into one line of output

# toys/posix/patch.c
config PATCH
  bool "patch"
  default y
  help
    usage: patch [-d DIR] [-i PATCH] [-p DEPTH] [-F FUZZ] [-Rlsu] [--dry-run] [FILE [PATCH]]

    Apply a unified diff to one or more files.

    -d	Modify files in DIR
    -i	Input patch file (default=stdin)
    -l	Loose match (ignore whitespace)
    -p	Number of '/' to strip from start of file paths (default=all)
    -R	Reverse patch
    -s	Silent except for errors
    -u	Ignored (only handles "unified" diffs)
    --dry-run Don't change files, just confirm patch applies

    This version of patch only handles unified diffs, and only modifies
    a file when all hunks to that file apply. Patch prints failed hunks
    to stderr, and exits with nonzero status if any hunks fail.

    A file compared against /dev/null (or with a date <= the epoch) is
    created/deleted as appropriate.

# toys/posix/printf.c
config PRINTF
  bool "printf"
  default y
  help
    usage: printf FORMAT [ARGUMENT...]

    Format and print ARGUMENT(s) according to FORMAT, using C printf syntax
    (% escapes for cdeEfgGiosuxX, \ escapes for abefnrtv0 or \OCTAL or \xHEX).

# toys/posix/ps.c
config PS
  bool "ps"
  default y
  help
    usage: ps [-AadefLlnwZ] [-gG GROUP,] [-k FIELD,] [-o FIELD,] [-p PID,] [-t TTY,] [-uU USER,]

    List processes.

    Which processes to show (-gGuUpPt selections may be comma separated lists):

    -A  All					-a  Has terminal not session leader
    -d  All but session leaders		-e  Synonym for -A
    -g  In GROUPs				-G  In real GROUPs (before sgid)
    -p  PIDs (--pid)			-P  Parent PIDs (--ppid)
    -s  In session IDs			-t  Attached to selected TTYs
    -T  Show threads also			-u  Owned by selected USERs
    -U  Real USERs (before suid)

    Output modifiers:

    -k  Sort FIELDs (-FIELD to reverse)	-M  Measure/pad future field widths
    -n  Show numeric USER and GROUP		-w  Wide output (don't truncate fields)

    Which FIELDs to show. (-o HELP for list, default = -o PID,TTY,TIME,CMD)

    -f  Full listing (-o USER:12=UID,PID,PPID,C,STIME,TTY,TIME,ARGS=CMD)
    -l  Long listing (-o F,S,UID,PID,PPID,C,PRI,NI,ADDR,SZ,WCHAN,TTY,TIME,CMD)
    -o  Output FIELDs instead of defaults, each with optional :size and =title
    -O  Add FIELDS to defaults
    -Z  Include LABEL

config TOP
  bool "top"
  default y
  help
    usage: top [-Hbq] [-k FIELD,] [-o FIELD,] [-s SORT] [-n NUMBER] [-m LINES] [-d SECONDS] [-p PID,] [-u USER,]

    Show process activity in real time.

    -H	Show threads
    -k	Fallback sort FIELDS (default -S,-%CPU,-ETIME,-PID)
    -o	Show FIELDS (def PID,USER,PR,NI,VIRT,RES,SHR,S,%CPU,%MEM,TIME+,CMDLINE)
    -O	Add FIELDS (replacing PR,NI,VIRT,RES,SHR,S from default)
    -s	Sort by field number (1-X, default 9)
    -b	Batch mode (no tty)
    -d	Delay SECONDS between each cycle (default 3)
    -m	Maximum number of tasks to show
    -n	Exit after NUMBER iterations
    -p	Show these PIDs
    -u	Show these USERs
    -q	Quiet (no header lines)

    Cursor LEFT/RIGHT to change sort, UP/DOWN move list, space to force
    update, R to reverse sort, Q to exit.

# Requires CONFIG_IRQ_TIME_ACCOUNTING in the kernel for /proc/$$/io
config IOTOP
  bool "iotop"
  default y
  help
    usage: iotop [-AaKObq] [-n NUMBER] [-d SECONDS] [-p PID,] [-u USER,]

    Rank processes by I/O.

    -A	All I/O, not just disk
    -a	Accumulated I/O (not percentage)
    -H	Show threads
    -K	Kilobytes
    -k	Fallback sort FIELDS (default -[D]IO,-ETIME,-PID)
    -m	Maximum number of tasks to show
    -O	Only show processes doing I/O
    -o	Show FIELDS (default PID,PR,USER,[D]READ,[D]WRITE,SWAP,[D]IO,COMM)
    -s	Sort by field number (0-X, default 6)
    -b	Batch mode (no tty)
    -d	Delay SECONDS between each cycle (default 3)
    -n	Exit after NUMBER iterations
    -p	Show these PIDs
    -u	Show these USERs
    -q	Quiet (no header lines)

    Cursor LEFT/RIGHT to change sort, UP/DOWN move list, space to force
    update, R to reverse sort, Q to exit.

config PGREP
  bool "pgrep"
  default y
  help
    usage: pgrep [-clfnovx] [-d DELIM] [-L SIGNAL] [PATTERN] [-G GID,] [-g PGRP,] [-P PPID,] [-s SID,] [-t TERM,] [-U UID,] [-u EUID,]

    Search for process(es). PATTERN is an extended regular expression checked
    against command names.

    -c	Show only count of matches
    -d	Use DELIM instead of newline
    -L	Send SIGNAL instead of printing name
    -l	Show command name
    -f	Check full command line for PATTERN
    -G	Match real Group ID(s)
    -g	Match Process Group(s) (0 is current user)
    -n	Newest match only
    -o	Oldest match only
    -P	Match Parent Process ID(s)
    -s	Match Session ID(s) (0 for current)
    -t	Match Terminal(s)
    -U	Match real User ID(s)
    -u	Match effective User ID(s)
    -v	Negate the match
    -x	Match whole command (not substring)

config PKILL
  bool "pkill"
  default y
  help
    usage: pkill [-fnovx] [-SIGNAL|-l SIGNAL] [PATTERN] [-G GID,] [-g PGRP,] [-P PPID,] [-s SID,] [-t TERM,] [-U UID,] [-u EUID,]

    -l	Send SIGNAL (default SIGTERM)
    -V	Verbose
    -f	Check full command line for PATTERN
    -G	Match real Group ID(s)
    -g	Match Process Group(s) (0 is current user)
    -n	Newest match only
    -o	Oldest match only
    -P	Match Parent Process ID(s)
    -s	Match Session ID(s) (0 for current)
    -t	Match Terminal(s)
    -U	Match real User ID(s)
    -u	Match effective User ID(s)
    -v	Negate the match
    -x	Match whole command (not substring)

# toys/posix/pwd.c
config PWD
  bool "pwd"
  default y
  help
    usage: pwd [-L|-P]

    Print working (current) directory.

    -L	Use shell's path from $PWD (when applicable)
    -P	Print canonical absolute path

# toys/posix/renice.c
config RENICE
  bool "renice"
  default y
  help
    usage: renice [-gpu] -n INCREMENT ID...

# toys/posix/rm.c
config RM
  bool "rm"
  default y
  help
    usage: rm [-fiRrv] FILE...

    Remove each argument from the filesystem.

    -f	Force: remove without confirmation, no error if it doesn't exist
    -i	Interactive: prompt for confirmation
    -rR	Recursive: remove directory contents
    -v	Verbose

# toys/posix/rmdir.c
config RMDIR
  bool "rmdir"
  default y
  help
    usage: rmdir [-p] [DIR...]

    Remove one or more directories.

    -p	Remove path
    --ignore-fail-on-non-empty	Ignore failures caused by non-empty directories

# toys/posix/sed.c
config SED
  bool "sed"
  default y
  help
    usage: sed [-inrzE] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]

    Stream editor. Apply editing SCRIPTs to lines of input.

    -e	Add SCRIPT to list
    -f	Add contents of SCRIPT_FILE to list
    -i	Edit each file in place (-iEXT keeps backup file with extension EXT)
    -n	No default output (use the p command to output matched lines)
    -r	Use extended regular expression syntax
    -E	POSIX alias for -r
    -s	Treat input files separately (implied by -i)
    -z	Use \0 rather than \n as input line separator

    A SCRIPT is one or more COMMANDs separated by newlines or semicolons.
    All -e SCRIPTs are combined as if separated by newlines, followed by all -f
    SCRIPT_FILEs. If no -e or -f then first argument is the SCRIPT.

    COMMANDs apply to every line unless prefixed with an ADDRESS of the form:

      [ADDRESS[,ADDRESS]][!]COMMAND

    ADDRESS is a line number (starting at 1), a /REGULAR EXPRESSION/, or $ for
    last line (-s or -i makes it last line of each file). One address matches one
    line, ADDRESS,ADDRESS matches from first to second inclusive. Two regexes can
    match multiple ranges. ADDRESS,+N ends N lines later. ! inverts the match.

    REGULAR EXPRESSIONS start and end with the same character (anything but
    backslash or newline). To use the delimiter in the regex escape it with a
    backslash, and printf escapes (\abcefnrtv and octal, hex, and unicode) work.
    An empty regex repeats the previous one. ADDRESS regexes require any
    first delimiter except / to be \escaped to distinguish it from COMMANDs.

    Sed reads each line of input, processes it, and writes it out or discards it
    before reading the next. Sed can remember one additional line in a separate
    buffer (the h, H, g, G, and x commands), and can read the next line of input
    early (the n and N commands), but otherwise operates on individual lines.

    Each COMMAND starts with a single character. Commands with no arguments are:

      !  Run this command when the ADDRESS _didn't_ match.
      {  Start new command block, continuing until a corresponding "}".
         Command blocks nest and can have ADDRESSes applying to the whole block.
      }  End command block (this COMMAND cannot have an address)
      d  Delete this line and move on to the next one
         (ignores remaining COMMANDs)
      D  Delete one line of input and restart command SCRIPT (same as "d"
         unless you've glued lines together with "N" or similar)
      g  Get remembered line (overwriting current line)
      G  Get remembered line (appending to current line)
      h  Remember this line (overwriting remembered line)
      H  Remember this line (appending to remembered line, if any)
      l  Print line escaping \abfrtv (but not \n), octal escape other nonprintng
         chars, wrap lines to terminal width with \, append $ to end of line.
      n  Print default output and read next line over current line (quit at EOF)
      N  Append \n and next line of input to this line. Quit at EOF without
         default output. Advances line counter for ADDRESS and "=".
      p  Print this line
      P  Print this line up to first newline (from "N")
      q  Quit (print default output, no more commands processed or lines read)
      x  Exchange this line with remembered line (overwrite in both directions)
      =  Print the current line number (plus newline)
      #  Comment, ignores rest of this line of SCRIPT (until newline)

    Commands that take an argument: 

      : LABEL    Target for jump commands
      a TEXT     Append text to output before reading next line
      b LABEL    Branch, jumps to :LABEL (with no LABEL to end of SCRIPT)
      c TEXT     Delete matching ADDRESS range and output TEXT instead
      i TEXT     Insert text (output immediately)
      r FILE     Append contents of FILIE to output before reading next line.
      s/S/R/F    Search for regex S replace match with R using flags F. Delimiter
                 is anything but \n or \, escape with \ to use in S or R. Printf
                 escapes work. Unescaped & in R becomes full matched text, \1
                 through \9 = parenthetical subexpression from S. \ at end of
                 line appends next line of SCRIPT. The flags in F are:
                 [0-9]    A number N, substitute only Nth match
                 g        Global, substitute all matches
                 i/I      Ignore case when matching
                 p        Print resulting line when match found and replaced
                 w [file] Write (append) line to file when match replaced
      t LABEL    Test, jump if s/// command matched this line since last test 
      T LABEL    Test false, jump to :LABEL only if no s/// found a match
      w FILE     Write (append) line to file
      y/old/new/ Change each character in 'old' to corresponding character
                 in 'new' (with standard backslash escapes, delimiter can be
                 any repeated character except \ or \n)

    The TEXT arguments (to a c i) may end with an unescaped "\" to append
    the next line (leading whitespace is not skipped), and treat ";" as a
    literal character (use "\;" instead).



# toys/posix/sleep.c
config SLEEP
  bool "sleep"
  default y
  help
    usage: sleep DURATION

    Wait before exiting.

    DURATION can be a decimal fraction. An optional suffix can be "m"
    (minutes), "h" (hours), "d" (days), or "s" (seconds, the default).

# toys/posix/sort.c
config SORT
  bool "sort"
  default y
  help
    usage: sort [-runbcdfiMsz] [FILE...] [-k#[,#[x]] [-t X]] [-o FILE]

    Sort all lines of text from input files (or stdin) to stdout.

    -r	Reverse
    -u	Unique lines only
    -n	Numeric order (instead of alphabetical)
    -b	Ignore leading blanks (or trailing blanks in second part of key)
    -c	Check whether input is sorted
    -d	Dictionary order (use alphanumeric and whitespace chars only)
    -f	Force uppercase (case insensitive sort)
    -i	Ignore nonprinting characters
    -M	Month sort (jan, feb, etc)
    -x	Hexadecimal numerical sort
    -s	Skip fallback sort (only sort with keys)
    -z	Zero (null) terminated lines
    -k	Sort by "key" (see below)
    -t	Use a key separator other than whitespace
    -o	Output to FILE instead of stdout
    -V	Version numbers (name-1.234-rc6.5b.tgz)

    Sorting by key looks at a subset of the words on each line. -k2 uses the
    second word to the end of the line, -k2,2 looks at only the second word,
    -k2,4 looks from the start of the second to the end of the fourth word.
    -k2.4,5 starts from the fourth character of the second word, to the end
    of the fifth word. Specifying multiple keys uses the later keys as tie
    breakers, in order. A type specifier appended to a sort key (such as -2,2n)
    applies only to sorting that key.

config SORT_FLOAT
  bool
  default y
  depends on TOYBOX_FLOAT
  help
    usage: sort [-g]

    -g	General numeric sort (double precision with nan and inf)

# toys/posix/split.c
config SPLIT
  bool "split"
  default y
  help
    usage: split [-a SUFFIX_LEN] [-b BYTES] [-l LINES] [INPUT [OUTPUT]]

    Copy INPUT (or stdin) data to a series of OUTPUT (or "x") files with
    alphabetically increasing suffix (aa, ab, ac... az, ba, bb...).

    -a	Suffix length (default 2)
    -b	BYTES/file (10, 10k, 10m, 10g...)
    -l	LINES/file (default 1000)

# toys/posix/strings.c
config STRINGS
  bool "strings"
  default y
  help
    usage: strings [-fo] [-t oxd] [-n LEN] [FILE...]

    Display printable strings in a binary file

    -f	Show filename
    -n	At least LEN characters form a string (default 4)
    -o	Show offset (ala -t d)
    -t	Show offset type (o=octal, d=decimal, x=hexadecimal)

# toys/posix/tail.c
config TAIL
  bool "tail"
  default y
  help
    usage: tail [-n|c NUMBER] [-f] [FILE...]

    Copy last lines from files to stdout. If no files listed, copy from
    stdin. Filename "-" is a synonym for stdin.

    -n	Output the last NUMBER lines (default 10), +X counts from start
    -c	Output the last NUMBER bytes, +NUMBER counts from start
    -f	Follow FILE(s), waiting for more data to be appended

# toys/posix/tar.c
config TAR
  bool "tar"
  default y
  help
    usage: tar [-cxt] [-fvohmjkOS] [-XTCf NAME] [FILE...]

    Create, extract, or list files in a .tar (or compressed t?z) file.

    Options:
    c  Create                x  Extract               t  Test (list)
    f  tar FILE (default -)  C  Change to DIR first   v  Verbose display
    o  Ignore owner          h  Follow symlinks       m  Ignore mtime
    J  xz compression        j  bzip2 compression     z  gzip compression
    O  Extract to stdout     X  exclude names in FILE T  include names in FILE

    --exclude        FILENAME to exclude    --full-time   Show seconds with -tv
    --mode MODE      Adjust modes           --mtime TIME  Override timestamps
    --owner NAME     Set file owner to NAME --group NAME  Set file group to NAME
    --sparse         Record sparse files
    --restrict       All archive contents must extract under one subdirectory
    --numeric-owner  Save/use/display uid and gid, not user/group name
    --no-recursion   Don't store directory contents

# toys/posix/tee.c
config TEE
  bool "tee"
  default y
  help
    usage: tee [-ai] [FILE...]

    Copy stdin to each listed file, and also to stdout.
    Filename "-" is a synonym for stdout.

    -a	Append to files
    -i	Ignore SIGINT

# toys/posix/test.c
config TEST
  bool "test"
  default y
  help
    usage: test [-bcdefghLPrSsuwx PATH] [-nz STRING] [-t FD] [X ?? Y]

    Return true or false by performing tests. (With no arguments return false.)

    --- Tests with a single argument (after the option):
    PATH is/has:
      -b  block device   -f  regular file   -p  fifo           -u  setuid bit
      -c  char device    -g  setgid         -r  read bit       -w  write bit
      -d  directory      -h  symlink        -S  socket         -x  execute bit
      -e  exists         -L  symlink        -s  nonzero size
    STRING is:
      -n  nonzero size   -z  zero size      (STRING by itself implies -n)
    FD (integer file descriptor) is:
      -t  a TTY

    --- Tests with one argument on each side of an operator:
    Two strings:
      =  are identical   !=  differ
    Two integers:
      -eq  equal         -gt  first > second    -lt  first < second
      -ne  not equal     -ge  first >= second   -le  first <= second

    --- Modify or combine tests:
      ! EXPR     not (swap true/false)   EXPR -a EXPR    and (are both true)
      ( EXPR )   evaluate this first     EXPR -o EXPR    or (is either true)

# toys/posix/time.c
config TIME
  bool "time"
  default y
  depends on TOYBOX_FLOAT
  help
    usage: time [-pv] COMMAND...

    Run command line and report real, user, and system time elapsed in seconds.
    (real = clock on the wall, user = cpu used by command's code,
    system = cpu used by OS on behalf of command.)

    -p	POSIX format output (default)
    -v	Verbose

# toys/posix/touch.c
config TOUCH
  bool "touch"
  default y
  help
    usage: touch [-amch] [-d DATE] [-t TIME] [-r FILE] FILE...

    Update the access and modification times of each FILE to the current time.

    -a	Change access time
    -m	Change modification time
    -c	Don't create file
    -h	Change symlink
    -d	Set time to DATE (in YYYY-MM-DDThh:mm:SS[.frac][tz] format)
    -t	Set time to TIME (in [[CC]YY]MMDDhhmm[.ss][frac] format)
    -r	Set time same as reference FILE

# toys/posix/true.c
config TRUE
  bool "true"
  default y
  help
    usage: true

    Return zero.

# toys/posix/tty.c
config TTY
  bool "tty"
  default y
  help
    usage: tty [-s]

    Show filename of terminal connected to stdin.

    Prints "not a tty" and exits with nonzero status if no terminal
    is connected to stdin.

    -s	Silent, exit code only

# toys/posix/ulimit.c
config ULIMIT
  bool "ulimit"
  default y
  depends on TOYBOX_PRLIMIT
  help
    usage: ulimit [-P PID] [-SHRacdefilmnpqrstuv] [LIMIT]

    Print or set resource limits for process number PID. If no LIMIT specified
    (or read-only -ap selected) display current value (sizes in bytes).
    Default is ulimit -P $PPID -Sf" (show soft filesize of your shell).
    
    -S  Set/show soft limit          -H  Set/show hard (maximum) limit
    -a  Show all limits              -c  Core file size
    -d  Process data segment         -e  Max scheduling priority
    -f  Output file size             -i  Pending signal count
    -l  Locked memory                -m  Resident Set Size
    -n  Number of open files         -p  Pipe buffer
    -q  Posix message queue          -r  Max Real-time priority
    -R  Realtime latency (usec)      -s  Stack size
    -t  Total CPU time (in seconds)  -u  Maximum processes (under this UID)
    -v  Virtual memory size          -P  PID to affect (default $PPID)

# toys/posix/uname.c
config ARCH 
  bool "arch"
  default y
  help
    usage: arch

    Print machine (hardware) name, same as uname -m.

config UNAME
  bool "uname"
  default y
  help
    usage: uname [-asnrvm]

    Print system information.

    -s	System name
    -n	Network (domain) name
    -r	Kernel Release number
    -v	Kernel Version 
    -m	Machine (hardware) name
    -a	All of the above

# toys/posix/uniq.c
config UNIQ
  bool "uniq"
  default y
  help
    usage: uniq [-cduiz] [-w MAXCHARS] [-f FIELDS] [-s CHAR] [INFILE [OUTFILE]]

    Report or filter out repeated lines in a file

    -c	Show counts before each line
    -d	Show only lines that are repeated
    -u	Show only lines that are unique
    -i	Ignore case when comparing lines
    -z	Lines end with \0 not \n
    -w	Compare maximum X chars per line
    -f	Ignore first X fields
    -s	Ignore first X chars

# toys/posix/unlink.c
config UNLINK
  bool "unlink"
  default y
  help
    usage: unlink FILE

    Delete one file.

# toys/posix/uudecode.c
config UUDECODE
  bool "uudecode"
  default y
  help
    usage: uudecode [-o OUTFILE] [INFILE]

    Decode file from stdin (or INFILE).

    -o	Write to OUTFILE instead of filename in header

# toys/posix/uuencode.c
config UUENCODE
  bool "uuencode"
  default y 
  help
    usage: uuencode [-m] [INFILE] ENCODE_FILENAME

    Uuencode stdin (or INFILE) to stdout, with ENCODE_FILENAME in the output.

    -m	Base64

# toys/posix/wc.c
config WC
  bool "wc"
  default y
  help
    usage: wc -lwcm [FILE...]

    Count lines, words, and characters in input.

    -l	Show lines
    -w	Show words
    -c	Show bytes
    -m	Show characters

    By default outputs lines, words, bytes, and filename for each
    argument (or from stdin if none). Displays only either bytes
    or characters.

# toys/posix/who.c
config WHO
  bool "who"
  default y
  depends on TOYBOX_UTMPX
  help
    usage: who

    Print information about logged in users.

# toys/posix/xargs.c
config XARGS
  bool "xargs"
  default y
  help
    usage: xargs [-0prt] [-s NUM] [-n NUM] [-E STR] COMMAND...

    Run command line one or more times, appending arguments from stdin.

    If COMMAND exits with 255, don't launch another even if arguments remain.

    -0	Each argument is NULL terminated, no whitespace or quote processing
    -E	Stop at line matching string
    -n	Max number of arguments per command
    -o	Open tty for COMMAND's stdin (default /dev/null)
    -p	Prompt for y/n from tty before running each command
    -r	Don't run command with empty input (otherwise always run command once)
    -s	Size in bytes per command line
    -t	Trace, print command line to stderr

endmenu
menu "pending (see toys/pending/README)"

# toys/pending/arp.c
config ARP
  bool "arp"
  default n
  help
    usage: arp
    [-vn] [-H HWTYPE] [-i IF] -a [HOSTNAME]
    [-v]              [-i IF] -d HOSTNAME [pub]
    [-v]  [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [temp]
    [-v]  [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [netmask MASK] pub
    [-v]  [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub

    Manipulate ARP cache

    -a    Display (all) hosts
    -s    Set new ARP entry
    -d    Delete a specified entry
    -v    Verbose
    -n    Don't resolve names
    -i IF Network interface
    -D    Read <hwaddr> from given device
    -A,-p AF  Protocol family
    -H    HWTYPE Hardware address type


# toys/pending/arping.c
config ARPING
  bool "arping"
  default n
  help
    usage: arping [-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP

    Send ARP requests/replies

    -f         Quit on first ARP reply
    -q         Quiet
    -b         Keep broadcasting, don't go unicast
    -D         Duplicated address detection mode
    -U         Unsolicited ARP mode, update your neighbors
    -A         ARP answer mode, update your neighbors
    -c N       Stop after sending N ARP requests
    -w TIMEOUT Time to wait for ARP reply, seconds
    -I IFACE   Interface to use (default eth0)
    -s SRC_IP  Sender IP address
    DST_IP     Target IP address

# toys/pending/bc.c
config BC
  bool "bc"
  default n
  help
    usage: bc [-ilqsw] [file ...]

    bc is a command-line calculator with a Turing-complete language.

    options:

      -i  --interactive  force interactive mode
      -l  --mathlib      use predefined math routines:

                         s(expr)  =  sine of expr in radians
                         c(expr)  =  cosine of expr in radians
                         a(expr)  =  arctangent of expr, returning radians
                         l(expr)  =  natural log of expr
                         e(expr)  =  raises e to the power of expr
                         j(n, x)  =  Bessel function of integer order n of x

      -q  --quiet        don't print version and copyright
      -s  --standard     error if any non-POSIX extensions are used
      -w  --warn         warn if any non-POSIX extensions are used


# toys/pending/bootchartd.c
config BOOTCHARTD
  bool "bootchartd"
  default n
  depends on TOYBOX_FORK
  help
    usage: bootchartd {start [PROG ARGS]}|stop|init

    Create /var/log/bootlog.tgz with boot chart data

    start: start background logging; with PROG, run PROG,
           then kill logging with USR1
    stop:  send USR1 to all bootchartd processes
    init:  start background logging; stop when getty/xdm is seen
          (for init scripts)

    Under PID 1: as init, then exec $bootchart_init, /init, /sbin/init

# toys/pending/brctl.c
config BRCTL
  bool "brctl"
  default n
  help
    usage: brctl COMMAND [BRIDGE [INTERFACE]]

    Manage ethernet bridges

    Commands:
    show                  Show a list of bridges
    addbr BRIDGE          Create BRIDGE
    delbr BRIDGE          Delete BRIDGE
    addif BRIDGE IFACE    Add IFACE to BRIDGE
    delif BRIDGE IFACE    Delete IFACE from BRIDGE
    setageing BRIDGE TIME Set ageing time
    setfd BRIDGE TIME     Set bridge forward delay
    sethello BRIDGE TIME  Set hello time
    setmaxage BRIDGE TIME Set max message age
    setpathcost BRIDGE PORT COST   Set path cost
    setportprio BRIDGE PORT PRIO   Set port priority
    setbridgeprio BRIDGE PRIO      Set bridge priority
    stp BRIDGE [1/yes/on|0/no/off] STP on/off

# toys/pending/crond.c
config CROND
  bool "crond"
  default n
  help
    usage: crond [-fbS] [-l N] [-d N] [-L LOGFILE] [-c DIR]

    A daemon to execute scheduled commands.

    -b Background (default)
    -c crontab dir
    -d Set log level, log to stderr
    -f Foreground
    -l Set log level. 0 is the most verbose, default 8
    -S Log to syslog (default)
    -L Log to file

# toys/pending/crontab.c
config CRONTAB
  bool "crontab"
  default n
  depends on TOYBOX_FORK
  help
    usage: crontab [-u user] FILE
                   [-u user] [-e | -l | -r]
                   [-c dir]

    Files used to schedule the execution of programs.

    -c crontab dir
    -e edit user's crontab
    -l list user's crontab
    -r delete user's crontab
    -u user
    FILE Replace crontab by FILE ('-': stdin)

# toys/pending/dd.c
config DD
  bool "dd"
  default n
  help
    usage: dd [if=FILE] [of=FILE] [ibs=N] [obs=N] [iflag=FLAGS] [oflag=FLAGS]
            [bs=N] [count=N] [seek=N] [skip=N]
            [conv=notrunc|noerror|sync|fsync] [status=noxfer|none]

    Copy/convert files.

    if=FILE		Read from FILE instead of stdin
    of=FILE		Write to FILE instead of stdout
    bs=N		Read and write N bytes at a time
    ibs=N		Input block size
    obs=N		Output block size
    count=N		Copy only N input blocks
    skip=N		Skip N input blocks
    seek=N		Skip N output blocks
    iflag=FLAGS	Set input flags
    oflag=FLAGS	Set output flags
    conv=notrunc	Don't truncate output file
    conv=noerror	Continue after read errors
    conv=sync	Pad blocks with zeros
    conv=fsync	Physically write data out before finishing
    status=noxfer	Don't show transfer rate
    status=none	Don't show transfer rate or records in/out

    FLAGS is a comma-separated list of:

    count_bytes	(iflag) interpret count=N in bytes, not blocks
    seek_bytes	(oflag) interpret seek=N in bytes, not blocks
    skip_bytes	(iflag) interpret skip=N in bytes, not blocks

    Numbers may be suffixed by c (*1), w (*2), b (*512), kD (*1000), k (*1024),
    MD (*1000*1000), M (*1024*1024), GD (*1000*1000*1000) or G (*1024*1024*1024).

# toys/pending/dhcp6.c
config DHCP6
  bool "dhcp6"
  default n
  help
  usage: dhcp6 [-fbnqvR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]

        Configure network dynamically using DHCP.

      -i Interface to use (default eth0)
      -p Create pidfile
      -s Run PROG at DHCP events
      -t Send up to N Solicit packets
      -T Pause between packets (default 3 seconds)
      -A Wait N seconds after failure (default 20)
      -f Run in foreground
      -b Background if lease is not obtained
      -n Exit if lease is not obtained
      -q Exit after obtaining lease
      -R Release IP on exit
      -S Log to syslog too
      -r Request this IP address
      -v Verbose

      Signals:
      USR1  Renew current lease
      USR2  Release current lease

# toys/pending/dhcp.c
config DHCP
  bool "dhcp"
  default n
  help
   usage: dhcp [-fbnqvoCRB] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]
               [-H HOSTNAME] [-V VENDOR] [-x OPT:VAL] [-O OPT]

        Configure network dynamically using DHCP.

      -i Interface to use (default eth0)
      -p Create pidfile
      -s Run PROG at DHCP events (default /usr/share/dhcp/default.script)
      -B Request broadcast replies
      -t Send up to N discover packets
      -T Pause between packets (default 3 seconds)
      -A Wait N seconds after failure (default 20)
      -f Run in foreground
      -b Background if lease is not obtained
      -n Exit if lease is not obtained
      -q Exit after obtaining lease
      -R Release IP on exit
      -S Log to syslog too
      -a Use arping to validate offered address
      -O Request option OPT from server (cumulative)
      -o Don't request any options (unless -O is given)
      -r Request this IP address
      -x OPT:VAL  Include option OPT in sent packets (cumulative)
      -F Ask server to update DNS mapping for NAME
      -H Send NAME as client hostname (default none)
      -V VENDOR Vendor identifier (default 'toybox VERSION')
      -C Don't send MAC as client identifier
      -v Verbose

      Signals:
      USR1  Renew current lease
      USR2  Release current lease


# toys/pending/dhcpd.c
config DHCPD
  bool "dhcpd"
  default n
  help
   usage: dhcpd [-46fS] [-i IFACE] [-P N] [CONFFILE]

    -f    Run in foreground
    -i Interface to use
    -S    Log to syslog too
    -P N  Use port N (default ipv4 67, ipv6 547)
    -4, -6    Run as a DHCPv4 or DHCPv6 server

config DEBUG_DHCP
  bool "debugging messeges ON/OFF"
  default n
  depends on DHCPD

# toys/pending/diff.c
config DIFF
  bool "diff"
  default n
  help
  usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2

  -a	Treat all files as text
  -b	Ignore changes in the amount of whitespace
  -B	Ignore changes whose lines are all blank
  -d	Try hard to find a smaller set of changes
  -i	Ignore case differences
  -L	Use LABEL instead of the filename in the unified header
  -N	Treat absent files as empty
  -q	Output only whether files differ
  -r	Recurse
  -S	Start with FILE when comparing directories
  -T	Make tabs line up by prefixing a tab when necessary
  -s	Report when two files are the same
  -t	Expand tabs to spaces in output
  -u	Unified diff
  -U	Output LINES lines of context
  -w	Ignore all whitespace

  --color              Colored output
  --strip-trailing-cr  Strip trailing '\r's from input lines

# toys/pending/dumpleases.c
config DUMPLEASES
  bool "dumpleases"
  default n
  help
    usage: dumpleases [-r|-a] [-f LEASEFILE]

    Display DHCP leases granted by udhcpd
    -f FILE,  Lease file
    -r        Show remaining time
    -a        Show expiration time

# toys/pending/expr.c
config EXPR
  bool "expr"
  default n
  help
    usage: expr ARG1 OPERATOR ARG2...

    Evaluate expression and print result. For example, "expr 1 + 2".

    The supported operators are (grouped from highest to lowest priority):

      ( )    :    * / %    + -    != <= < >= > =    &    |

    Each constant and operator must be a separate command line argument.
    All operators are infix, meaning they expect a constant (or expression
    that resolves to a constant) on each side of the operator. Operators of
    the same priority (within each group above) are evaluated left to right.
    Parentheses may be used (as separate arguments) to elevate the priority
    of expressions.

    Calling expr from a command shell requires a lot of \( or '*' escaping
    to avoid interpreting shell control characters.

    The & and | operators are logical (not bitwise) and may operate on
    strings (a blank string is "false"). Comparison operators may also
    operate on strings (alphabetical sort).

    Constants may be strings or integers. Comparison, logical, and regex
    operators may operate on strings (a blank string is "false"), other
    operators require integers.

# toys/pending/fdisk.c
config FDISK
  bool "fdisk"
  default n
  help
    usage: fdisk [-lu] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SECTSZ] DISK

    Change partition table

    -u            Start and End are in sectors (instead of cylinders)
    -l            Show partition table for each DISK, then exit
    -b size       sector size (512, 1024, 2048 or 4096)
    -C CYLINDERS  Set number of cylinders/heads/sectors
    -H HEADS
    -S SECTORS

# toys/pending/fold.c
config FOLD
  bool "fold"
  default n
  help
    usage: fold [-bsu] [-w WIDTH] [FILE...]

    Folds (wraps) or unfolds ascii text by adding or removing newlines.
    Default line width is 80 columns for folding and infinite for unfolding.

    -b	Fold based on bytes instead of columns
    -s	Fold/unfold at whitespace boundaries if possible
    -u	Unfold text (and refold if -w is given)
    -w	Set lines to WIDTH columns or bytes

# toys/pending/fsck.c
config FSCK
  bool "fsck"
  default n
  help
    usage: fsck [-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]...

    Check and repair filesystems

    -A      Walk /etc/fstab and check all filesystems
    -N      Don't execute, just show what would be done
    -P      With -A, check filesystems in parallel
    -R      With -A, skip the root filesystem
    -T      Don't show title on startup
    -V      Verbose
    -C n    Write status information to specified file descriptor
    -t TYPE List of filesystem types to check


# toys/pending/getfattr.c
config GETFATTR
  bool "getfattr"
  default n
  help
    usage: getfattr [-d] [-h] [-n NAME] FILE...

    Read POSIX extended attributes.

    -d	Show values as well as names
    -h	Do not dereference symbolic links
    -n	Show only attributes with the given name
    --only-values	Don't show names

# toys/pending/getopt.c
config GETOPT
  bool "getopt"
  default n
  help
    usage: getopt [OPTIONS] [--] ARG...

    Parse command-line options for use in shell scripts.

    -a	Allow long options starting with a single -.
    -l OPTS	Specify long options.
    -n NAME	Command name for error messages.
    -o OPTS	Specify short options.
    -T	Test whether this is a modern getopt.
    -u	Output options unquoted.

# toys/pending/getty.c
config GETTY
  bool "getty"
  default n
  help
    usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]

    -h    Enable hardware RTS/CTS flow control
    -L    Set CLOCAL (ignore Carrier Detect state)
    -m    Get baud rate from modem's CONNECT status message
    -n    Don't prompt for login name
    -w    Wait for CR or LF before sending /etc/issue
    -i    Don't display /etc/issue
    -f ISSUE_FILE  Display ISSUE_FILE instead of /etc/issue
    -l LOGIN  Invoke LOGIN instead of /bin/login
    -t SEC    Terminate after SEC if no login name is read
    -I INITSTR  Send INITSTR before anything else
    -H HOST    Log HOST into the utmp file as the hostname

# toys/pending/groupadd.c
config GROUPADD
  bool "groupadd"
  default n
  help
    usage: groupadd [-S] [-g GID] [USER] GROUP

    Add a group or add a user to a group
    
      -g GID Group id
      -S     Create a system group

# toys/pending/groupdel.c
config GROUPDEL
  bool "groupdel"
  default n
  help
    usage: groupdel [USER] GROUP

    Delete a group or remove a user from a group

# toys/pending/host.c
config HOST
  bool "host"
  default n
  help
    usage: host [-av] [-t TYPE] NAME [SERVER]

    Perform DNS lookup on NAME, which can be a domain name to lookup,
    or an IPv4 dotted or IPv6 colon-separated address to reverse lookup.
    SERVER (if present) is the DNS server to use.

    -a	-v -t ANY
    -t TYPE	query records of type TYPE
    -v	verbose

# toys/pending/init.c
config INIT
  bool "init"
  default n
  help
    usage: init

    System V style init.

    First program to run (as PID 1) when the system comes up, reading
    /etc/inittab to determine actions.

# toys/pending/ip.c
config IP
  bool "ip"
  default n
  help
    usage: ip [ OPTIONS ] OBJECT { COMMAND }

    Show / manipulate routing, devices, policy routing and tunnels.

    where OBJECT := {address | link | route | rule | tunnel}
    OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }

# toys/pending/ipcrm.c
config IPCRM
  bool "ipcrm"
  default n
  help
    usage: ipcrm [ [-q msqid] [-m shmid] [-s semid]
              [-Q msgkey] [-M shmkey] [-S semkey] ... ]

    -mM Remove memory segment after last detach
    -qQ Remove message queue
    -sS Remove semaphore

# toys/pending/ipcs.c
config IPCS
  bool "ipcs"
  default n
  help
    usage: ipcs [[-smq] -i shmid] | [[-asmq] [-tcplu]]

    -i Show specific resource
    Resource specification:
    -a All (default)
    -m Shared memory segments
    -q Message queues
    -s Semaphore arrays
    Output format:
    -c Creator
    -l Limits
    -p Pid
    -t Time
    -u Summary

# toys/pending/klogd.c
config KLOGD
    bool "klogd"
    default n
    help
    usage: klogd [-n] [-c N]

    -c  N   Print to console messages more urgent than prio N (1-8)"
    -n    Run in foreground

config KLOGD_SOURCE_RING_BUFFER
    bool "enable kernel ring buffer as log source."
    default n
    depends on KLOGD

# toys/pending/last.c
config LAST
  bool "last"
  default n
  help
    usage: last [-W] [-f FILE]

    Show listing of last logged in users.

    -W      Display the information without host-column truncation
    -f FILE Read from file FILE instead of /var/log/wtmp

# toys/pending/lsof.c
config LSOF
  bool "lsof"
  default n
  help
    usage: lsof [-lt] [-p PID1,PID2,...] [FILE...]

    List all open files belonging to all active processes, or processes using
    listed FILE(s).

    -l	list uids numerically
    -p	for given comma-separated pids only (default all pids)
    -t	terse (pid only) output

# toys/pending/man.c
config MAN
  bool "man"
  default n
  help
    usage: man [-M PATH] [-k STRING] | [SECTION] COMMAND

    Read manual page for system command.

    -k	List pages with STRING in their short description
    -M	Override $MANPATH

    Man pages are divided into 8 sections:
    1 commands      2 system calls  3 library functions  4 /dev files
    5 file formats  6 games         7 miscellaneous      8 system management

    Sections are searched in the order 1 8 3 2 5 4 6 7 unless you specify a
    section. Each section has a page called "intro", and there's a global
    introduction under "man-pages".

# toys/pending/mdev.c
config MDEV
  bool "mdev"
  default n
  help
    usage: mdev [-s]

    Create devices in /dev using information from /sys.

    -s	Scan all entries in /sys to populate /dev

config MDEV_CONF
  bool "Configuration file for mdev"
  default y
  depends on MDEV
  help
    The mdev config file (/etc/mdev.conf) contains lines that look like:
    hd[a-z][0-9]* 0:3 660
    (sd[a-z]) root:disk 660 =usb_storage

    Each line must contain three whitespace separated fields. The first
    field is a regular expression matching one or more device names,
    the second and third fields are uid:gid and file permissions for
    matching devices. Fourth field is optional. It could be used to change
    device name (prefix '='), path (prefix '=' and postfix '/') or create a
    symlink (prefix '>').

# toys/pending/mke2fs.c
config MKE2FS
  bool "mke2fs"
  default n
  help
    usage: mke2fs [-Fnq] [-b ###] [-N|i ###] [-m ###] device

    Create an ext2 filesystem on a block device or filesystem image.

    -F         Force to run on a mounted device
    -n         Don't write to device
    -q         Quiet (no output)
    -b size    Block size (1024, 2048, or 4096)
    -N inodes  Allocate this many inodes
    -i bytes   Allocate one inode for every XXX bytes of device
    -m percent Reserve this percent of filesystem space for root user

config MKE2FS_JOURNAL
  bool "Journaling support (ext3)"
  default n
  depends on MKE2FS
  help
    usage: mke2fs [-j] [-J size=###,device=XXX]

    -j         Create journal (ext3)
    -J         Journal options
               size: Number of blocks (1024-102400)
               device: Specify an external journal

config MKE2FS_GEN
  bool "Generate (gene2fs)"
  default n
  depends on MKE2FS
  help
    usage: gene2fs [options] device filename

    The [options] are the same as mke2fs.

config MKE2FS_LABEL
  bool "Label support"
  default n
  depends on MKE2FS
  help
    usage: mke2fs [-L label] [-M path] [-o string]

    -L         Volume label
    -M         Path to mount point
    -o         Created by

config MKE2FS_EXTENDED
  bool "Extended options"
  default n
  depends on MKE2FS
  help
    usage: mke2fs [-E stride=###] [-O option[,option]]

    -E stride= Set RAID stripe size (in blocks)
    -O [opts]  Specify fewer ext2 option flags (for old kernels)
               All of these are on by default (as appropriate)
       none         Clear default options (all but journaling)
       dir_index    Use htree indexes for large directories
       filetype     Store file type info in directory entry
       has_journal  Set by -j
       journal_dev  Set by -J device=XXX
       sparse_super Don't allocate huge numbers of redundant superblocks

# toys/pending/modprobe.c
config MODPROBE
  bool "modprobe"
  default n
  help
    usage: modprobe [-alrqvsDb] [-d DIR] MODULE [symbol=value][...]

    modprobe utility - inserts modules and dependencies.

    -a  Load multiple MODULEs
    -d  Load modules from DIR, option may be used multiple times
    -l  List (MODULE is a pattern)
    -r  Remove MODULE (stacks) or do autoclean
    -q  Quiet
    -v  Verbose
    -s  Log to syslog
    -D  Show dependencies
    -b  Apply blacklist to module names too

# toys/pending/more.c
config MORE
  bool "more"
  default n
  help
    usage: more [FILE...]

    View FILE(s) (or stdin) one screenfull at a time.

# toys/pending/openvt.c
config OPENVT
  bool "openvt"
  default n
  depends on TOYBOX_FORK
  help
    usage: openvt [-c N] [-sw] [command [command_options]]

    start a program on a new virtual terminal (VT)

    -c N  Use VT N
    -s    Switch to new VT
    -w    Wait for command to exit

    if -sw used together, switch back to originating VT when command completes

config DEALLOCVT
  bool "deallocvt"
  default n
  help
    usage: deallocvt [N]

    Deallocate unused virtual terminal /dev/ttyN, or all unused consoles.

# toys/pending/readelf.c
config READELF
  bool "readelf"
  default n
  help
    usage: readelf [-adehlnSs] [-p SECTION] [-x SECTION] [file...]

    Displays information about ELF files.

    -a	Equivalent to -dhlnSs
    -d	Show dynamic section
    -e	Headers (equivalent to -hlS)
    -h	Show ELF header
    -l	Show program headers
    -n	Show notes
    -p S	Dump strings found in named/numbered section
    -S	Show section headers
    -s	Show symbol tables (.dynsym and .symtab)
    -x S	Hex dump of named/numbered section

    --dyn-syms	Show just .dynsym symbol table

# toys/pending/route.c
config ROUTE
  bool "route"
  default n
  help
    usage: route [-ne] [-A [46]] [add|del TARGET [OPTIONS]]

    Display, add or delete network routes in the "Forwarding Information Base".

    -n	Show numerical addresses (no DNS lookups)
    -e	display netstat fields

    Routing means sending packets out a network interface to an address.
    The kernel can tell where to send packets one hop away by examining each
    interface's address and netmask, so the most common use of this command
    is to identify a "gateway" that forwards other traffic.

    Assigning an address to an interface automatically creates an appropriate
    network route ("ifconfig eth0 10.0.2.15/8" does "route add 10.0.0.0/8 eth0"
    for you), although some devices (such as loopback) won't show it in the
    table. For machines more than one hop away, you need to specify a gateway
    (ala "route add default gw 10.0.2.2").

    The address "default" is a wildcard address (0.0.0.0/0) matching all
    packets without a more specific route.

    Available OPTIONS include:
    reject   - blocking route (force match failure)
    dev NAME - force packets out this interface (ala "eth0")
    netmask  - old way of saying things like ADDR/24
    gw ADDR  - forward packets to gateway ADDR


# toys/pending/sh.c
config SH
  bool "sh (toysh)"
  default n
  help
    usage: sh [-c command] [script]

    Command shell.  Runs a shell script, or reads input interactively
    and responds to it.

    -c	command line to execute
    -i	interactive mode (default when STDIN is a tty)

# These are here for the help text, they're not selectable and control nothing
config CD
  bool
  default n
  depends on SH
  help
    usage: cd [-PL] [path]

    Change current directory.  With no arguments, go $HOME.

    -P	Physical path: resolve symlinks in path
    -L	Local path: .. trims directories off $PWD (default)

config EXIT
  bool
  default n
  depends on SH
  help
    usage: exit [status]

    Exit shell.  If no return value supplied on command line, use value
    of most recent command, or 0 if none.

config UNSET
  bool
  default n
  depends on SH
  help
    usage: unset [-fvn] NAME...

    -f	NAME is a function
    -v	NAME is a variable
    -n	dereference NAME and unset that

config EVAL
  bool
  default n
  depends on SH
  help
    usage: eval COMMAND...

    Execute (combined) arguments as a shell command.

config EXEC
  bool
  default n
  depends on SH
  help
    usage: exec [-cl] [-a NAME] COMMAND...

    -a	set argv[0] to NAME
    -c	clear environment
    -l	prepend - to argv[0]

config EXPORT
  bool
  default n
  depends on SH
  help
    usage: export [-n] [NAME[=VALUE]...]

    Make variables available to child processes. NAME exports existing local
    variable(s), NAME=VALUE sets and exports.

    -n	Unexport. Turn listed variable(s) into local variables.

    With no arguments list exported variables/attributes as "declare" statements.

config SHIFT
  bool
  default n
  depends on SH
  help
    usage: shift [N]

    Skip N (default 1) positional parameters, moving $1 and friends along the list.
    Does not affect $0.

# toys/pending/stty.c
config STTY
  bool "stty"
  default n
  help
    usage: stty [-ag] [-F device] SETTING...

    Get/set terminal configuration.

    -F	Open device instead of stdin
    -a	Show all current settings (default differences from "sane")
    -g	Show all current settings usable as input to stty

    Special characters (syntax ^c or undef): intr quit erase kill eof eol eol2
    swtch start stop susp rprnt werase lnext discard

    Control/input/output/local settings as shown by -a, '-' prefix to disable

    Combo settings: cooked/raw, evenp/oddp/parity, nl, ek, sane

    N	set input and output speed (ispeed N or ospeed N for just one)
    cols N	set number of columns
    rows N	set number of rows
    line N	set line discipline
    min N	set minimum chars per read
    time N	set read timeout
    speed	show speed only
    size	show size only

# toys/pending/sulogin.c
config SULOGIN
  bool "sulogin"
  default n
  depends on TOYBOX_SHADOW
  help
    usage: sulogin [-t time] [tty]

    Single User Login.
    -t	Default Time for Single User Login

# toys/pending/syslogd.c
config SYSLOGD
  bool "syslogd"
  default n
  help
  usage: syslogd  [-a socket] [-O logfile] [-f config file] [-m interval]
                  [-p socket] [-s SIZE] [-b N] [-R HOST] [-l N] [-nSLKD]

  System logging utility

  -a      Extra unix socket for listen
  -O FILE Default log file <DEFAULT: /var/log/messages>
  -f FILE Config file <DEFAULT: /etc/syslog.conf>
  -p      Alternative unix domain socket <DEFAULT : /dev/log>
  -n      Avoid auto-backgrounding
  -S      Smaller output
  -m MARK interval <DEFAULT: 20 minutes> (RANGE: 0 to 71582787)
  -R HOST Log to IP or hostname on PORT (default PORT=514/UDP)"
  -L      Log locally and via network (default is network only if -R)"
  -s SIZE Max size (KB) before rotation (default:200KB, 0=off)
  -b N    rotated logs to keep (default:1, max=99, 0=purge)
  -K      Log to kernel printk buffer (use dmesg to read it)
  -l N    Log only messages more urgent than prio(default:8 max:8 min:1)
  -D      Drop duplicates

# toys/pending/tcpsvd.c
config TCPSVD
  bool "tcpsvd"
  default n
  depends on TOYBOX_FORK
  help
    usage: tcpsvd [-hEv] [-c N] [-C N[:MSG]] [-b N] [-u User] [-l Name] IP Port Prog
    usage: udpsvd [-hEv] [-c N] [-u User] [-l Name] IP Port Prog
    
    Create TCP/UDP socket, bind to IP:PORT and listen for incoming connection. 
    Run PROG for each connection.

    IP            IP to listen on, 0 = all
    PORT          Port to listen on
    PROG ARGS     Program to run
    -l NAME       Local hostname (else looks up local hostname in DNS)
    -u USER[:GRP] Change to user/group after bind
    -c N          Handle up to N (> 0) connections simultaneously
    -b N          (TCP Only) Allow a backlog of approximately N TCP SYNs
    -C N[:MSG]    (TCP Only) Allow only up to N (> 0) connections from the same IP
                  New connections from this IP address are closed
                  immediately. MSG is written to the peer before close
    -h            Look up peer's hostname
    -E            Don't set up environment variables
    -v            Verbose

# toys/pending/telnet.c
config TELNET
  bool "telnet"
  default n
  help
    usage: telnet HOST [PORT]

    Connect to telnet server

# toys/pending/telnetd.c
config TELNETD
  bool "telnetd"
  default n
  help
    Handle incoming telnet connections

    -l LOGIN  Exec LOGIN on connect
    -f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue
    -K Close connection as soon as login exits
    -p PORT   Port to listen on
    -b ADDR[:PORT]  Address to bind to
    -F Run in foreground
    -i Inetd mode
    -w SEC    Inetd 'wait' mode, linger time SEC
    -S Log to syslog (implied by -i or without -F and -w)

# toys/pending/tftp.c
config TFTP
  bool "tftp"
  default n
  help
    usage: tftp [OPTIONS] HOST [PORT]

    Transfer file from/to tftp server.

    -l FILE Local FILE
    -r FILE Remote FILE
    -g    Get file
    -p    Put file
    -b SIZE Transfer blocks of SIZE octets(8 <= SIZE <= 65464)

# toys/pending/tftpd.c
config TFTPD
  bool "tftpd"
  default n
  help
    usage: tftpd [-cr] [-u USER] [DIR]

    Transfer file from/to tftp server.

    -r	read only
    -c	Allow file creation via upload
    -u	run as USER
    -l	Log to syslog (inetd mode requires this)

# toys/pending/traceroute.c
config TRACEROUTE
  bool "traceroute"
  default n
  help
    usage: traceroute [-46FUIldnvr] [-f 1ST_TTL] [-m MAXTTL] [-p PORT] [-q PROBES]
    [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-g GATEWAY] [-i IFACE] [-z PAUSE_MSEC] HOST [BYTES]

    traceroute6 [-dnrv] [-m MAXTTL] [-p PORT] [-q PROBES][-s SRC_IP] [-t TOS] [-w WAIT_SEC]
      [-i IFACE] HOST [BYTES]

    Trace the route to HOST

    -4,-6 Force IP or IPv6 name resolution
    -F    Set the don't fragment bit (supports IPV4 only)
    -U    Use UDP datagrams instead of ICMP ECHO (supports IPV4 only)
    -I    Use ICMP ECHO instead of UDP datagrams (supports IPV4 only)
    -l    Display the TTL value of the returned packet (supports IPV4 only)
    -d    Set SO_DEBUG options to socket
    -n    Print numeric addresses
    -v    verbose
    -r    Bypass routing tables, send directly to HOST
    -m    Max time-to-live (max number of hops)(RANGE 1 to 255)
    -p    Base UDP port number used in probes(default 33434)(RANGE 1 to 65535)
    -q    Number of probes per TTL (default 3)(RANGE 1 to 255)
    -s    IP address to use as the source address
    -t    Type-of-service in probe packets (default 0)(RANGE 0 to 255)
    -w    Time in seconds to wait for a response (default 3)(RANGE 0 to 86400)
    -g    Loose source route gateway (8 max) (supports IPV4 only)
    -z    Pause Time in ms (default 0)(RANGE 0 to 86400) (supports IPV4 only)
    -f    Start from the 1ST_TTL hop (instead from 1)(RANGE 1 to 255) (supports IPV4 only)
    -i    Specify a network interface to operate with

# toys/pending/tr.c
config TR
  bool "tr"
  default n
  help
    usage: tr [-cds] SET1 [SET2]

    Translate, squeeze, or delete characters from stdin, writing to stdout

    -c/-C  Take complement of SET1
    -d     Delete input characters coded SET1
    -s     Squeeze multiple output characters of SET2 into one character

# toys/pending/useradd.c
config USERADD
  bool "useradd"
  default n
  help
    usage: useradd [-SDH] [-h DIR] [-s SHELL] [-G GRP] [-g NAME] [-u UID] USER [GROUP]

    Create new user, or add USER to GROUP

    -D       Don't assign a password
    -g NAME  Real name
    -G GRP   Add user to existing group
    -h DIR   Home directory
    -H       Don't create home directory
    -s SHELL Login shell
    -S       Create a system user
    -u UID   User id

# toys/pending/userdel.c
config USERDEL
  bool "userdel"
  default n
  help
    usage: userdel [-r] USER
    usage: deluser [-r] USER
  
    Delete USER from the SYSTEM

    -r	remove home directory

# toys/pending/vi.c
config VI
  bool "vi"
  default n
  help
    usage: vi [-s script] FILE
    -s script: run script file
    Visual text editor. Predates the existence of standardized cursor keys,
    so the controls are weird and historical.

# toys/pending/wget.c
config WGET
  bool "wget"
  default n
  help
    usage: wget -O filename URL
    -O filename: specify output filename
    URL: uniform resource location, FTP/HTTP only, not HTTPS

    examples:
      wget -O index.html http://www.example.com
      wget -O sample.jpg ftp://ftp.example.com:21/sample.jpg

# toys/pending/xzcat.c
config XZCAT
  bool "xzcat"
  default n
  help
    usage: xzcat [filename...]
    
    Decompress listed files to stdout. Use stdin if no files listed.


endmenu
menu "Other commands"

# toys/other/acpi.c
config ACPI
  bool "acpi"
  default y
  help
    usage: acpi [-abctV]
    
    Show status of power sources and thermal devices.

    -a	Show power adapters
    -b	Show batteries
    -c	Show cooling device state
    -t	Show temperatures
    -V	Show everything

# toys/other/ascii.c
config ASCII
  bool "ascii"
  default y
  help
    usage: ascii

    Display ascii character set.

# toys/other/base64.c
config BASE64
  bool "base64"
  default y
  help
    usage: base64 [-di] [-w COLUMNS] [FILE...]

    Encode or decode in base64.

    -d	Decode
    -i	Ignore non-alphabetic characters
    -w	Wrap output at COLUMNS (default 76 or 0 for no wrap)

# toys/other/blkdiscard.c
config BLKDISCARD
  bool "blkdiscard"
  default y
  help
    usage: blkdiscard [-olszf] DEVICE

    Discard device sectors.

    -o, --offset OFF	Byte offset to start discarding at (default 0)
    -l, --length LEN	Bytes to discard (default all)
    -s, --secure		Perform secure discard
    -z, --zeroout		Zero-fill rather than discard
    -f, --force		Disable check for mounted filesystem

    OFF and LEN must be aligned to the device sector size.
    By default entire device is discarded.
    WARNING: All discarded data is permanently lost!

# toys/other/blkid.c
config BLKID
  bool "blkid"
  default y
  help
    usage: blkid [-s TAG] [-UL] DEV...

    Print type, label and UUID of filesystem on a block device or image.

    -U	Show UUID only (or device with that UUID)
    -L	Show LABEL only (or device with that LABEL)
    -s TAG	Only show matching tags (default all)

config FSTYPE
  bool "fstype"
  default y
  help
    usage: fstype DEV...

    Print type of filesystem on a block device or image.

# toys/other/blockdev.c
config BLOCKDEV
  bool "blockdev"
  default y
  help
    usage: blockdev --OPTION... BLOCKDEV...

    Call ioctl(s) on each listed block device

    --setro		Set read only
    --setrw		Set read write
    --getro		Get read only
    --getss		Get sector size
    --getbsz	Get block size
    --setbsz BYTES	Set block size
    --getsz		Get device size in 512-byte sectors
    --getsize	Get device size in sectors (deprecated)
    --getsize64	Get device size in bytes
    --getra		Get readahead in 512-byte sectors
    --setra SECTORS	Set readahead
    --flushbufs	Flush buffers
    --rereadpt	Reread partition table

# toys/other/bzcat.c
config BUNZIP2
  bool "bunzip2"
  default y
  help
    usage: bunzip2 [-cftkv] [FILE...]

    Decompress listed files (file.bz becomes file) deleting archive file(s).
    Read from stdin if no files listed.

    -c	Force output to stdout
    -f	Force decompression (if FILE doesn't end in .bz, replace original)
    -k	Keep input files (-c and -t imply this)
    -t	Test integrity
    -v	Verbose

config BZCAT
  bool "bzcat"
  default y
  help
    usage: bzcat [FILE...]

    Decompress listed files to stdout. Use stdin if no files listed.

# toys/other/chcon.c
config CHCON
  bool "chcon"
  depends on TOYBOX_SELINUX
  default y
  help
    usage: chcon [-hRv] CONTEXT FILE...

    Change the SELinux security context of listed file[s].

    -h	Change symlinks instead of what they point to
    -R	Recurse into subdirectories
    -v	Verbose

# toys/other/chroot.c
config CHROOT
  bool "chroot"
  default y
  help
    usage: chroot NEWROOT [COMMAND [ARG...]]

    Run command within a new root directory. If no command, run /bin/sh.

# toys/other/chrt.c
config CHRT
  bool "chrt"
  default y
  help
    usage: chrt [-Rmofrbi] {-p PID [PRIORITY] | [PRIORITY COMMAND...]}

    Get/set a process' real-time scheduling policy and priority.

    -p	Set/query given pid (instead of running COMMAND)
    -R	Set SCHED_RESET_ON_FORK
    -m	Show min/max priorities available

    Set policy (default -r):

      -o  SCHED_OTHER    -f  SCHED_FIFO    -r  SCHED_RR
      -b  SCHED_BATCH    -i  SCHED_IDLE

# toys/other/chvt.c
config CHVT
  bool "chvt"
  default y
  help
    usage: chvt N

    Change to virtual terminal number N. (This only works in text mode.)

    Virtual terminals are the Linux VGA text mode displays, ordinarily
    switched between via alt-F1, alt-F2, etc. Use ctrl-alt-F1 to switch
    from X to a virtual terminal, and alt-F6 (or F7, or F8) to get back.

# toys/other/clear.c
config CLEAR
  bool "clear"
  default y
  help
    Clear the screen.

# toys/other/count.c
config COUNT
  bool "count"
  default y
  help
    usage: count

    Copy stdin to stdout, displaying simple progress indicator to stderr.

# toys/other/devmem.c
config DEVMEM
  bool "devmem"
  default y
  help
    usage: devmem ADDR [WIDTH [DATA]]

    Read/write physical address via /dev/mem.

    WIDTH is 1, 2, 4, or 8 bytes (default 4).

# toys/other/dos2unix.c
config DOS2UNIX
  bool "dos2unix/unix2dos"
  default y
  help
    usage: dos2unix [FILE...]

    Convert newline format from dos "\r\n" to unix "\n".
    If no files listed copy from stdin, "-" is a synonym for stdin.

config UNIX2DOS
  bool "unix2dos"
  default y
  help
    usage: unix2dos [FILE...]

    Convert newline format from unix "\n" to dos "\r\n".
    If no files listed copy from stdin, "-" is a synonym for stdin.

# toys/other/eject.c
config EJECT
  bool "eject"
  default y
  help
    usage: eject [-stT] [DEVICE]

    Eject DEVICE or default /dev/cdrom

    -s	SCSI device
    -t	Close tray
    -T	Open/close tray (toggle)

# toys/other/factor.c
config FACTOR
  bool "factor"
  default y
  help
    usage: factor NUMBER...

    Factor integers.

# toys/other/fallocate.c
config FALLOCATE
  bool "fallocate"
  default y
  help
    usage: fallocate [-l size] [-o offset] file

    Tell the filesystem to allocate space for a file.

# toys/other/flock.c
config FLOCK
  bool "flock"
  default y
  help
    usage: flock [-sxun] fd

    Manage advisory file locks.

    -s	Shared lock
    -x	Exclusive lock (default)
    -u	Unlock
    -n	Non-blocking: fail rather than wait for the lock

# toys/other/fmt.c
config FMT
  bool "fmt"
  default y
  help
    usage: fmt [-w WIDTH] [FILE...]

    Reformat input to wordwrap at a given line length, preserving existing
    indentation level, writing to stdout.

    -w WIDTH	Maximum characters per line (default 75)

# toys/other/free.c
config FREE
  bool "free"
  default y
  help
    usage: free [-bkmgt]

    Display the total, free and used amount of physical memory and swap space.

    -bkmgt	Output units (default is bytes)
    -h	Human readable (K=1024)

# toys/other/freeramdisk.c
config FREERAMDISK
  bool "freeramdisk"
  default y
  help
    usage: freeramdisk [RAM device]

    Free all memory allocated to specified ramdisk

# toys/other/fsfreeze.c
config FSFREEZE
  bool "fsfreeze"
  default y
  depends on TOYBOX_FIFREEZE
  help
    usage: fsfreeze {-f | -u} MOUNTPOINT

    Freeze or unfreeze a filesystem.

    -f	Freeze
    -u	Unfreeze

# toys/other/fsync.c
config FSYNC
  bool "fsync"
  default y
  help
    usage: fsync [-d] [FILE...]

    Synchronize a file's in-core state with storage device.

    -d	Avoid syncing metadata

# toys/other/help.c
config HELP
  bool "help"
  default y
  depends on TOYBOX_HELP
  help
    usage: help [-ahu] [COMMAND]

    -a	All commands
    -u	Usage only
    -h	HTML output

    Show usage information for toybox commands.
    Run "toybox" with no arguments for a list of available commands.

# toys/other/hexedit.c
config HEXEDIT
  bool "hexedit"
  default y
  help
    usage: hexedit FILENAME

    Hexadecimal file editor. All changes are written to disk immediately.

    -r	Read only (display but don't edit)

    Keys:
    Arrows        Move left/right/up/down by one line/column
    Pg Up/Pg Dn   Move up/down by one page
    0-9, a-f      Change current half-byte to hexadecimal value
    u             Undo
    q/^c/^d/<esc> Quit

# toys/other/hwclock.c
config HWCLOCK
  bool "hwclock"
  default y
  help
    usage: hwclock [-rswtluf]

    Get/set the hardware clock.

    -f FILE	Use specified device file instead of /dev/rtc (--rtc)
    -l	Hardware clock uses localtime (--localtime)
    -r	Show hardware clock time (--show)
    -s	Set system time from hardware clock (--hctosys)
    -t	Set the system time based on the current timezone (--systz)
    -u	Hardware clock uses UTC (--utc)
    -w	Set hardware clock from system time (--systohc)

# toys/other/i2ctools.c
config I2CDETECT
  bool "i2cdetect"
  default y
  help
    usage: i2cdetect [-ary] BUS [FIRST LAST]
    usage: i2cdetect -F BUS
    usage: i2cdetect -l

    Detect i2c devices.

    -a	All addresses (0x00-0x7f rather than 0x03-0x77)
    -F	Show functionality
    -l	List all buses
    -r	Probe with SMBus Read Byte
    -y	Answer "yes" to confirmation prompts (for script use)

config I2CDUMP
  bool "i2cdump"
  default y
  help
    usage: i2cdump [-fy] BUS CHIP

    Dump i2c registers.

    -f	Force access to busy devices
    -y	Answer "yes" to confirmation prompts (for script use)

config I2CGET
  bool "i2cget"
  default y
  help
    usage: i2cget [-fy] BUS CHIP ADDR

    Read an i2c register.

    -f	Force access to busy devices
    -y	Answer "yes" to confirmation prompts (for script use)

config I2CSET
  bool "i2cset"
  default y
  help
    usage: i2cset [-fy] BUS CHIP ADDR VALUE... MODE

    Write an i2c register. MODE is b for byte, w for 16-bit word, i for I2C block.

    -f	Force access to busy devices
    -y	Answer "yes" to confirmation prompts (for script use)

# toys/other/inotifyd.c
config INOTIFYD
  bool "inotifyd"
  default y
  help
    usage: inotifyd PROG FILE[:MASK] ...

    When a filesystem event matching MASK occurs to a FILE, run PROG as:

      PROG EVENTS FILE [DIRFILE]

    If PROG is "-" events are sent to stdout.

    This file is:
      a  accessed    c  modified    e  metadata change  w  closed (writable)
      r  opened      D  deleted     M  moved            0  closed (unwritable)
      u  unmounted   o  overflow    x  unwatchable

    A file in this directory is:
      m  moved in    y  moved out   n  created          d  deleted

    When x event happens for all FILEs, inotifyd exits (after waiting for PROG).

# toys/other/insmod.c
config INSMOD
  bool "insmod"
  default y
  help
    usage: insmod MODULE [MODULE_OPTIONS]

    Load the module named MODULE passing options if given.

# toys/other/ionice.c
config IONICE
  bool "ionice"
  default y
  help
    usage: ionice [-t] [-c CLASS] [-n LEVEL] [COMMAND...|-p PID]

    Change the I/O scheduling priority of a process. With no arguments
    (or just -p), display process' existing I/O class/priority.

    -c	CLASS = 1-3: 1(realtime), 2(best-effort, default), 3(when-idle)
    -n	LEVEL = 0-7: (0 is highest priority, default = 5)
    -p	Affect existing PID instead of spawning new child
    -t	Ignore failure to set I/O priority

    System default iopriority is generally -c 2 -n 4.

config IORENICE
  bool "iorenice"
  default y
  help
    usage: iorenice PID [CLASS] [PRIORITY]

    Display or change I/O priority of existing process. CLASS can be
    "rt" for realtime, "be" for best effort, "idle" for only when idle, or
    "none" to leave it alone. PRIORITY can be 0-7 (0 is highest, default 4).

# toys/other/login.c
config LOGIN
  bool "login"
  default y
  depends on TOYBOX_SHADOW
  help
    usage: login [-p] [-h host] [-f USERNAME] [USERNAME]

    Log in as a user, prompting for username and password if necessary.

    -p	Preserve environment
    -h	The name of the remote host for this login
    -f	login as USERNAME without authentication

# toys/other/losetup.c
config LOSETUP
  bool "losetup"
  default y
  help
    usage: losetup [-cdrs] [-o OFFSET] [-S SIZE] {-d DEVICE...|-j FILE|-af|{DEVICE FILE}}

    Associate a loopback device with a file, or show current file (if any)
    associated with a loop device.

    Instead of a device:
    -a	Iterate through all loopback devices
    -f	Find first unused loop device (may create one)
    -j FILE	Iterate through all loopback devices associated with FILE

    existing:
    -c	Check capacity (file size changed)
    -d DEV	Detach loopback device
    -D	Detach all loopback devices

    new:
    -s	Show device name (alias --show)
    -o OFF	Start association at offset OFF into FILE
    -r	Read only
    -S SIZE	Limit SIZE of loopback association (alias --sizelimit)

# toys/other/lsattr.c
config LSATTR
  bool "lsattr"
  default y
  help
    usage: lsattr [-Radlpv] [FILE...]

    List file attributes on a Linux file system.
    Flag letters are defined in chattr help.

    -R	Recursively list attributes of directories and their contents
    -a	List all files in directories, including files that start with '.'
    -d	List directories like other files, rather than listing their contents
    -l	List long flag names
    -p	List the file's project number
    -v	List the file's version/generation number

config CHATTR
  bool "chattr"
  default y
  help
    usage: chattr [-R] [-+=AacDdijsStTu] [-p PROJID] [-v VERSION] [FILE...]

    Change file attributes on a Linux file system.

    -R	Recurse
    -p	Set the file's project number
    -v	Set the file's version/generation number

    Operators:
      '-' Remove attributes
      '+' Add attributes
      '=' Set attributes

    Attributes:
      A  No atime                     a  Append only
      C  No COW                       c  Compression
      D  Synchronous dir updates      d  No dump
      E  Encrypted                    e  Extents
      F  Case-insensitive (casefold)
      I  Indexed directory            i  Immutable
      j  Journal data
      N  Inline data in inode
      P  Project hierarchy
      S  Synchronous file updates     s  Secure delete
      T  Top of dir hierarchy         t  No tail-merging
      u  Allow undelete
      V  Verity

# toys/other/lsmod.c
config LSMOD
  bool "lsmod"
  default y
  help
    usage: lsmod

    Display the currently loaded modules, their sizes and their dependencies.

# toys/other/lspci.c
config LSPCI
  bool "lspci"
  default y
  help
    usage: lspci [-ekm]

    List PCI devices.

    -e	Print all 6 digits in class
    -k	Print kernel driver
    -m	Machine readable format

config LSPCI_TEXT
  bool "lspci readable output"
  depends on LSPCI
  default y
  help
    usage: lspci [-n] [-i FILE ]

    -n	Numeric output (repeat for readable and numeric)
    -i	PCI ID database (default /usr/share/misc/pci.ids)


# toys/other/lsusb.c
config LSUSB
  bool "lsusb"
  default y
  help
    usage: lsusb

    List USB hosts/devices.

# toys/other/makedevs.c
config MAKEDEVS
  bool "makedevs"
  default y
  help
    usage: makedevs [-d device_table] rootdir

    Create a range of special files as specified in a device table.

    -d	File containing device table (default reads from stdin)

    Each line of the device table has the fields:
    <name> <type> <mode> <uid> <gid> <major> <minor> <start> <increment> <count>
    Where name is the file name, and type is one of the following:

    b	Block device
    c	Character device
    d	Directory
    f	Regular file
    p	Named pipe (fifo)

    Other fields specify permissions, user and group id owning the file,
    and additional fields for device special files. Use '-' for blank entries,
    unspecified fields are treated as '-'.

# toys/other/mcookie.c
config MCOOKIE
  bool "mcookie"
  default y
  help
    usage: mcookie [-vV]

    Generate a 128-bit strong random number.

    -v  show entropy source (verbose)
    -V  show version

# toys/other/mix.c
config MIX
  bool "mix"
  default y
  help
   usage: mix [-d DEV] [-c CHANNEL] [-l VOL] [-r RIGHT]

   List OSS sound channels (module snd-mixer-oss), or set volume(s).

   -c CHANNEL	Set/show volume of CHANNEL (default first channel found)
   -d DEV		Device node (default /dev/mixer)
   -l VOL		Volume level
   -r RIGHT	Volume of right stereo channel (with -r, -l sets left volume)

# toys/other/mkpasswd.c
config MKPASSWD
  bool "mkpasswd"
  default y
  depends on !TOYBOX_ON_ANDROID
  help
    usage: mkpasswd [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT]

    Crypt PASSWORD using crypt(3)

    -P FD	Read password from file descriptor FD
    -m TYPE	Encryption method (des, md5, sha256, or sha512; default is des)
    -S SALT

# toys/other/mkswap.c
config MKSWAP
  bool "mkswap"
  default y
  help
    usage: mkswap [-L LABEL] DEVICE

    Set up a Linux swap area on a device or file.

# toys/other/modinfo.c
config MODINFO
  bool "modinfo"
  default y
  help
    usage: modinfo [-0] [-b basedir] [-k kernel] [-F field] [module|file...]

    Display module fields for modules specified by name or .ko path.

    -F  Only show the given field
    -0  Separate fields with NUL rather than newline
    -b  Use <basedir> as root for /lib/modules/
    -k  Look in given directory under /lib/modules/

# toys/other/mountpoint.c
config MOUNTPOINT
  bool "mountpoint"
  default y
  help
    usage: mountpoint [-qd] DIR
           mountpoint [-qx] DEVICE

    Check whether the directory or device is a mountpoint.

    -q	Be quiet, return zero if directory is a mountpoint
    -d	Print major/minor device number of the directory
    -x	Print major/minor device number of the block device

# toys/other/nbd_client.c
config NBD_CLIENT
  bool "nbd-client"
  depends on TOYBOX_FORK
  default y
  help
    usage: nbd-client [-ns] HOST PORT DEVICE

    -n	Do not fork into background
    -s	nbd swap support (lock server into memory)

# toys/other/nsenter.c
config UNSHARE
  bool "unshare"
  default y
  depends on TOYBOX_CONTAINER
  help
    usage: unshare [-imnpuUr] COMMAND...

    Create new container namespace(s) for this process and its children, so
    some attribute is not shared with the parent process.

    -f	Fork command in the background (--fork)
    -i	SysV IPC (message queues, semaphores, shared memory) (--ipc)
    -m	Mount/unmount tree (--mount)
    -n	Network address, sockets, routing, iptables (--net)
    -p	Process IDs and init (--pid)
    -r	Become root (map current euid/egid to 0/0, implies -U) (--map-root-user)
    -u	Host and domain names (--uts)
    -U	UIDs, GIDs, capabilities (--user)

    A namespace allows a set of processes to have a different view of the
    system than other sets of processes.

config NSENTER
  bool "nsenter"
  depends on TOYBOX_CONTAINER
  default y
  help
    usage: nsenter [-t pid] [-F] [-i] [-m] [-n] [-p] [-u] [-U] COMMAND...

    Run COMMAND in an existing (set of) namespace(s).

    -t	PID to take namespaces from    (--target)
    -F	don't fork, even if -p is used (--no-fork)

    The namespaces to switch are:

    -i	SysV IPC: message queues, semaphores, shared memory (--ipc)
    -m	Mount/unmount tree (--mount)
    -n	Network address, sockets, routing, iptables (--net)
    -p	Process IDs and init, will fork unless -F is used (--pid)
    -u	Host and domain names (--uts)
    -U	UIDs, GIDs, capabilities (--user)

    If -t isn't specified, each namespace argument must provide a path
    to a namespace file, ala "-i=/proc/$PID/ns/ipc"

# toys/other/oneit.c
config ONEIT
  bool "oneit"
  default y
  help
    usage: oneit [-p] [-c /dev/tty0] command [...]

    Simple init program that runs a single supplied command line with a
    controlling tty (so CTRL-C can kill it).

    -c	Which console device to use (/dev/console doesn't do CTRL-C, etc)
    -p	Power off instead of rebooting when command exits
    -r	Restart child when it exits
    -3	Write 32 bit PID of each exiting reparented process to fd 3 of child
    	(Blocking writes, child must read to avoid eventual deadlock.)

    Spawns a single child process (because PID 1 has signals blocked)
    in its own session, reaps zombies until the child exits, then
    reboots the system (or powers off with -p, or restarts the child with -r).

    Responds to SIGUSR1 by halting the system, SIGUSR2 by powering off,
    and SIGTERM or SIGINT reboot.

# toys/other/partprobe.c
config PARTPROBE
  bool "partprobe"
  default y
  help
    usage: partprobe DEVICE...

    Tell the kernel about partition table changes

    Ask the kernel to re-read the partition table on the specified devices.

# toys/other/pivot_root.c
config PIVOT_ROOT
  bool "pivot_root"
  default y
  help
    usage: pivot_root OLD NEW

    Swap OLD and NEW filesystems (as if by simultaneous mount --move), and
    move all processes with chdir or chroot under OLD into NEW (including
    kernel threads) so OLD may be unmounted.

    The directory NEW must exist under OLD. This doesn't work on initramfs,
    which can't be moved (about the same way PID 1 can't be killed; see
    switch_root instead).

# toys/other/pmap.c
config PMAP
  bool "pmap"
  default y
  help
    usage: pmap [-xq] [pids...]

    Report the memory map of a process or processes.

    -x	Show the extended format
    -q	Do not display some header/footer lines

# toys/other/printenv.c
config PRINTENV
  bool "printenv"
  default y
  help
    usage: printenv [-0] [env_var...]

    Print environment variables.

    -0	Use \0 as delimiter instead of \n

# toys/other/pwdx.c
config PWDX
  bool "pwdx"
  default y
  help
    usage: pwdx PID...

    Print working directory of processes listed on command line.

# toys/other/readahead.c
config READAHEAD
  bool "readahead"
  default y
  help
    usage: readahead FILE...

    Preload files into disk cache.

# toys/other/readlink.c
config READLINK
  bool "readlink"
  default y
  help
    usage: readlink FILE...

    With no options, show what symlink points to, return error if not symlink.

    Options for producing canonical paths (all symlinks/./.. resolved):

    -e	Canonical path to existing entry (fail if missing)
    -f	Full path (fail if directory missing)
    -m	Ignore missing entries, show where it would be
    -n	No trailing newline
    -q	Quiet (no output, just error code)

config REALPATH
  bool "realpath"
  default y
  help
    usage: realpath FILE...

    Display the canonical absolute pathname

# toys/other/reboot.c
config REBOOT
  bool "reboot"
  default y
  help
    usage: reboot/halt/poweroff [-fn]

    Restart, halt or powerdown the system.

    -f	Don't signal init
    -n	Don't sync before stopping the system

# toys/other/reset.c
config RESET
  bool "reset"
  default y
  help
    usage: reset

    Reset the terminal.

# toys/other/rev.c
config REV
  bool "rev"
  default y
  help
    usage: rev [FILE...]

    Output each line reversed, when no files are given stdin is used.

# toys/other/rmmod.c
config RMMOD
  bool "rmmod"
  default y
  help
    usage: rmmod [-wf] [MODULE]

    Unload the module named MODULE from the Linux kernel.
    -f	Force unload of a module
    -w	Wait until the module is no longer used


# toys/other/rtcwake.c
config RTCWAKE
  bool "rtcwake"
  default y
  help
    usage: rtcwake [-aluv] [-d FILE] [-m MODE] [-s SECS] [-t UNIX]

    Enter the given sleep state until the given time.

    -a	RTC uses time specified in /etc/adjtime
    -d FILE	Device to use (default /dev/rtc)
    -l	RTC uses local time
    -m	Mode (--list-modes to see those supported by your kernel):
    	  standby  S1: default              mem     S3: suspend to RAM
    	  disk     S4: suspend to disk      off     S5: power off
    	  disable  Cancel current alarm     freeze  stop processes/processors
    	  no       just set wakeup time     on      just poll RTC for alarm
    	  show     just show current alarm
    -s SECS	Wake SECS seconds from now
    -t UNIX	Wake UNIX seconds from epoch
    -u	RTC uses UTC
    -v	Verbose

# toys/other/setfattr.c
config SETFATTR
  bool "setfattr"
  default y
  help
    usage: setfattr [-h] [-x|-n NAME] [-v VALUE] FILE...

    Write POSIX extended attributes.

    -h	Do not dereference symlink
    -n	Set given attribute
    -x	Remove given attribute
    -v	Set value for attribute -n (default is empty)

# toys/other/setsid.c
config SETSID
  bool "setsid"
  default y
  help
    usage: setsid [-cdw] command [args...]

    Run process in a new session.

    -d	Detach from tty
    -c	Control tty (become foreground process & receive keyboard signals)
    -w	Wait for child (and exit with its status)

# toys/other/shred.c
config SHRED
  bool "shred"
  default y
  help
    usage: shred [-fuz] [-n COUNT] [-s SIZE] FILE...

    Securely delete a file by overwriting its contents with random data.

    -f		Force (chmod if necessary)
    -n COUNT	Random overwrite iterations (default 1)
    -o OFFSET	Start at OFFSET
    -s SIZE		Use SIZE instead of detecting file size
    -u		Unlink (actually delete file when done)
    -x		Use exact size (default without -s rounds up to next 4k)
    -z		Zero at end

    Note: data journaling filesystems render this command useless, you must
    overwrite all free space (fill up disk) to erase old data on those.

# toys/other/stat.c
config STAT
  bool stat
  default y
  help
    usage: stat [-tfL] [-c FORMAT] FILE...

    Display status of files or filesystems.

    -c	Output specified FORMAT string instead of default
    -f	Display filesystem status instead of file status
    -L	Follow symlinks
    -t	terse (-c "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o")
    	      (with -f = -c "%n %i %l %t %s %S %b %f %a %c %d")

    The valid format escape sequences for files:
    %a  Access bits (octal) |%A  Access bits (flags)|%b  Size/512
    %B  Bytes per %b (512)  |%C  Security context   |%d  Device ID (dec)
    %D  Device ID (hex)     |%f  All mode bits (hex)|%F  File type
    %g  Group ID            |%G  Group name         |%h  Hard links
    %i  Inode               |%m  Mount point        |%n  Filename
    %N  Long filename       |%o  I/O block size     |%s  Size (bytes)
    %t  Devtype major (hex) |%T  Devtype minor (hex)|%u  User ID
    %U  User name           |%x  Access time        |%X  Access unix time
    %y  Modification time   |%Y  Mod unix time      |%z  Creation time
    %Z  Creation unix time

    The valid format escape sequences for filesystems:
    %a  Available blocks    |%b  Total blocks       |%c  Total inodes
    %d  Free inodes         |%f  Free blocks        |%i  File system ID
    %l  Max filename length |%n  File name          |%s  Fragment size
    %S  Best transfer size  |%t  FS type (hex)      |%T  FS type (driver name)

# toys/other/swapoff.c
config SWAPOFF
  bool "swapoff"
  default y
  help
    usage: swapoff swapregion

    Disable swapping on a given swapregion.

# toys/other/swapon.c
config SWAPON
  bool "swapon"
  default y
  help
    usage: swapon [-d] [-p priority] filename

    Enable swapping on a given device/file.

    -d	Discard freed SSD pages
    -p	Priority (highest priority areas allocated first)

# toys/other/switch_root.c
config SWITCH_ROOT
  bool "switch_root"
  default y
  help
    usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT...

    Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,
    and exec NEW_INIT.

    -c	Redirect console to device in NEW_ROOT
    -h	Hang instead of exiting on failure (avoids kernel panic)

# toys/other/sysctl.c
config SYSCTL
  bool "sysctl"
  default y
  help
    usage: sysctl [-aAeNnqw] [-p [FILE] | KEY[=VALUE]...]

    Read/write system control data (under /proc/sys).

    -a,A	Show all values
    -e	Don't warn about unknown keys
    -N	Don't print key values
    -n	Don't print key names
    -p	Read values from FILE (default /etc/sysctl.conf)
    -q	Don't show value after write
    -w	Only write values (object to reading)

# toys/other/tac.c
config TAC
  bool "tac"
  default y
  help
    usage: tac [FILE...]

    Output lines in reverse order.

# toys/other/taskset.c
config NPROC
  bool "nproc"
  default y
  help
    usage: nproc [--all]

    Print number of processors.

    --all	Show all processors, not just ones this task can run on

config TASKSET
  bool "taskset"
  default y
  help
    usage: taskset [-ap] [mask] [PID | cmd [args...]]

    Launch a new task which may only run on certain processors, or change
    the processor affinity of an existing PID.

    Mask is a hex string where each bit represents a processor the process
    is allowed to run on. PID without a mask displays existing affinity.

    -p	Set/get the affinity of given PID instead of a new command
    -a	Set/get the affinity of all threads of the PID

# toys/other/timeout.c
config TIMEOUT
  bool "timeout"
  default y
  help
    usage: timeout [-k DURATION] [-s SIGNAL] DURATION COMMAND...

    Run command line as a child process, sending child a signal if the
    command doesn't exit soon enough.

    DURATION can be a decimal fraction. An optional suffix can be "m"
    (minutes), "h" (hours), "d" (days), or "s" (seconds, the default).

    -s	Send specified signal (default TERM)
    -k	Send KILL signal if child still running this long after first signal
    -v	Verbose
    --foreground       Don't create new process group
    --preserve-status  Exit with the child's exit status

# toys/other/truncate.c
config TRUNCATE
  bool "truncate"
  default y
  help
    usage: truncate [-c] -s SIZE file...

    Set length of file(s), extending sparsely if necessary.

    -c	Don't create file if it doesn't exist
    -s	New size (with optional prefix and suffix)

    SIZE prefix: + add, - subtract, < shrink to, > expand to,
                 / multiple rounding down, % multiple rounding up
    SIZE suffix: k=1024, m=1024^2, g=1024^3, t=1024^4, p=1024^5, e=1024^6

# toys/other/uptime.c
config UPTIME
  bool "uptime"
  default y
  depends on TOYBOX_UTMPX
  help
    usage: uptime [-ps]

    Tell the current time, how long the system has been running, the number
    of users, and the system load averages for the past 1, 5 and 15 minutes.

    -p	Pretty (human readable) uptime
    -s	Since when has the system been up?

# toys/other/usleep.c
config USLEEP
  bool "usleep"
  default y
  help
    usage: usleep MICROSECONDS

    Pause for MICROSECONDS microseconds.

# toys/other/uuidgen.c
config UUIDGEN
  bool "uuidgen"
  default y
  help
    usage: uuidgen

    Create and print a new RFC4122 random UUID.

# toys/other/vconfig.c
config VCONFIG
  bool "vconfig"
  default y
  help
    usage: vconfig COMMAND [OPTIONS]

    Create and remove virtual ethernet devices

    add             [interface-name] [vlan_id]
    rem             [vlan-name]
    set_flag        [interface-name] [flag-num]       [0 | 1]
    set_egress_map  [vlan-name]      [skb_priority]   [vlan_qos]
    set_ingress_map [vlan-name]      [skb_priority]   [vlan_qos]
    set_name_type   [name-type]

# toys/other/vmstat.c
config VMSTAT
  bool "vmstat"
  default y
  help
    usage: vmstat [-n] [DELAY [COUNT]]

    Print virtual memory statistics, repeating each DELAY seconds, COUNT times.
    (With no DELAY, prints one line. With no COUNT, repeats until killed.)

    Show processes running and blocked, kilobytes swapped, free, buffered, and
    cached, kilobytes swapped in and out per second, file disk blocks input and
    output per second, interrupts and context switches per second, percent
    of CPU time spent running user code, system code, idle, and awaiting I/O.
    First line is since system started, later lines are since last line.

    -n	Display the header only once

# toys/other/watch.c
config WATCH
  bool "watch"
  default y
  help
    usage: watch [-teb] [-n SEC] PROG ARGS

    Run PROG every -n seconds, showing output. Hit q to quit.

    -n	Loop period in seconds (default 2)
    -t	Don't print header
    -e	Exit on error
    -b	Beep on command error
    -x	Exec command directly (vs "sh -c")

# toys/other/w.c
config W
  bool "w"
  default y
  depends on TOYBOX_UTMPX
  help
    usage: w

    Show who is logged on and since how long they logged in.

# toys/other/which.c
config WHICH
  bool "which"
  default y
  help
    usage: which [-a] filename ...

    Search $PATH for executable files matching filename(s).

    -a	Show all matches

# toys/other/xxd.c
config XXD
  bool "xxd"
  default y
  help
    usage: xxd [-c n] [-g n] [-i] [-l n] [-o n] [-p] [-r] [-s n] [file]

    Hexdump a file to stdout.  If no file is listed, copy from stdin.
    Filename "-" is a synonym for stdin.

    -c n	Show n bytes per line (default 16)
    -g n	Group bytes by adding a ' ' every n bytes (default 2)
    -i	Include file output format (comma-separated hex byte literals)
    -l n	Limit of n bytes before stopping (default is no limit)
    -o n	Add n to display offset
    -p	Plain hexdump (30 bytes/line, no grouping)
    -r	Reverse operation: turn a hexdump into a binary file
    -s n	Skip to offset n

# toys/other/yes.c
config YES
  bool "yes"
  default y
  help
    usage: yes [args...]

    Repeatedly output line until killed. If no args, output 'y'.

endmenu
menu "Networking"

# toys/net/ftpget.c
config FTPGET
  bool "ftpget"
  default y
  help
    usage: ftpget [-cvgslLmMdD] [-P PORT] [-p PASSWORD] [-u USER] HOST [LOCAL] REMOTE

    Talk to ftp server. By default get REMOTE file via passive anonymous
    transfer, optionally saving under a LOCAL name. Can also send, list, etc.

    -c	Continue partial transfer
    -p	Use PORT instead of "21"
    -P	Use PASSWORD instead of "ftpget@"
    -u	Use USER instead of "anonymous"
    -v	Verbose

    Ways to interact with FTP server:
    -d	Delete file
    -D	Remove directory
    -g	Get file (default)
    -l	List directory
    -L	List (filenames only)
    -m	Move file on server from LOCAL to REMOTE
    -M	mkdir
    -s	Send file

config FTPPUT
  bool "ftpput"
  default y
  help
    An ftpget that defaults to -s instead of -g

# toys/net/ifconfig.c
config IFCONFIG
  bool "ifconfig"
  default y
  help
    usage: ifconfig [-aS] [INTERFACE [ACTION...]]

    Display or configure network interface.

    With no arguments, display active interfaces. First argument is interface
    to operate on, one argument by itself displays that interface.

    -a	All interfaces displayed, not just active ones
    -S	Short view, one line per interface

    Standard ACTIONs to perform on an INTERFACE:

    ADDR[/MASK]        - set IPv4 address (1.2.3.4/5) and activate interface
    add|del ADDR[/LEN] - add/remove IPv6 address (1111::8888/128)
    up|down            - activate or deactivate interface

    Advanced ACTIONs (default values usually suffice):

    default          - remove IPv4 address
    netmask ADDR     - set IPv4 netmask via 255.255.255.0 instead of /24
    txqueuelen LEN   - number of buffered packets before output blocks
    mtu LEN          - size of outgoing packets (Maximum Transmission Unit)
    broadcast ADDR   - Set broadcast address
    pointopoint ADDR - PPP and PPPOE use this instead of "route add default gw"
    hw TYPE ADDR     - set hardware (mac) address (type = ether|infiniband)

    Flags you can set on an interface (or -remove by prefixing with -):

    arp       - don't use Address Resolution Protocol to map LAN routes
    promisc   - don't discard packets that aren't to this LAN hardware address
    multicast - force interface into multicast mode if the driver doesn't
    allmulti  - promisc for multicast packets

# toys/net/microcom.c
config MICROCOM
  bool "microcom"
  default y
  help
    usage: microcom [-s SPEED] [-X] DEVICE

    Simple serial console.

    -s	Set baud rate to SPEED (default 115200)
    -X	Ignore ^@ (send break) and ^] (exit)

# toys/net/netcat.c
config NETCAT
  bool "netcat"
  default y
  help
    usage: netcat [-46U] [-u] [-wpq #] [-s addr] {IPADDR PORTNUM|-f FILENAME|COMMAND...}

    Forward stdin/stdout to a file or network connection.

    -4	Force IPv4
    -6	Force IPv6
    -f	Use FILENAME (ala /dev/ttyS0) instead of network
    -p	Local port number
    -q	Quit SECONDS after EOF on stdin, even if stdout hasn't closed yet
    -s	Local source address
    -u	Use UDP
    -U	Use a UNIX domain socket
    -w	SECONDS timeout to establish connection
    -W	SECONDS timeout for more data on an idle connection

    Use "stty 115200 -F /dev/ttyS0 && stty raw -echo -ctlecho" with
    netcat -f to connect to a serial port.

config NETCAT_LISTEN
  bool "netcat server options (-let)"
  default y
  depends on NETCAT
  help
    usage: netcat [-tElL]

    -l	Listen for one incoming connection, then exit
    -L	Listen and background each incoming connection (server mode)
    -t	Allocate tty
    -E	Forward stderr

    When listening the COMMAND line is executed as a child process to handle
    an incoming connection. With no COMMAND -l forwards the connection
    to stdin/stdout. If no -p specified, -l prints the port it bound to and
    backgrounds itself (returning immediately).

    For a quick-and-dirty server, try something like:
    netcat -s 127.0.0.1 -p 1234 -tL sh -l

# toys/net/netstat.c
config NETSTAT
  bool "netstat"
  default y
  help
    usage: netstat [-pWrxwutneal]

    Display networking information. Default is netstat -tuwx

    -r	Routing table
    -a	All sockets (not just connected)
    -l	Listening server sockets
    -t	TCP sockets
    -u	UDP sockets
    -w	Raw sockets
    -x	Unix sockets
    -e	Extended info
    -n	Don't resolve names
    -W	Wide display
    -p	Show PID/program name of sockets

# toys/net/ping.c
config PING
  bool "ping"
  default y
  help
    usage: ping [OPTIONS] HOST

    Check network connectivity by sending packets to a host and reporting
    its response.

    Send ICMP ECHO_REQUEST packets to ipv4 or ipv6 addresses and prints each
    echo it receives back, with round trip time. Returns true if host alive.

    Options:
    -4, -6		Force IPv4 or IPv6
    -c CNT		Send CNT many packets (default 3, 0 = infinite)
    -f		Flood (print . and \b to show drops, default -c 15 -i 0.2)
    -i TIME		Interval between packets (default 1, need root for < .2)
    -I IFACE/IP	Source interface or address
    -m MARK		Tag outgoing packets using SO_MARK
    -q		Quiet (stops after one returns true if host is alive)
    -s SIZE		Data SIZE in bytes (default 56)
    -t TTL		Set Time To Live (number of hops)
    -W SEC		Seconds to wait for response after last -c packet (default 3)
    -w SEC		Exit after this many seconds

# toys/net/rfkill.c
config RFKILL
  bool "rfkill"
  default y
  help
    usage: rfkill COMMAND [DEVICE]

    Enable/disable wireless devices.

    Commands:
    list [DEVICE]   List current state
    block DEVICE    Disable device
    unblock DEVICE  Enable device

    DEVICE is an index number, or one of:
    all, wlan(wifi), bluetooth, uwb(ultrawideband), wimax, wwan, gps, fm.

# toys/net/sntp.c
config SNTP
  bool "sntp"
  default y
  help
    usage: sntp [-saSdDq] [-r SHIFT] [-mM[ADDRESS]] [-p PORT] [SERVER]

    Simple Network Time Protocol client. Query SERVER and display time.

    -p	Use PORT (default 123)
    -s	Set system clock suddenly
    -a	Adjust system clock gradually
    -S	Serve time instead of querying (bind to SERVER address if specified)
    -m	Wait for updates from multicast ADDRESS (RFC 4330 default 224.0.1.1)
    -M	Multicast server on ADDRESS (default 224.0.0.1)
    -t	TTL (multicast only, default 1)
    -d	Daemonize (run in background re-querying )
    -D	Daemonize but stay in foreground: re-query time every 1000 seconds
    -r	Retry shift (every 1<<SHIFT seconds)
    -q	Quiet (don't display time)

# toys/net/tunctl.c
config TUNCTL
  bool "tunctl"
  default y
  help
    usage: tunctl [-dtT] [-u USER] NAME

    Create and delete tun/tap virtual ethernet devices.

    -T	Use tap (ethernet frames) instead of tun (ip packets)
    -d	Delete tun/tap device
    -t	Create tun/tap device
    -u	Set owner (user who can read/write device without root access)

endmenu
menu "Linux Standard Base commands"

# toys/lsb/dmesg.c
config DMESG
  bool "dmesg"
  default y
  help
    usage: dmesg [-Cc] [-r|-t|-T] [-n LEVEL] [-s SIZE] [-w]

    Print or control the kernel ring buffer.

    -C	Clear ring buffer without printing
    -c	Clear ring buffer after printing
    -n	Set kernel logging LEVEL (1-9)
    -r	Raw output (with <level markers>)
    -S	Use syslog(2) rather than /dev/kmsg
    -s	Show the last SIZE many bytes
    -T	Human readable timestamps
    -t	Don't print timestamps
    -w	Keep waiting for more output (aka --follow)

# toys/lsb/gzip.c
config GZIP
  bool "gzip"
  default n
  help
    usage: gzip [-19cdfk] [FILE...]

    Compress files. With no files, compresses stdin to stdout.
    On success, the input files are removed and replaced by new
    files with the .gz suffix.

    -c	Output to stdout
    -d	Decompress (act as gunzip)
    -f	Force: allow overwrite of output file
    -k	Keep input files (default is to remove)
    -#	Compression level 1-9 (1:fastest, 6:default, 9:best)

config GUNZIP
  bool "gunzip"
  default y
  help
    usage: gunzip [-cfk] [FILE...]

    Decompress files. With no files, decompresses stdin to stdout.
    On success, the input files are removed and replaced by new
    files without the .gz suffix.

    -c	Output to stdout (act as zcat)
    -f	Force: allow read from tty
    -k	Keep input files (default is to remove)

config ZCAT
  bool "zcat"
  default y
  help
    usage: zcat [FILE...]

    Decompress files to stdout. Like `gzip -dc`.

    -f	Force: allow read from tty

# toys/lsb/hostname.c
config HOSTNAME
  bool "hostname"
  default y
  help
    usage: hostname [-bdsf] [-F FILENAME] [newname]

    Get/set the current hostname.

    -b	Set hostname to 'localhost' if otherwise unset
    -d	Show DNS domain name (no host)
    -f	Show fully-qualified name (host+domain, FQDN)
    -F	Set hostname to contents of FILENAME
    -s	Show short host name (no domain)

config DNSDOMAINNAME
  bool "dnsdomainname"
  default y
  help
    usage: dnsdomainname

    Show domain this system belongs to (same as hostname -d).

# toys/lsb/killall.c
config KILLALL
  bool "killall"
  default y
  help
    usage: killall [-l] [-iqv] [-SIGNAL|-s SIGNAL] PROCESS_NAME...

    Send a signal (default: TERM) to all processes with the given names.

    -i	Ask for confirmation before killing
    -l	Print list of all available signals
    -q	Don't print any warnings or error messages
    -s	Send SIGNAL instead of SIGTERM
    -v	Report if the signal was successfully sent
    -w	Wait until all signaled processes are dead

# toys/lsb/md5sum.c
config MD5SUM
  bool "md5sum"
  default y
  help
    usage: md5sum [-bcs] [FILE]...

    Calculate md5 hash for each input file, reading from stdin if none.
    Output one hash (32 hex digits) for each input file, followed by filename.

    -b	Brief (hash only, no filename)
    -c	Check each line of each FILE is the same hash+filename we'd output
    -s	No output, exit status 0 if all hashes match, 1 otherwise

config SHA1SUM
  bool "sha1sum"
  default y
  help
    usage: sha?sum [-bcs] [FILE]...

    Calculate sha hash for each input file, reading from stdin if none. Output
    one hash (40 hex digits for sha1, 56 for sha224, 64 for sha256, 96 for sha384,
    and 128 for sha512) for each input file, followed by filename.

    -b	Brief (hash only, no filename)
    -c	Check each line of each FILE is the same hash+filename we'd output
    -s	No output, exit status 0 if all hashes match, 1 otherwise

config SHA224SUM
  bool "sha224sum"
  default y
  depends on TOYBOX_LIBCRYPTO
  help
    See sha1sum

config SHA256SUM
  bool "sha256sum"
  default y
  depends on TOYBOX_LIBCRYPTO
  help
    See sha1sum

config SHA384SUM
  bool "sha384sum"
  default y
  depends on TOYBOX_LIBCRYPTO
  help
    See sha1sum

config SHA512SUM
  bool "sha512sum"
  default y
  depends on TOYBOX_LIBCRYPTO
  help
    See sha1sum

# toys/lsb/mknod.c
config MKNOD
  bool "mknod"
  default y
  help
    usage: mknod [-m MODE] NAME TYPE [MAJOR MINOR]

    Create a special file NAME with a given type. TYPE is b for block device,
    c or u for character device, p for named pipe (which ignores MAJOR/MINOR).

    -m	Mode (file permissions) of new device, in octal or u+x format

config MKNOD_Z
  bool
  default y
  depends on MKNOD && !TOYBOX_LSM_NONE
  help
    usage: mknod [-Z CONTEXT] ...

    -Z	Set security context to created file

# toys/lsb/mktemp.c
config MKTEMP
  bool "mktemp"
  default y
  help
    usage: mktemp [-dqu] [-p DIR] [TEMPLATE]

    Safely create a new file "DIR/TEMPLATE" and print its name.

    -d	Create directory instead of file (--directory)
    -p	Put new file in DIR (--tmpdir)
    -q	Quiet, no error messages
    -t	Prefer $TMPDIR > DIR > /tmp (default DIR > $TMPDIR > /tmp)
    -u	Don't create anything, just print what would be created

    Each X in TEMPLATE is replaced with a random printable character. The
    default TEMPLATE is tmp.XXXXXXXXXX.

# toys/lsb/mount.c
config MOUNT
  bool "mount"
  default y
  help
    usage: mount [-afFrsvw] [-t TYPE] [-o OPTION,] [[DEVICE] DIR]

    Mount new filesystem(s) on directories. With no arguments, display existing
    mounts.

    -a	Mount all entries in /etc/fstab (with -t, only entries of that TYPE)
    -O	Only mount -a entries that have this option
    -f	Fake it (don't actually mount)
    -r	Read only (same as -o ro)
    -w	Read/write (default, same as -o rw)
    -t	Specify filesystem type
    -v	Verbose

    OPTIONS is a comma separated list of options, which can also be supplied
    as --longopts.

    Autodetects loopback mounts (a file on a directory) and bind mounts (file
    on file, directory on directory), so you don't need to say --bind or --loop.
    You can also "mount -a /path" to mount everything in /etc/fstab under /path,
    even if it's noauto. DEVICE starting with UUID= is identified by blkid -U.

#config SMBMOUNT
#  bool "smbmount"
#  default n
#  helo
#    usage: smbmount SHARE DIR
#
#    Mount smb share with user/pasword prompt as necessary.
#
#config NFSMOUNT
#  bool "nfsmount"
#  default n
#  help
#    usage: nfsmount SHARE DIR
#
#    Invoke an eldrich horror from the dawn of time.

# toys/lsb/passwd.c
config PASSWD
  bool "passwd"
  default y
  depends on TOYBOX_SHADOW
  help
    usage: passwd [-a ALGO] [-dlu] [USER]

    Update user's authentication tokens. Defaults to current user.

    -a ALGO	Encryption method (des, md5, sha256, sha512) default: des
    -d		Set password to ''
    -l		Lock (disable) account
    -u		Unlock (enable) account

config PASSWD_SAD
  bool "Add sad password checking heuristics"
  default n
  depends on PASSWD
  help
    Password changes are checked to make sure they're at least 6 chars long,
    don't include the entire username (but not a subset of it), or the entire
    previous password (but changing password1, password2, password3 is fine).
    This heuristic accepts "aaaaaa" and "123456".

# toys/lsb/pidof.c
config PIDOF
  bool "pidof"
  default y
  help
    usage: pidof [-s] [-o omitpid[,omitpid...]] [NAME]...

    Print the PIDs of all processes with the given names.

    -s	Single shot, only return one pid
    -o	Omit PID(s)
    -x	Match shell scripts too

# toys/lsb/seq.c
config SEQ
  bool "seq"
  depends on TOYBOX_FLOAT
  default y
  help
    usage: seq [-w|-f fmt_str] [-s sep_str] [first] [increment] last

    Count from first to last, by increment. Omitted arguments default
    to 1. Two arguments are used as first and last. Arguments can be
    negative or floating point.

    -f	Use fmt_str as a printf-style floating point format string
    -s	Use sep_str as separator, default is a newline character
    -w	Pad to equal width with leading zeroes

# toys/lsb/su.c
config SU
  bool "su"
  default y
  depends on TOYBOX_SHADOW
  help
    usage: su [-lp] [-u UID] [-g GID,...] [-s SHELL] [-c CMD] [USER [COMMAND...]]

    Switch user, prompting for password of new user when not run as root.

    With one argument, switch to USER and run user's shell from /etc/passwd.
    With no arguments, USER is root. If COMMAND line provided after USER,
    exec() it as new USER (bypassing shell). If -u or -g specified, first
    argument (if any) isn't USER (it's COMMAND).

    first argument is USER name to switch to (which must exist).
    Non-root users are prompted for new user's password.

    -s	Shell to use (default is user's shell from /etc/passwd)
    -c	Command line to pass to -s shell (ala sh -c "CMD")
    -l	Reset environment as if new login.
    -u	Switch to UID instead of USER
    -g	Switch to GID (only root allowed, can be comma separated list)
    -p	Preserve environment (except for $PATH and $IFS)

# toys/lsb/sync.c
config SYNC
  bool "sync"
  default y
  help
    usage: sync

    Write pending cached data to disk (synchronize), blocking until done.

# toys/lsb/umount.c
config UMOUNT
  bool "umount"
  default y
  help
    usage: umount [-a [-t TYPE[,TYPE...]]] [-vrfD] [DIR...]

    Unmount the listed filesystems.

    -a	Unmount all mounts in /proc/mounts instead of command line list
    -D	Don't free loopback device(s)
    -f	Force unmount
    -l	Lazy unmount (detach from filesystem now, close when last user does)
    -n	Don't use /proc/mounts
    -r	Remount read only if unmounting fails
    -t	Restrict "all" to mounts of TYPE (or use "noTYPE" to skip)
    -v	Verbose

endmenu
menu "Example commands"

# toys/example/demo_many_options.c
config DEMO_MANY_OPTIONS
  bool "demo_many_options"
  default n
  help
    usage: demo_many_options -[a-zA-Z]

    Print the optflags value of the command arguments, in hex.

# toys/example/demo_number.c
config DEMO_NUMBER
  bool "demo_number"
  default n
  help
    usage: demo_number [-hsbi] NUMBER...

    -b	Use "B" for single byte units (HR_B)
    -d	Decimal units
    -h	Human readable
    -s	Space between number and units (HR_SPACE)

# toys/example/demo_scankey.c
config DEMO_SCANKEY
  bool "demo_scankey"
  default n
  help
    usage: demo_scankey

    Move a letter around the screen. Hit ESC to exit.

# toys/example/demo_utf8towc.c
config DEMO_UTF8TOWC
  bool "demo_utf8towc"
  default n
  help
    usage: demo_utf8towc

    Print differences between toybox's utf8 conversion routines vs libc du jour.

# toys/example/hello.c
config HELLO
  bool "hello"
  default n
  help
    usage: hello

    A hello world program.

    Mostly used as a simple template for adding new commands.
    Occasionally nice to smoketest kernel booting via "init=/usr/bin/hello".

# toys/example/hostid.c
config HOSTID
  bool "hostid"
  default n
  help
    usage: hostid

    Print the numeric identifier for the current host.

# toys/example/logwrapper.c
config LOGWRAPPER
  bool "logwrapper"
  default n
  help
    usage: logwrapper ...

    Append command line to $WRAPLOG, then call second instance
    of command in $PATH.

# toys/example/skeleton.c
config SKELETON
  bool "skeleton"
  default n
  help
    usage: skeleton [-a] [-b STRING] [-c NUMBER] [-d LIST] [-e COUNT] [...]

    Template for new commands. You don't need this.

    When creating a new command, copy this file and delete the parts you
    don't need. Be sure to replace all instances of "skeleton" (upper and lower
    case) with your new command name.

    For simple commands, "hello.c" is probably a better starting point.

config SKELETON_ALIAS
  bool "skeleton_alias"
  default n
  help
    usage: skeleton_alias [-dq] [-b NUMBER]

    Example of a second command with different arguments in the same source
    file as the first. This allows shared infrastructure not added to lib/.

endmenu
menu "Android"

# toys/android/getenforce.c
config GETENFORCE
  bool "getenforce"
  default y
  depends on TOYBOX_SELINUX
  help
    usage: getenforce

    Shows whether SELinux is disabled, enforcing, or permissive.

# toys/android/load_policy.c
config LOAD_POLICY
  bool "load_policy"
  depends on TOYBOX_SELINUX
  default y
  help
    usage: load_policy FILE

    Load the specified SELinux policy file.

# toys/android/log.c
config LOG
  bool "log"
  depends on TOYBOX_ON_ANDROID
  default y
  help
    usage: log [-p PRI] [-t TAG] MESSAGE...

    Logs message to logcat.

    -p	Use the given priority instead of INFO:
    	d: DEBUG  e: ERROR  f: FATAL  i: INFO  v: VERBOSE  w: WARN  s: SILENT
    -t	Use the given tag instead of "log"

# toys/android/restorecon.c
config RESTORECON
  bool "restorecon"
  depends on TOYBOX_SELINUX
  default y
  help
    usage: restorecon [-D] [-F] [-R] [-n] [-v] FILE...

    Restores the default security contexts for the given files.

    -D	Apply to /data/data too
    -F	Force reset
    -R	Recurse into directories
    -n	Don't make any changes; useful with -v to see what would change
    -v	Verbose

# toys/android/runcon.c
config RUNCON
  bool "runcon"
  depends on TOYBOX_SELINUX
  default y
  help
    usage: runcon CONTEXT COMMAND [ARGS...]

    Run a command in a specified security context.

# toys/android/sendevent.c
config SENDEVENT
  bool "sendevent"
  default y
  depends on TOYBOX_ON_ANDROID
  help
    usage: sendevent DEVICE TYPE CODE VALUE

    Sends a Linux input event.

# toys/android/setenforce.c
config SETENFORCE
  bool "setenforce"
  default y
  depends on TOYBOX_SELINUX
  help
    usage: setenforce [enforcing|permissive|1|0]

    Sets whether SELinux is enforcing (1) or permissive (0).

endmenu
