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

📄 busybox.pod

📁 手机嵌入式Linux下可用的busybox源码
💻 POD
📖 第 1 页 / 共 3 页
字号:
-------------------------------=item B<dumpkmap>dumpkmap > keymapPrints out a binary keyboard translation table to standard output.Example:	$ dumpkmap > keymap-------------------------------=item B<dutmp>dutmp [FILE]Dump utmp file format (pipe delimited) from FILEor stdin to stdout.  (i.e., 'dutmp /var/run/utmp')Example:	$ dutmp /var/run/utmp	8|7||si|||0|0|0|955637625|760097|0	2|0|~|~~|reboot||0|0|0|955637625|782235|0	1|20020|~|~~|runlevel||0|0|0|955637625|800089|0	8|125||l4|||0|0|0|955637629|998367|0	6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0	6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0	7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0-------------------------------=item B<echo>echo [B<-neE>] [ARG ...]Prints the specified ARGs to stdoutOptions:	-n	suppress trailing newline	-e	interpret backslash-escaped characters (i.e., \t=tab)	-E	disable interpretation of backslash-escaped charactersExample:	$ echo "Erik is cool"	Erik is cool	$  echo -e "Erik\nis\ncool"	Erik	is	cool	$ echo "Erik\nis\ncool"	Erik\nis\ncool-------------------------------=item B<env>env [B<-iu>] [-] [name=value]... [command]Prints the current environment or runs a program after settingup the specified environment.Options:	-, -i	start with an empty environment	-u	remove variable from the environment-------------------------------=item B<expr>expr EXPRESSIONPrints the value of EXPRESSION to standard output.EXPRESSION may be:	ARG1 |  ARG2	ARG1 if it is neither null nor 0, otherwise ARG2	ARG1 &  ARG2	ARG1 if neither argument is null or 0, otherwise 0	ARG1 <  ARG2	ARG1 is less than ARG2	ARG1 <= ARG2	ARG1 is less than or equal to ARG2	ARG1 =  ARG2	ARG1 is equal to ARG2	ARG1 != ARG2	ARG1 is unequal to ARG2	ARG1 >= ARG2	ARG1 is greater than or equal to ARG2	ARG1 >  ARG2	ARG1 is greater than ARG2	ARG1 +  ARG2	arithmetic sum of ARG1 and ARG2	ARG1 -  ARG2	arithmetic difference of ARG1 and ARG2	ARG1 *  ARG2	arithmetic product of ARG1 and ARG2	ARG1 /  ARG2	arithmetic quotient of ARG1 divided by ARG2	ARG1 %  ARG2	arithmetic remainder of ARG1 divided by ARG2	STRING : REGEXP             anchored pattern match of REGEXP in STRING	match STRING REGEXP         same as STRING : REGEXP	substr STRING POS LENGTH    substring of STRING, POS counted from 1	index STRING CHARS          index in STRING where any CHARS is found,	                            or 0	length STRING               length of STRING	quote TOKEN                 interpret TOKEN as a string, even if	                            it is a keyword like `match' or an	                            operator like `/'	( EXPRESSION )              value of EXPRESSIONBeware that many operators need to be escaped or quoted for shells.Comparisons are arithmetic if both ARGs are numbers, elselexicographical.  Pattern matches return the string matched between \( and \) or null; if \( and \) are not used, they return the number of characters matched or 0.-------------------------------=item B<false>false 	Return an exit code of FALSE (1).Example:	$ false	$ echo $?	1-------------------------------=item B<fbset>fbset [options] [mode]Show and modify frame buffer settingsExample:	$ fbset	mode "1024x768-76"		# D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz		geometry 1024 768 1024 768 16		timings 12714 128 32 16 4 128 4		accel false		rgba 5/11,6/5,5/0,0/0	endmode-------------------------------=item B<fdflush>fdflush DEVICEForces floppy disk drive to detect disk change-------------------------------=item B<find>find [PATH...] [EXPRESSION]Search for files in a directory hierarchy.  The default PATH isthe current directory; default EXPRESSION is 'B<-print>'EXPRESSION may consist of:	-follow		Dereference symbolic links.	-name PATTERN	File name (leading directories removed) matches PATTERN.	-print		Print (default and assumed).	-type X		Filetype matches X (where X is one of: f,d,l,b,c,...)	-perm PERMS	Permissions match any of (+NNN); all of (-NNN);			or exactly (NNN)	-mtime TIME	Modified time is greater than (+N); less than (-N);			or exactly (N) days	-newer FILE	Modified time is more recent than FILE'sExample:	$ find / -name /etc/passwd	/etc/passwd-------------------------------=item B<free>free 	Displays the amount of free and used system memoryExample:	$ free	              total         used         free       shared      buffers	  Mem:       257628       248724         8904        59644        93124	 Swap:       128516         8404       120112	Total:       386144       257128       129016-------------------------------=item B<freeramdisk>freeramdisk DEVICEFrees all memory used by the specified ramdisk.Example:	$ freeramdisk /dev/ram2-------------------------------=item B<fsck_minix>fsck_minix [B<-larvsmf>] /dev/namePerforms a consistency check for MINIX filesystems.Options:	-l	Lists all filenames	-r	Perform interactive repairs	-a	Perform automatic repairs	-v	verbose	-s	Outputs super-block information	-m	Activates MINIX-like "mode not cleared" warnings	-f	Force file system check.-------------------------------=item B<getopt>getopt [OPTIONS]...Parse command options	-a, --alternative		Allow long options starting with single -	-l, --longoptions=longopts	Long options to be recognized	-n, --name=progname		The name under which errors are reported	-o, --options=optstring	Short options to be recognized	-q, --quiet			Disable error reporting by getopt(3)	-Q, --quiet-output		No normal output	-s, --shell=shell		Set shell quoting conventions	-T, --test			Test for getopt(1) version	-u, --unqote			Do not quote the outputExample:	$ cat getopt.test	#!/bin/sh	GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \	       -n 'example.busybox' -- "$@"`	if [ $? != 0 ] ; then  exit 1 ; fi	eval set -- "$GETOPT"	while true ; do	 case $1 in	   -a|--a-long) echo "Option a" ; shift ;;	   -b|--b-long) echo "Option b, argument `$2'" ; shift 2 ;;	   -c|--c-long)	     case "$2" in	       "") echo "Option c, no argument"; shift 2 ;;	       *)  echo "Option c, argument `$2'" ; shift 2 ;;	     esac ;;	   --) shift ; break ;;	   *) echo "Internal error!" ; exit 1 ;;	 esac	done-------------------------------=item B<grep>grep [B<-ihHnqvs>] PATTERN [FILEs...]Search for PATTERN in each FILE or standard input.Options:	-H	prefix output lines with filename where match was found	-h	suppress the prefixing filename on output	-i	ignore case distinctions	-l	list names of files that match	-n	print line number with output lines	-q	be quiet. Returns 0 if result was found, 1 otherwise	-v	select non-matching lines	-s	suppress file open/read error messagesExample:	$ grep root /etc/passwd	root:x:0:0:root:/root:/bin/bash	$ grep ^[rR]oo. /etc/passwd	root:x:0:0:root:/root:/bin/bash-------------------------------=item B<gunzip>gunzip [OPTION]... FILEUncompress FILE (or standard input if FILE is '-').Options:	-c	Write output to standard output	-t	Test compressed file integrityExample:	$ ls -la /tmp/BusyBox*	-rw-rw-r--    1 andersen andersen   557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz	$ gunzip /tmp/BusyBox-0.43.tar.gz	$ ls -la /tmp/BusyBox*	-rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar-------------------------------=item B<gzip>gzip [OPTION]... FILECompress FILE with maximum compression.When FILE is '-', reads standard input.  Implies B<-c>.Options:	-c	Write output to standard output instead of FILE.gz	-d	decompressExample:	$ ls -la /tmp/busybox*	-rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/busybox.tar	$ gzip /tmp/busybox.tar	$ ls -la /tmp/busybox*	-rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/busybox.tar.gz-------------------------------=item B<halt>halt 	Halt the system.-------------------------------=item B<head>head [OPTION] [FILE]...Print first 10 lines of each FILE to standard output.With more than one FILE, precede each with a header giving thefile name. With no FILE, or when FILE is -, read standard input.Options:	-n NUM		Print first NUM lines instead of first 10Example:	$ head -n 2 /etc/passwd	root:x:0:0:root:/root:/bin/bash	daemon:x:1:1:daemon:/usr/sbin:/bin/sh-------------------------------=item B<hostid>hostid 	Print out a unique 32-bit identifier for the machine.-------------------------------=item B<hostname>hostname [OPTION] {hostname | B<-F> FILE}Get or set the hostname or DNS domain name. If a hostname is given(or FILE with the B<-F> parameter), the host name will be set.Options:	-s		Short	-i		Addresses for the hostname	-d		DNS domain name	-F, --file FILE	Use the contents of FILE to specify the hostnameExample:	$ hostname	sage -------------------------------=item B<id>id [OPTIONS]... [USERNAME]Print information for USERNAME or the current userOptions:	-g	prints only the group ID	-u	prints only the user ID	-n	print a name instead of a number (with for -ug)	-r	prints the real user ID instead of the effective ID (with -ug)Example:	$ id	uid=1000(andersen) gid=1000(andersen)-------------------------------=item B<ifconfig>ifconfig [B<-a>] <interface> [<address>]configure a network interfaceOptions:	[[-]broadcast [<address>]]  [[-]pointopoint [<address>]]	[netmask <address>]  [dstaddr <address>]	[outfill <NN>] [keepalive <NN>]	[hw ether <address>]  [metric <NN>]  [mtu <NN>]	[[-]trailers]  [[-]arp]  [[-]allmulti]	[multicast]  [[-]promisc]  [txqueuelen <NN>]  [[-]dynamic]	[mem_start <NN>]  [io_addr <NN>]  [irq <NN>]	[up|down] ...-------------------------------=item B<init>init 	Init is the parent of all processes.This version of init is designed to be run only by the kernel.BusyBox init doesn't support multiple runlevels.  The runlevels field ofthe /etc/inittab file is completely ignored by BusyBox init. If you want runlevels, use sysvinit.BusyBox init works just fine without an inittab.  If no inittab is found, it has the following default behavior:	::sysinit:/etc/init.d/rcS	::askfirst:/bin/sh	::ctrlaltdel:/sbin/reboot	::shutdown:/sbin/swapoff -a	::shutdown:/bin/umount -a -r	::restart:/sbin/initif it detects that /dev/console is _not_ a serial console, it will also run:	tty2::askfirst:/bin/sh	tty3::askfirst:/bin/sh	tty4::askfirst:/bin/shIf you choose to use an /etc/inittab file, the inittab entry format is as follows:	<id>:<runlevels>:<action>:<process>	<id>: 		WARNING: This field has a non-traditional meaning for BusyBox init!		The id field is used by BusyBox init to specify the controlling tty for		the specified process to run on.  The contents of this field are		appended to "/dev/" and used as-is.  There is no need for this field to		be unique, although if it isn't you may have strange results.  If this		field is left blank, the controlling tty is set to the console.  Also		note that if BusyBox detects that a serial console is in use, then only		entries whose controlling tty is either the serial console or /dev/null		will be run.  BusyBox init does nothing with utmp.  We don't need no		stinkin' utmp.	<runlevels>: 		The runlevels field is completely ignored.	<action>: 		Valid actions include: sysinit, respawn, askfirst, wait, 		once, restart, ctrlaltdel, and shutdown.		The available actions can be classified into two groups: actions		that are run only once, and actions that are re-run when the specified		process exits.		Run only-once actions:			'sysinit' is the first item run on boot.  init waits until all			sysinit actions are completed before continuing.  Following the			completion of all sysinit actions, all 'wait' actions are run.			'wait' actions, like  'sysinit' actions, cause init to wait until			the specified task completes.  'once' actions are asynchronous,			therefore, init does not wait for them to complete.  'restart' is			the action taken to restart the init process.  By default this should			simply run /sbin/init, but can be a script which runs pivot_root or it			can do all sorts of other interesting things.  The 'ctrlaltdel' init			actions are run when the system detects that someone on the system                       console has pressed the CTRL-ALT-DEL key combination.  Typically one                       wants to run 'reboot' at this point to cause the system to reboot.			Finally the 'shutdown' action specifies the actions to taken when                       init is told to reboot.  Unmounting filesystems and disabling swap                       is a very good here		Run repeatedly actions:			'respawn' actions are run after the 'once' actions.  When a process			started with a 'respawn' action exits, init automatically restarts

⌨️ 快捷键说明

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