📄 busybox.txt
字号:
NAME BusyBox - The Swiss Army Knife of Embedded LinuxSYNTAX BusyBox <function> [arguments...] # or <function> [arguments...] # if symlinkedDESCRIPTION BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides minimalist replacements for most of the utilities you usually find in fileutils, shellutils, findutils, textutils, grep, gzip, tar, etc. BusyBox provides a fairly complete POSIX environment for any small or embedded system. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox has been written with size-optimization and limited resources in mind. It is also extremely modular so you can easily include or exclude commands (or features) at compile time. This makes it easy to customize your embedded systems. To create a working system, just add a kernel, a shell (such as ash), and an editor (such as elvis-tiny or ae).USAGE When you create a link to BusyBox for the function you wish to use, when BusyBox is called using that link it will behave as if the command itself has been invoked. For example, entering ln -s ./BusyBox ls ./ls will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled into BusyBox). You can also invoke BusyBox by issuing the command as an argument on the command line. For example, entering ./BusyBox ls will also cause BusyBox to behave as 'ls'.COMMON OPTIONS Most BusyBox commands support the -h option to provide a terse runtime description of their behavior.COMMANDS Currently defined functions include: adjtimex, ar, basename, busybox, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp, cp, cpio, cut, date, dc, dd, deallocvt, df, dirname, dmesg, dos2unix, dpkg, dpkg-deb, du, dumpkmap, dutmp, echo, expr, false, fbset, fdflush, find, free, freeramdisk, fsck.minix, getopt, grep, gunzip, gzip, halt, head, hostid, hostname, id, ifconfig, init, insmod, kill, killall, klogd, length, ln, loadacm, loadfont, loadkmap, logger, logname, ls, lsmod, makedevs, md5sum, mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp, more, mount, mt, mv, nc, nslookup, ping, pivot_root, poweroff, printf, ps, pwd, rdate, readlink, reboot, renice, reset, rm, rmdir, rmmod, route, rpm2cpio, sed, setkeycodes, sh, sleep, sort, stty, swapoff, swapon, sync, syslogd, tail, tar, tee, telnet, test, tftp, touch, tr, true, tty, umount, uname, uniq, unix2dos, update, uptime, usleep, uudecode, uuencode, watchdog, wc, wget, which, whoami, xargs, yes, zcat, [ adjtimex adjtimex [-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick] Reads and optionally sets system timebase parameters. See adjtimex(2). Options: -q quiet mode - do not print -o offset time offset, microseconds -f frequency frequency adjust, integer kernel units (65536 is 1ppm) (positive values make the system clock run fast) -t tick microseconds per tick, usually 10000 -p timeconstant ------------------------------- ar ar -[ov][ptx] ARCHIVE FILES Extract or list FILES from an ar archive. Options: -o preserve original dates -p extract to stdout -t list -x extract -v verbosely list files processed ------------------------------- basename basename FILE [SUFFIX] Strips directory path and suffixes from FILE. If specified, also removes any trailing SUFFIX. Example: $ basename /usr/local/bin/foo foo $ basename /usr/local/bin/ bin $ basename /foo/bar.txt .txt bar ------------------------------- cat cat [FILE]... Concatenates FILE(s) and prints them to stdout. Example: $ cat /proc/uptime 110716.72 17.67 ------------------------------- chgrp chgrp [OPTION]... GROUP FILE... Change the group membership of each FILE to GROUP. Options: -R Changes files and directories recursively. Example: $ ls -l /tmp/foo -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo $ chgrp root /tmp/foo $ ls -l /tmp/foo -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo ------------------------------- chmod chmod [-R] MODE[,MODE]... FILE... Each MODE is one or more of the letters ugoa, one of the symbols +-= and one or more of the letters rwxst. Options: -R Changes files and directories recursively. Example: $ ls -l /tmp/foo -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo $ chmod u+x /tmp/foo $ ls -l /tmp/foo -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo* $ chmod 444 /tmp/foo $ ls -l /tmp/foo -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo ------------------------------- chown chown [ -Rh ]... OWNER[<.|:>[GROUP]] FILE... Change the owner and/or group of each FILE to OWNER and/or GROUP. Options: -R Changes files and directories recursively. -h Do not dereference symbolic links. Example: $ ls -l /tmp/foo -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo $ chown root /tmp/foo $ ls -l /tmp/foo -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo $ chown root.root /tmp/foo ls -l /tmp/foo -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo ------------------------------- chroot chroot NEWROOT [COMMAND...] Run COMMAND with root directory set to NEWROOT. Example: $ ls -l /bin/ls lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox $ mount /dev/hdc1 /mnt -t minix $ chroot /mnt $ ls -l /bin/ls -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls* ------------------------------- chvt chvt N Changes the foreground virtual terminal to /dev/ttyN ------------------------------- clear clear Clear screen. ------------------------------- cmp cmp FILE1 [FILE2] -s quiet mode - do not print Compare files. ------------------------------- cp cp [OPTION]... SOURCE DEST Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. -a Same as -dpR -d Preserves links -p Preserves file attributes if possible -f force (implied; ignored) - always set -R Copies directories recursively ------------------------------- cpio cpio -[dimtuv][F cpiofile] Extract or list files from a cpio archive Main operation mode: d make leading directories i extract m preserve mtime t list u unconditional overwrite F input from file ------------------------------- cut cut [OPTION]... [FILE]... Prints selected fields from each input FILE to standard output. Options: -b LIST Output only bytes from LIST -c LIST Output only characters from LIST -d CHAR Use CHAR instead of tab as the field delimiter -s Output only the lines containing delimiter -f N Print only these fields -n Ignored Example: $ echo "Hello world" | cut -f 1 -d ' ' Hello $ echo "Hello world" | cut -f 2 -d ' ' world ------------------------------- date date [OPTION]... [+FORMAT] Displays the current time in the given FORMAT, or sets the system date. Options: -R Outputs RFC-822 compliant date string -d STRING display time described by STRING, not `now' -s Sets time described by STRING -u Prints or sets Coordinated Universal Time Example: $ date Wed Apr 12 18:52:41 MDT 2000 ------------------------------- dc dc expression ... This is a Tiny RPN calculator that understands the following operations: +, -, /, *, and, or, not, eor. i.e., 'dc 2 2 add' -> 4, and 'dc 8 8 \* 2 2 + /' -> 16 Example: $ dc 2 2 + 4 $ dc 8 8 * 2 2 + / 16 $ dc 0 1 and 0 $ dc 0 1 or 1 $ echo 72 9 div 8 mul | dc 64 ------------------------------- dd dd [if=FILE] [of=FILE] [bs=N] [count=N] [skip=N] [seek=N] [conv=notrunc|noerror|sync] Copy a file, converting and formatting according to options 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 count=N copy only N input blocks skip=N skip N input blocks seek=N skip N output blocks conv=notrunc don't truncate output file conv=noerror continue after read errors conv=sync pad blocks with zeros Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024), MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824). Example: $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4 4+0 records in 4+0 records out ------------------------------- deallocvt deallocvt N Deallocate unused virtual terminal /dev/ttyN ------------------------------- df df [-hmk] [FILESYSTEM ...] Print the filesystem space used and space available. Options: -h print sizes in human readable format (e.g., 1K 243M 2G ) -m print sizes in megabytes -k print sizes in kilobytes(default) Example:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -