⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 busybox.pod

📁 手机嵌入式Linux下可用的busybox源码
💻 POD
📖 第 1 页 / 共 3 页
字号:
# vi: set sw=4 ts=4:=head1 NAMEBusyBox - The Swiss Army Knife of Embedded Linux=head1 SYNTAX BusyBox <function> [arguments...]  # or <function> [arguments...]	    # if symlinked=head1 DESCRIPTIONBusyBox combines tiny versions of many common UNIX utilities into a singlesmall executable. It provides minimalist replacements for most of the utilitiesyou usually find in fileutils, shellutils, findutils, textutils, grep, gzip,tar, etc.  BusyBox provides a fairly complete POSIX environment for any smallor embedded system.  The utilities in BusyBox generally have fewer options thantheir full-featured GNU cousins; however, the options that are included providethe 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 (orfeatures) at compile time.  This makes it easy to customize your embeddedsystems.  To create a working system, just add a kernel, a shell (such as ash),and an editor (such as elvis-tiny or ae).=head1 USAGEWhen you create a link to BusyBox for the function you wish to use, when BusyBoxis called using that link it will behave as if the command itself has been invoked.For example, entering	ln -s ./BusyBox ls	./lswill cause BusyBox to behave as 'ls' (if the 'ls' command has been compiledinto BusyBox). You can also invoke BusyBox by issuing the command as an argument on thecommand line.  For example, entering	./BusyBox lswill also cause BusyBox to behave as 'ls'. =head1 COMMON OPTIONSMost BusyBox commands support the B<-h> option to provide aterse runtime description of their behavior. =head1 COMMANDSCurrently 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,[=over 4=item B<adjtimex>adjtimex [B<-q>] [B<-o> offset] [B<-f> frequency] [B<-p> timeconstant] [B<-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-------------------------------=item B<ar>ar -[ov][ptx] ARCHIVE FILESExtract 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-------------------------------=item B<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-------------------------------=item B<cat>cat [FILE]...Concatenates FILE(s) and prints them to stdout.Example:	$ cat /proc/uptime	110716.72 17.67-------------------------------=item B<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-------------------------------=item B<chmod>chmod [B<-R>] MODE[,MODE]... FILE...Each MODE is one or more of the letters ugoa, one of thesymbols +-= 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-------------------------------=item B<chown>chown [ B<-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-------------------------------=item B<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*-------------------------------=item B<chvt>chvt NChanges the foreground virtual terminal to /dev/ttyN-------------------------------=item B<clear>clear 	Clear screen.-------------------------------=item B<cmp>cmp FILE1 [FILE2]	-s	quiet mode - do not printCompare files.-------------------------------=item B<cp>cp [OPTION]... SOURCE DESTCopies 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-------------------------------=item B<cpio>cpio -[dimtuv][F cpiofile]Extract or list files from a cpio archiveMain operation mode:	d		make leading directories	i		extract	m		preserve mtime	t		list	u		unconditional overwrite		F		input from file	-------------------------------=item B<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		IgnoredExample:	$ echo "Hello world" | cut -f 1 -d ' '	Hello	$ echo "Hello world" | cut -f 2 -d ' '	world-------------------------------=item B<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 TimeExample:	$ date	Wed Apr 12 18:52:41 MDT 2000-------------------------------=item B<dc>dc expression ...This is a Tiny RPN calculator that understands thefollowing operations: +, -, /, *, and, or, not, eor.i.e., 'dc 2 2 add' -> 4, and 'dc 8 8 \* 2 2 + /' -> 16Example:	$ 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-------------------------------=item B<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 zerosNumbers 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-------------------------------=item B<deallocvt>deallocvt NDeallocate unused virtual terminal /dev/ttyN-------------------------------=item B<df>df [B<-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:	$ df	Filesystem           1k-blocks      Used Available Use% Mounted on	/dev/sda3              8690864   8553540    137324  98% /	/dev/sda1                64216     36364     27852  57% /boot	$ df /dev/sda3	Filesystem           1k-blocks      Used Available Use% Mounted on	/dev/sda3              8690864   8553540    137324  98% /-------------------------------=item B<dirname>dirname [FILENAME ...]Strips non-directory suffix from FILENAMEExample:	$ dirname /tmp/foo	/tmp	$ dirname /tmp/foo/	/tmp-------------------------------=item B<dmesg>dmesg [B<-c>] [B<-n> LEVEL] [B<-s> SIZE]Prints or controls the kernel ring bufferOptions:	-c		Clears the ring buffer's contents after printing	-n LEVEL	Sets console logging level	-s SIZE		Use a buffer of size SIZE-------------------------------=item B<dos2unix>dos2unix [option] [FILE]Converts FILE from dos format to unix format.  When no optionis given, the input is converted to the opposite output format.When no file is given, uses stdin for input and stdout for output.Options:	-u	output will be in UNIX format	-d	output will be in DOS format-------------------------------=item B<dpkg>dpkg B<-i> package_file[B<-CPru>] package_name	-i	Install the package	-C	Configure an unpackaged package	-P	Purge all files of a package	-r	Remove all but the configuration files for a package	-u	Unpack a package, but dont configure it-------------------------------=item B<dpkg_deb>dpkg_deb [B<-cefItxX>] FILE [argument]Perform actions on debian packages (.debs)Options:	-c	List contents of filesystem tree	-e	Extract control files to [argument] directory	-f	Display control field name starting with [argument]	-I	Display the control filenamed [argument]	-t	Extract filesystem tree to stdout in tar format	-x	Extract packages filesystem tree to directory	-X	Verbose extractExample:	$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp-------------------------------=item B<du>du [B<-lsxhmk>] [FILE]...Summarizes disk space used for each FILE and/or directory.Disk space is printed in units of 1024 bytes.Options:	-l	count sizes many times if hard linked	-s	display only a total for each argument	-h	print sizes in human readable format (e.g., 1K 243M 2G )	-m	print sizes in megabytes	-x	skip directories on different filesystems	-k	print sizes in kilobytes(default)Example:	$ du	16      ./CVS	12      ./kernel-patches/CVS	80      ./kernel-patches	12      ./tests/CVS	36      ./tests	12      ./scripts/CVS	16      ./scripts	12      ./docs/CVS	104     ./docs	2417    .

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -