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

📄 busybox.sgml

📁 手机嵌入式Linux下可用的busybox源码
💻 SGML
📖 第 1 页 / 共 5 页
字号:
	    <title>init</title>		<para>		Usage: init		</para>		<para>		Init is the parent of all processes.		</para>		<para>		This version of init is designed to be run only by the		kernel.		</para>		<para>		BusyBox init doesn't support multiple runlevels. The		runlevels field of the /etc/inittab file is completely		ignored by BusyBox init. If you want runlevels, use		sysvinit.		</para>		<para>		BusyBox init works just fine without an inittab. If no		inittab is found, it has the following default behavior:		</para>		<para>		<screen>			::sysinit:/etc/init.d/rcS			::askfirst:/bin/sh		</screen>		</para>		<para>		If it detects that /dev/console is _not_ a serial		console, it will also run:		</para>		<para>		<screen>			tty2::askfirst:/bin/sh		</screen>		</para>		<para>		If you choose to use an /etc/inittab file, the inittab		entry format is as follows:		</para>		<para>		<screen>			&lt;id&gt;:&lt;runlevels&gt;:&lt;action&gt;:&lt;process&gt;		</screen>		</para>		<sect2>		    <title>id</title>			<para>			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.			</para>		</sect2>		<sect2>		    <title>runlevels</title>			<para>                	The runlevels field is completely ignored.			</para>		</sect2>		<sect2>		    <title>action</title>			<para>			Valid actions include: sysinit, respawn, askfirst, wait, 			once, and ctrlaltdel.			</para>			<para>			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.			</para>			<para>			Run only-once actions:			</para>			<para>			'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 asyncronous,			therefore, init does not wait for them to complete.  'ctrlaltdel'			actions are run immediately before init causes the system to reboot			(unmounting filesystems with a 'ctrlaltdel' action is a very good			 idea).			</para>			<para>			Run repeatedly actions:			</para>			<para>			'respawn' actions are run after the 'once' actions.  When a process			started with a 'respawn' action exits, init automatically restarts			it.  Unlike sysvinit, BusyBox init does not stop processes from			respawning out of control.  The 'askfirst' actions acts just like			respawn, except that before running the specified process it			displays the line "Please press Enter to activate this console."			and then waits for the user to press enter before starting the			specified process.  			</para>			<para>			Unrecognized actions (like initdefault) will cause init to emit an			error message, and then go along with its business.  All actions are			run in the reverse order from how they appear in /etc/inittab.			</para>		</sect2>		<sect2>		    <title>process</title>			<para>                	Specifies the process to be executed and its			command line.			</para>		</sect2>		<sect2>		    <title>Example /etc/inittab file</title>		    <para>		    <screen>			    # This is run first except when booting in single-user mode.			    #			    ::sysinit:/etc/init.d/rcS			    # /bin/sh invocations on selected ttys			    #			    # Start an "askfirst" shell on the console (whatever that may be)			    ::askfirst:-/bin/sh			    # Start an "askfirst" shell on /dev/tty2-4			    tty2::askfirst:-/bin/sh			    tty2::askfirst:-/bin/sh			    tty2::askfirst:-/bin/sh			    # /sbin/getty invocations for selected ttys			    #			    tty4::respawn:/sbin/getty 38400 tty5			    tty5::respawn:/sbin/getty 38400 tty6			    # Example of how to put a getty on a serial line (for a terminal)			    #			    #::respawn:/sbin/getty -L ttyS0 9600 vt100			    #::respawn:/sbin/getty -L ttyS1 9600 vt100			    #			    # Example how to put a getty on a modem line.			    #::respawn:/sbin/getty 57600 ttyS2			    # Stuff to do before rebooting			    ::ctrlaltdel:/bin/umount -a -r			    ::ctrlaltdel:/sbin/swapoff		    </screen>		    </para>		</sect2>	</sect1>	<sect1 id="insmod">	    <title>insmod</title>		<para>		Usage: insmod [OPTION]... MODULE [symbol=value]...		</para>		<para>		Load MODULE into the kernel.		</para>		<para>		Options:		</para>		<para>		<screen>			-f	Force module to load into the wrong kernel version.			-k	Make module autoclean-able.			-v	Verbose output			-x	Do not export externs			-L	Prevent simultaneous loads of the same module		</screen>		</para>	</sect1>	<sect1 id="kill">	    <title>kill</title>		<para>		Usage: kill [OPTION] PID...		</para>		<para>		Send a signal (default is SIGTERM) to the specified		PID(s).		</para>		<para>		Options:		</para>		<para>		<screen>			-l	List all signal names and numbers			-SIG	Send signal SIG		</screen>		</para>		<para>		Example:		</para>		<para>		<screen>			$ ps | grep apache			252 root     root     S [apache]			263 www-data www-data S [apache]			264 www-data www-data S [apache]			265 www-data www-data S [apache]			266 www-data www-data S [apache]			267 www-data www-data S [apache]			$ kill 252		</screen>		</para>	</sect1>	<sect1 id="killall">	    <title>killall</title>		<para>		Usage: killall [OPTION] NAME...		</para>		<para>		Send a signal (default is SIGTERM) to the specified		NAME(s).		</para>		<para>		Options:		</para>		<para>		<screen>			-l	List all signal names and numbers			-SIG	Send signal SIG		</screen>		</para>		<para>		Example:		</para>		<para>		<screen>			$ killall apache		</screen>		</para>	</sect1>	<sect1 id="length">	    <title>length</title>		<para>		Usage: length STRING		</para>		<para>		Print the length of STRING.		</para>		<para>		Example:		</para>		<para>		<screen>			$ length "Hello"			5		</screen>		</para>	</sect1>	<sect1 id="ln">	    <title>ln</title>		<para>		Usage: ln [OPTION]... TARGET FILE|DIRECTORY		</para>		<para>		Create a link named FILE or DIRECTORY to the specified		TARGET.  You may use '--' to indicate that all following		arguments are non-options.		</para>		<para>		Options:		</para>		<para>		<screen>			-s	Make symbolic link instead of hard link			-f	Remove existing destination file		</screen>		</para>		<para>		Example:		</para>		<para>		<screen>			$ ln -s BusyBox /tmp/ls			$ ls -l /tmp/ls			lrwxrwxrwx    1 root     root            7 Apr 12 18:39 ls -&gt; BusyBox*		</screen>		</para>	</sect1>	<sect1 id="loadacm">	    <title>loadacm</title>		<para>		Usage: loadacm		</para>		<para>		Load an acm from stdin.		</para>		<para>		Example:		</para>		<para>		<screen>			$ loadacm &lt; /etc/i18n/acmname		</screen>		</para>	</sect1>	<sect1 id="loadfont">	    <title>loadfont</title>		<para>		Usage: loadfont		</para>		<para>		Load a console font from stdin.		</para>		<para>		Example:		</para>		<para>		<screen>			$ loadfont &lt; /etc/i18n/fontname		</screen>		</para>	</sect1>	<sect1 id="loadkmap">	    <title>loadkmap</title>		<para>		Usage: loadkmap		</para>		<para>		Load a binary keyboard translation table from stdin.		</para>		<para>		Example:		</para>		<para>		<screen>			$ loadkmap &lt; /etc/i18n/lang-keymap		</screen>		</para>	</sect1>	<sect1 id="logger">	    <title>logger</title>		<para>		Usage: logger [OPTION]... [MESSAGE]		</para>		<para>		Write MESSAGE to the system log.  If MESSAGE is omitted, log		stdin.		</para>		<para>		Options:		</para>		<para>		<screen>			-s	Log to stderr as well as the system log			-t	Log using the specified tag (defaults to user name)			-p	Enter the message with the specified priority				This may be numerical or a ``facility.level'' pair		</screen>		</para>		<para>		Example:		</para>		<para>		<screen>			$ logger "hello"		</screen>		</para>	</sect1>	<sect1 id="logname">	    <title>logname</title>		<para>		Usage: logname		</para>		<para>		Print the name of the current user.		</para>		<para>		Example:		</para>		<para>		<screen>			$ logname			root		</screen>		</para>	</sect1>	<sect1 id="ls">	    <title>ls</title>		<para>		Usage: ls [OPTION]... [FILE]...		</para>		<para>				</para>		<para>		Options:		</para>		<para>		<screen>			-a	Do not hide entries starting with .			-c	With  -l:  show ctime (the time of last				modification of file status information)			-d	List directory entries instead of contents			-e	List both full date and full time			-l	Use a long listing format			-n	List numeric UIDs and GIDs instead of names			-p	Append indicator (one of /=@|) to entries			-u	With -l: show access time (the time of last				access of the file)			-x	List entries by lines instead of by columns			-A	Do not list implied . and ..			-C	List entries by columns			-F	Append indicator (one of */=@|) to entries			-L	list entries pointed to by symbolic links			-R	List subdirectories recursively		</screen>		</para>		<para>		Example:		</para>		<para>		<screen>		</screen>		</para>	</sect1>	<sect1 id="lsmod">	    <title>lsmod</title>		<para>		Usage: lsmod		</para>		<para>		List currently loaded kernel modules.		</para>	</sect1>	<sect1 id="makedevs">	    <title>makedevs</title>		<para>		Usage: makedevsf NAME TYPE MAJOR MINOR FIRST LAST [s]		</para>		<para>		Create a range of block or character special files.		</para>		<para>		TYPE may be:		</para>		<para>		<screen>			b	Make a block (buffered) device			c or u	Make a character (un-buffered) device			p	Make a named pipe. MAJOR and MINOR are ignored for named pipes		</screen>		</para>		<para>		FIRST specifies the number appended to NAME to create		the first device.  LAST specifies the number of the last		item that should be created. If 's' is the last		argument, the base device is created as well.		</para>		<para>		Example:		</para>		<para>		<screen>			$ makedevs /dev/ttyS c 4 66 2 63			[creates ttyS2-ttyS63]			$ makedevs /dev/hda b 3 0 0 8 s			[creates hda,hda1-hda8]		</screen>		</para>	</sect1>	<sect1 id="md5sum">	    <title>md5sum</title>		<para>		Usage: md5sum [OPTION]... FILE...		</para>		<para>		Print or check MD5 checksums.		</para>		<para>		Options:		</para>		<para>		<screen>			-b	Read files in binary mode			-c	Check MD5 sums against given list			-t	Read files in text mode (default)			-g	Read a string		</screen>		</para>		<para>		The following two options are useful only when verifying		checksums:		</para>		<para>		<screen>			-s	Don't output anything, status code shows success			-w	Warn about improperly formated MD5 checksum lines		</screen>		</para>		<para>		Example:		</para>		<para>		<screen>			$ md5sum busybox			6fd11e98b98a58f64ff3398d7b324003  busybox			$ md5sum -c			6fd11e98b98a58f64ff3398d7b324003  busybox			6fd11e98b98a58f64ff3398d7b324002  busybox			md5sum: MD5 check failed for 'busybox'			^D		</screen>		</para>	</sect1>	<sect1 id="mkdir">	    <title>mkdir</title>		<para>		Usage: mkdir [OPTION]... DIRECTORY...		</para>		<para>		Create the DIRECTORY(s), if they do not already exist.		</para>		<para>		Options:		</para>		<para>		<screen>			-m	Set permission mode (as in chmod), not rwxrwxrwx - umask			-p	No error if directory exists, make parent directories as needed		</screen>		</para>		<para>		Example:		</para>		<para>		<screen>			$ mkdir /tmp/foo			$ mkdir /tmp/foo			/tmp/foo: File exists			$ mkdir /tmp/foo/bar/baz			/tmp/foo/bar/baz: No such file or directory			$ mkdir -p /tmp/foo/bar/baz		</screen>		</para>	</sect1>	<sect1 id="mkfifo">	    <title>mkfifo</title>		<para>		Usage: mkfifo [OPTION] NAME		</para>		<para>		Create a named pipe (identical to 'mknod NAME p').		</para>		<para>		Options:		</para>		<para>		<screen>			-m MODE	Create the pipe using the specified mode (default a=rw)		</screen>		</para>	</sect1>	<sect1 id="mkfs.minix">	    <title>mkfs.minix</title>		<para>		Usage: mkfs.minix [OPTION]... NAME [BLOCKS]		</para>		<para>		Make a MINIX filesystem.		</para>		<para>		Options:		</para>		<para>		<screen>			-c		Check the device for bad blocks			-n [14|30]	Specify the maximum length of filenames			-i		Specify the number of inodes for the filesystem			-l FILENAME	Read the bad blocks list from FILENAME			-v		Make a Minix version 2 filesystem		</screen>		</para>	</sect1>	<sect1 id="mknod">	    <title>mknod</title>		<para>		Usage: mknod [OPTION]... NAME TYPE MAJOR MINOR		</para>		<para>		Create a special file (block, character, or pipe).		</para>		<para>		Options:		</para>		<para>		<screen>			-m	Create the special file using the specified mode (default a=rw)		</screen>		</para>		<para>		TYPE may be:		</para>		<para>		<screen>			b	Make a block (buffered) device			c or u	Make a character (un-buffered) device			p	Make a named pipe. MAJOR and MINOR are ignored for named pipes		</screen>		</para>		<para>		Example:		</para>

⌨️ 快捷键说明

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