busybox就是一个工具箱,它集成压缩了很多的linux命令和工具,也包含了Android系统的自带shell;
在需要时打开工具箱取相应的工具使用即可。
sh-# busybox
BusyBox v1.15.3 (2012-03-28 19:45:58 CST) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!
Currently defined functions:
[, [[, addgroup, adduser, ar, arp, arping, ash, awk,
basename, blkid, bunzip2, bzcat, bzip2, cal, cat, chattr, chmod,
chown, chpasswd, chrt, chvt, cksum, clear, cp, cpio,
date, dc, dd, delgroup, deluser, depmod, devmem, df,
dirname, dmesg, dnsdomainname, dos2unix, du, dumpkmap, echo, egrep,
eject, env, expand, expr, fakeidentd, false,
fdformat, fdisk, fgrep, find, findfs, fsck,
fsck.minix, fsync, getopt, getty, grep, gunzip, gzip, halt, head,
hexdump, hostid, hostname, hush, hwclock, id, ifconfig, ifdown,
ifenslave, ifplugd, ifup, inetd, insmod, install, ionice, ip, ipaddr,
ipcrm, ipcs, iplink, iproute, kbd_mode, kill, killall, last,
length, linux32, linux64, ln, login, logname,
losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lzop,
makedevs, md5sum, mdev, mesg, mkdir, mkdosfs, mkfifo,
mkfs.minix, mkfs.vfat, mknod, mkswap, modprobe, more, mount,
mountpoint, msh, mt, mv, netstat, nice, nohup, nslookup, openvt,
passwd, ping, pkill, poweroff, printenv, ps, pwd,
raidautorun, rdate, rdev, readahead, readlink, readprofile, reboot,
reset, resize, rm, rmmod, route, rtcwake, runlevel, script,
scriptreplay, sed, setarch, setconsole,
setsid, sh, sleep, sort, stat, strings, stty, su,
sulogin, sum, swapoff, swapon, sync, sysctl, tac, tail,
tar, test, time, timeout, top, touch, true, tty,
ttysize, udhcpc, umount, uname, uncompress, unix2dos,
unzip, uptime, vi, watch, which, xargs
sh-#
linux系统自带了很多工具放在/bin、/sbin等目录下。
而busybox将许多具有共性的linux工具整合到了一个单一的可执行文件中,
这样它就可以替代大部分常用工具比如GNU fileutils、shellutils等。
正因为busybox提供了一个比较完善的工具环境,使得整合后的工具箱占用磁盘空间变小了,
所以它适合那些flash、EEPROM等资源有限的嵌入式系统。