blob: 8283e4717e7b484b255d4950e32cb2fcf88f54ad [file] [log] [blame]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001# vi: set sw=4 ts=4:
John Beppu08e7f752000-04-13 03:22:20 +00002
John Beppu3a1b6be2000-01-18 15:45:59 +00003=head1 NAME
4
Erik Andersencf8d38a2000-04-21 01:23:36 +00005BusyBox - The Swiss Army Knife of Embedded Linux
John Beppu3a1b6be2000-01-18 15:45:59 +00006
Erik Andersencf8d38a2000-04-21 01:23:36 +00007=head1 SYNTAX
John Beppu3a1b6be2000-01-18 15:45:59 +00008
Erik Andersencf8d38a2000-04-21 01:23:36 +00009 BusyBox <function> [arguments...] # or
John Beppu46a4e762000-01-18 22:33:11 +000010
11 <function> [arguments...] # if symlinked
John Beppu3a1b6be2000-01-18 15:45:59 +000012
13=head1 DESCRIPTION
14
Erik Andersencf8d38a2000-04-21 01:23:36 +000015BusyBox combines tiny versions of many common UNIX utilities into a single
16small executable. It provides minimalist replacements for most of the utilities
17you usually find in fileutils, shellutils, findutils, textutils, grep, gzip,
18tar, etc. BusyBox provides a fairly complete POSIX environment for any small
Eric Andersen98cd53e2000-06-16 19:56:44 +000019or embedded system. The utilities in BusyBox generally have fewer options than
Eric Andersenf2fffef2000-06-05 17:23:06 +000020their full-featured GNU cousins; however, the options that are included provide
Pavel Roskin1a804e42000-06-21 21:38:00 +000021the expected functionality and behave very much like their GNU counterparts.
Erik Andersen62dc17a2000-04-13 01:18:23 +000022
Erik Andersencf8d38a2000-04-21 01:23:36 +000023BusyBox has been written with size-optimization and limited resources in mind.
24It is also extremely modular so you can easily include or exclude commands (or
25features) at compile time. This makes it easy to customize your embedded
26systems. To create a working system, just add a kernel, a shell (such as ash),
27and an editor (such as elvis-tiny or ae).
28
29=head1 USAGE
30
31When you create a link to BusyBox for the function you wish to use, when BusyBox
32is called using that link it will behave as if the command itself has been invoked.
33
34For example, entering
35
36 ln -s ./BusyBox ls
Erik Andersen62dc17a2000-04-13 01:18:23 +000037 ./ls
38
39will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
Pavel Roskin1a804e42000-06-21 21:38:00 +000040into BusyBox).
Erik Andersen62dc17a2000-04-13 01:18:23 +000041
Erik Andersencf8d38a2000-04-21 01:23:36 +000042You can also invoke BusyBox by issuing the command as an argument on the
43command line. For example, entering
44
45 ./BusyBox ls
Erik Andersen62dc17a2000-04-13 01:18:23 +000046
47will also cause BusyBox to behave as 'ls'.
John Beppu08fe43d2000-01-19 12:39:16 +000048
Erik Anderseneef65802000-04-19 05:12:02 +000049=head1 COMMON OPTIONS
50
51Most BusyBox commands support the B<--help> option to provide a
52terse runtime description of their behavior.
53
John Beppu46a4e762000-01-18 22:33:11 +000054=head1 COMMANDS
55
Erik Andersen62dc17a2000-04-13 01:18:23 +000056Currently defined functions include:
57
Eric Andersen0d3a02e2001-03-15 18:14:25 +000058ar, basename, busybox, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp, cp,
59cut, date, dc, dd, deallocvt, df, dirname, dmesg, dos2unix, dpkg, dpkg-deb, du,
60dumpkmap, dutmp, echo, expr, false, fbset, fdflush, find, free, freeramdisk,
61fsck.minix, getopt, grep, gunzip, gzip, halt, head, hostid, hostname, id,
62ifconfig, init, insmod, kill, killall, klogd, length, ln, loadacm, loadfont,
63loadkmap, logger, logname, ls, lsmod, makedevs, md5sum, mkdir, mkfifo,
64mkfs.minix, mknod, mkswap, mktemp, more, mount, mt, mv, nc, nslookup, ping,
65pivot_root, poweroff, printf, ps, pwd, rdate, readlink, reboot, renice, reset,
66rm, rmdir, rmmod, route, rpmunpack, sed, setkeycodes, sh, sleep, sort, stty,
67swapoff, swapon, sync, syslogd, tail, tar, tee, telnet, test, tftp, touch, tr,
68true, tty, umount, uname, uniq, unix2dos, update, uptime, usleep, uudecode,
69uuencode, watchdog, wc, wget, which, whoami, xargs, yes, zcat, [
Erik Andersen62dc17a2000-04-13 01:18:23 +000070
John Beppu46a4e762000-01-18 22:33:11 +000071=over 4
72
John Beppu5bca0af2001-04-05 19:41:23 +000073=item B<adjtimex>
74
75adjtimex [B<-q>] [B<-o> offset] [B<-f> frequency] [B<-p> timeconstant] [B<-t> tick]
76
77Reads and optionally sets system timebase parameters.
78See adjtimex(2).
79
80Options:
81
82 -q quiet mode - do not print
83 -o offset time offset, microseconds
84 -f frequency frequency adjust, integer kernel units (65536 is 1ppm)
85 (positive values make the system clock run fast)
86 -t tick microseconds per tick, usually 10000
87 -p timeconstant
88
89-------------------------------
90
91=item B<ar>
Eric Andersen0d3a02e2001-03-15 18:14:25 +000092
93ar -[ovR]{ptx} archive filenames
Eric Andersen86ab8a32000-06-02 03:21:42 +000094
95Extract or list files from an ar archive.
96
97Options:
98
Eric Andersen0d3a02e2001-03-15 18:14:25 +000099 -o preserve original dates
100 -p extract to stdout
101 -t list
102 -x extract
103 -v verbosely list files processed
104 -R recursive action
Eric Andersen86ab8a32000-06-02 03:21:42 +0000105
106-------------------------------
107
John Beppu5bca0af2001-04-05 19:41:23 +0000108=item B<basename>
Erik Andersen62dc17a2000-04-13 01:18:23 +0000109
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000110basename FILE [SUFFIX]
Erik Andersen62dc17a2000-04-13 01:18:23 +0000111
Erik Andersenac130e12000-05-10 05:00:31 +0000112Strips directory path and suffixes from FILE.
113If specified, also removes any trailing SUFFIX.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000114
Pavel Roskin1a804e42000-06-21 21:38:00 +0000115Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000116
John Beppue708cb52001-03-15 21:08:01 +0000117 $ basename /usr/local/bin/foo
118 foo
119 $ basename /usr/local/bin/
120 bin
121 $ basename /foo/bar.txt .txt
122 bar
Erik Andersen62dc17a2000-04-13 01:18:23 +0000123
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000124-------------------------------
125
John Beppu5bca0af2001-04-05 19:41:23 +0000126=item B<cat>
John Beppu46a4e762000-01-18 22:33:11 +0000127
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000128cat [FILE]...
Erik Andersen62dc17a2000-04-13 01:18:23 +0000129
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000130Concatenates FILE(s) and prints them to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000131
132Example:
133
John Beppue708cb52001-03-15 21:08:01 +0000134 $ cat /proc/uptime
135 110716.72 17.67
John Beppu4581b4c2000-01-19 15:04:41 +0000136
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000137-------------------------------
138
John Beppu5bca0af2001-04-05 19:41:23 +0000139=item B<chgrp>
Erik Andersen5e1189e2000-04-15 16:34:54 +0000140
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000141chgrp [OPTION]... GROUP FILE...
Erik Andersen5e1189e2000-04-15 16:34:54 +0000142
143Change the group membership of each FILE to GROUP.
Erik Andersen26702fe2000-04-17 16:44:46 +0000144
Erik Andersen5e1189e2000-04-15 16:34:54 +0000145Options:
146
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000147 -R Changes files and directories recursively.
Erik Andersen26702fe2000-04-17 16:44:46 +0000148
Erik Andersen5e1189e2000-04-15 16:34:54 +0000149Example:
150
John Beppue708cb52001-03-15 21:08:01 +0000151 $ ls -l /tmp/foo
152 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
153 $ chgrp root /tmp/foo
154 $ ls -l /tmp/foo
155 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
Erik Andersen5e1189e2000-04-15 16:34:54 +0000156
157-------------------------------
158
John Beppu5bca0af2001-04-05 19:41:23 +0000159=item B<chmod>
John Beppu46a4e762000-01-18 22:33:11 +0000160
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000161chmod [B<-R>] MODE[,MODE]... FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000162
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000163Each MODE is one or more of the letters ugoa, one of the
164symbols +-= and one or more of the letters rwxst.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000165
John Beppu4581b4c2000-01-19 15:04:41 +0000166Options:
167
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000168 -R Changes files and directories recursively.
Pavel Roskin1a804e42000-06-21 21:38:00 +0000169
Erik Andersen62dc17a2000-04-13 01:18:23 +0000170Example:
171
John Beppue708cb52001-03-15 21:08:01 +0000172 $ ls -l /tmp/foo
173 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
174 $ chmod u+x /tmp/foo
175 $ ls -l /tmp/foo
176 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
177 $ chmod 444 /tmp/foo
178 $ ls -l /tmp/foo
179 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000180
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000181-------------------------------
182
John Beppu5bca0af2001-04-05 19:41:23 +0000183=item B<chown>
John Beppu46a4e762000-01-18 22:33:11 +0000184
John Beppu5bca0af2001-04-05 19:41:23 +0000185chown [OPTION]... OWNER[<.|:>[GROUP]] FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000186
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000187Change the owner and/or group of each FILE to OWNER and/or GROUP.
John Beppu5a50def2000-04-17 17:46:46 +0000188
John Beppu4581b4c2000-01-19 15:04:41 +0000189Options:
190
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000191 -R Changes files and directories recursively.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000192
193Example:
194
John Beppue708cb52001-03-15 21:08:01 +0000195 $ ls -l /tmp/foo
196 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
197 $ chown root /tmp/foo
198 $ ls -l /tmp/foo
199 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
200 $ chown root.root /tmp/foo
201 ls -l /tmp/foo
202 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000203
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000204-------------------------------
205
John Beppu5bca0af2001-04-05 19:41:23 +0000206=item B<chroot>
John Beppu46a4e762000-01-18 22:33:11 +0000207
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000208chroot NEWROOT [COMMAND...]
John Beppu4581b4c2000-01-19 15:04:41 +0000209
210Run COMMAND with root directory set to NEWROOT.
Pavel Roskin1a804e42000-06-21 21:38:00 +0000211
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000212Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000213
John Beppue708cb52001-03-15 21:08:01 +0000214 $ ls -l /bin/ls
215 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox
216 $ mount /dev/hdc1 /mnt -t minix
217 $ chroot /mnt
218 $ ls -l /bin/ls
219 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
John Beppu4581b4c2000-01-19 15:04:41 +0000220
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000221-------------------------------
222
John Beppu5bca0af2001-04-05 19:41:23 +0000223=item B<chvt>
John Beppu46a4e762000-01-18 22:33:11 +0000224
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000225chvt N
John Beppu4581b4c2000-01-19 15:04:41 +0000226
Erik Andersencf8d38a2000-04-21 01:23:36 +0000227Changes the foreground virtual terminal to /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000228
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000229-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000230
John Beppu5bca0af2001-04-05 19:41:23 +0000231=item B<clear>
Eric Andersen028fb622000-07-04 20:07:13 +0000232
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000233clear
234
235Clear screen.
Eric Andersen028fb622000-07-04 20:07:13 +0000236
237-------------------------------
238
John Beppu5bca0af2001-04-05 19:41:23 +0000239=item B<cmp>
John Beppu46a4e762000-01-18 22:33:11 +0000240
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000241cmp FILE1 [FILE2]
John Beppu4581b4c2000-01-19 15:04:41 +0000242
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000243Compare files.
244
245-------------------------------
246
John Beppu5bca0af2001-04-05 19:41:23 +0000247=item B<cp>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000248
249cp [OPTION]... SOURCE DEST
John Beppu4581b4c2000-01-19 15:04:41 +0000250
Erik Andersencf8d38a2000-04-21 01:23:36 +0000251Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
John Beppu4581b4c2000-01-19 15:04:41 +0000252
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000253 -a Same as -dpR
254 -d Preserves links
255 -p Preserves file attributes if possible
256 -f force (implied; ignored) - always set
257 -R Copies directories recursively
John Beppu4581b4c2000-01-19 15:04:41 +0000258
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000259-------------------------------
260
John Beppu5bca0af2001-04-05 19:41:23 +0000261=item B<cut>
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000262
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000263cut [OPTION]... [FILE]...
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000264
265Prints selected fields from each input FILE to standard output.
266
267Options:
268
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000269 -b LIST Output only bytes from LIST
270 -c LIST Output only characters from LIST
271 -d CHAR Use CHAR instead of tab as the field delimiter
272 -s Output only the lines containing delimiter
273 -f N Print only these fields
274 -n Ignored
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000275
276Example:
277
John Beppue708cb52001-03-15 21:08:01 +0000278 $ echo Hello world | cut -f 1 -d ' '
279 Hello
280 $ echo Hello world | cut -f 2 -d ' '
281 world
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000282
283-------------------------------
284
John Beppu5bca0af2001-04-05 19:41:23 +0000285=item B<date>
John Beppu46a4e762000-01-18 22:33:11 +0000286
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000287date [OPTION]... [+FORMAT]
Erik Andersen62dc17a2000-04-13 01:18:23 +0000288
Erik Andersencf8d38a2000-04-21 01:23:36 +0000289Displays the current time in the given FORMAT, or sets the system date.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000290
291Options:
Erik Andersene31c0662000-05-02 05:32:07 +0000292
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000293 -R Outputs RFC-822 compliant date string
294 -d STRING display time described by STRING, not `now'
295 -s Sets time described by STRING
296 -u Prints or sets Coordinated Universal Time
Erik Andersen62dc17a2000-04-13 01:18:23 +0000297
298Example:
John Beppuf17792c2000-04-13 03:16:01 +0000299
John Beppue708cb52001-03-15 21:08:01 +0000300 $ date
301 Wed Apr 12 18:52:41 MDT 2000
John Beppu4581b4c2000-01-19 15:04:41 +0000302
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000303-------------------------------
304
John Beppu5bca0af2001-04-05 19:41:23 +0000305=item B<dc>
John Beppu00216792000-06-21 19:06:16 +0000306
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000307dc expression ...
John Beppu00216792000-06-21 19:06:16 +0000308
309This is a Tiny RPN calculator that understands the
310following operations: +, -, /, *, and, or, not, eor.
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000311i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \* 2 2 + /' -> 16
John Beppu00216792000-06-21 19:06:16 +0000312
313Example:
314
John Beppue708cb52001-03-15 21:08:01 +0000315 $ dc 2 2 +
316 4
317 $ dc 8 8 * 2 2 + /
318 16
319 $ dc 0 1 and
320 0
321 $ dc 0 1 or
322 1
323 $ echo 72 9 div 8 mul | dc
324 64
John Beppu00216792000-06-21 19:06:16 +0000325
326-------------------------------
327
John Beppu5bca0af2001-04-05 19:41:23 +0000328=item B<dd>
John Beppu46a4e762000-01-18 22:33:11 +0000329
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000330dd [if=FILE] [of=FILE] [bs=N] [count=N] [skip=N]
331 [seek=N] [conv=notrunc|sync]
John Beppu4581b4c2000-01-19 15:04:41 +0000332
333Copy a file, converting and formatting according to options
334
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000335 if=FILE read from FILE instead of stdin
336 of=FILE write to FILE instead of stdout
337 bs=N read and write N bytes at a time
338 count=N copy only N input blocks
339 skip=N skip N input blocks
340 seek=N skip N output blocks
341 conv=notrunc don't truncate output file
342 conv=sync pad blocks with zeros
Erik Andersen62dc17a2000-04-13 01:18:23 +0000343
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000344Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),
345MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824).
Pavel Roskin1a804e42000-06-21 21:38:00 +0000346
Erik Andersen62dc17a2000-04-13 01:18:23 +0000347Example:
348
John Beppue708cb52001-03-15 21:08:01 +0000349 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
350 4+0 records in
351 4+0 records out
Erik Andersen62dc17a2000-04-13 01:18:23 +0000352
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000353-------------------------------
354
John Beppu5bca0af2001-04-05 19:41:23 +0000355=item B<deallocvt>
Eric Andersen028fb622000-07-04 20:07:13 +0000356
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000357deallocvt N
Eric Andersen028fb622000-07-04 20:07:13 +0000358
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000359Deallocate unused virtual terminal /dev/ttyN
Eric Andersen028fb622000-07-04 20:07:13 +0000360
361-------------------------------
362
John Beppu5bca0af2001-04-05 19:41:23 +0000363=item B<df>
John Beppu46a4e762000-01-18 22:33:11 +0000364
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000365df [B<-hmk>] [filesystem ...]
Erik Andersen62dc17a2000-04-13 01:18:23 +0000366
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000367Print the filesystem space used and space available.
Glenn L McGrathfa044322001-01-03 01:06:30 +0000368
369Options:
370
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000371 -h print sizes in human readable format (e.g., 1K 243M 2G )
372 -m print sizes in megabytes
373 -k print sizes in kilobytes(default)
Glenn L McGrathfa044322001-01-03 01:06:30 +0000374
375Example:
376
John Beppue708cb52001-03-15 21:08:01 +0000377 $ df
378 Filesystem 1k-blocks Used Available Use% Mounted on
379 /dev/sda3 8690864 8553540 137324 98% /
380 /dev/sda1 64216 36364 27852 57% /boot
381 $ df /dev/sda3
382 Filesystem 1k-blocks Used Available Use% Mounted on
383 /dev/sda3 8690864 8553540 137324 98% /
Glenn L McGrathfa044322001-01-03 01:06:30 +0000384
385-------------------------------
386
John Beppu5bca0af2001-04-05 19:41:23 +0000387=item B<dirname>
John Beppu46a4e762000-01-18 22:33:11 +0000388
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000389dirname [FILENAME ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000390
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000391Strips non-directory suffix from FILENAME
392
393Example:
394
John Beppue708cb52001-03-15 21:08:01 +0000395 $ dirname /tmp/foo
396 /tmp
397 $ dirname /tmp/foo/
398 /tmp
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000399
400-------------------------------
401
John Beppu5bca0af2001-04-05 19:41:23 +0000402=item B<dmesg>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000403
404dmesg [B<-c>] [B<-n> LEVEL] [B<-s> SIZE]
405
406Prints or controls the kernel ring buffer
Erik Andersen62dc17a2000-04-13 01:18:23 +0000407
408Options:
John Beppuf17792c2000-04-13 03:16:01 +0000409
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000410 -c Clears the ring buffer's contents after printing
411 -n LEVEL Sets console logging level
412 -s SIZE Use a buffer of size SIZE
Pavel Roskin1a804e42000-06-21 21:38:00 +0000413
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000414-------------------------------
415
John Beppu5bca0af2001-04-05 19:41:23 +0000416=item B<dos2unix>
Eric Andersen61dc0572000-07-11 17:29:36 +0000417
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000418dos2unix [option] [file]
419
420Converts a text file to/from dos format to unix format.
421
422Options:
423
424 -u output will be in UNIX format
425 -d output will be in DOS format
426
427- when no option is given then input format will be automaticaly detected
428
429 and converted to the oposite format on output
430- when no file is given, then stdin is used as input and stdout as output
431
432-------------------------------
433
John Beppu5bca0af2001-04-05 19:41:23 +0000434=item B<dpkg>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000435
436dpkg [B<-i>|B<-r>|-B<-unpack>|-B<-configure>] my.deb
437
438WORK IN PROGRESS, only usefull for debian-installer
439
440-------------------------------
441
John Beppu5bca0af2001-04-05 19:41:23 +0000442=item B<dpkg_deb>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000443
444dpkg_deb [B<-cexX>] file directory
445
446Perform actions on debian packages (.debs)
447
448Options:
449
450 -c List contents of filesystem tree (verbose)
451 -l List contents of filesystem tree (.list format)
452 -e Extract control files to directory
453 -x Exctract packages filesystem tree to directory
454 -X Verbose extract
455
456Example:
457
John Beppue708cb52001-03-15 21:08:01 +0000458 $ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000459
460-------------------------------
461
John Beppu5bca0af2001-04-05 19:41:23 +0000462=item B<du>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000463
464du [B<-lshmk>] [FILE]...
465
466Summarizes disk space used for each FILE and/or directory.
467Disk space is printed in units of 1024 bytes.
468
469Options:
470
471 -l count sizes many times if hard linked
472 -s display only a total for each argument
473 -h print sizes in human readable format (e.g., 1K 243M 2G )
474 -m print sizes in megabytes
475 -k print sizes in kilobytes(default)
476
477Example:
478
John Beppue708cb52001-03-15 21:08:01 +0000479 $ du
480 16 ./CVS
481 12 ./kernel-patches/CVS
482 80 ./kernel-patches
483 12 ./tests/CVS
484 36 ./tests
485 12 ./scripts/CVS
486 16 ./scripts
487 12 ./docs/CVS
488 104 ./docs
489 2417 .
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000490
491-------------------------------
492
John Beppu5bca0af2001-04-05 19:41:23 +0000493=item B<dumpkmap>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000494
495dumpkmap > keymap
Eric Andersen61dc0572000-07-11 17:29:36 +0000496
Eric Andersen337ec1b2000-11-17 17:23:16 +0000497Prints out a binary keyboard translation table to standard output.
Eric Andersen61dc0572000-07-11 17:29:36 +0000498
Eric Andersen18a10142000-09-01 16:12:57 +0000499Example:
500
John Beppue708cb52001-03-15 21:08:01 +0000501 $ dumpkmap > keymap
Eric Andersen18a10142000-09-01 16:12:57 +0000502
Eric Andersen61dc0572000-07-11 17:29:36 +0000503-------------------------------
504
John Beppu5bca0af2001-04-05 19:41:23 +0000505=item B<dutmp>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000506
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000507dutmp [FILE]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000508
509Dump utmp file format (pipe delimited) from FILE
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000510or stdin to stdout. (i.e. 'dutmp /var/run/utmp')
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000511
512Example:
513
John Beppue708cb52001-03-15 21:08:01 +0000514 $ dutmp /var/run/utmp
515 8|7||si|||0|0|0|955637625|760097|0
516 2|0|~|~~|reboot||0|0|0|955637625|782235|0
517 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
518 8|125||l4|||0|0|0|955637629|998367|0
519 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
520 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
521 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
Pavel Roskin1a804e42000-06-21 21:38:00 +0000522
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000523-------------------------------
524
John Beppu5bca0af2001-04-05 19:41:23 +0000525=item B<echo>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000526
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000527echo [B<-neE>] [ARG ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000528
529Prints the specified ARGs to stdout
530
531Options:
532
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000533 -n suppress trailing newline
534 -e interpret backslash-escaped characters (i.e. \t=tab etc)
535 -E disable interpretation of backslash-escaped characters
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000536
537Example:
538
John Beppue708cb52001-03-15 21:08:01 +0000539 $ echo Erik is cool
540 Erik is cool
541 $ echo -e Erik
542 is
543 cool
544 Erik
545 is
546 cool
547 $ echo Erik
548 is
549 cool
550 Erik
551 is
552 cool
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000553
554-------------------------------
555
John Beppu5bca0af2001-04-05 19:41:23 +0000556=item B<env>
557
558env [-] [B<-iu>] [name=value ...] [command]
559
560Prints the current environment or runs a program after setting
561up the specified environment.
562
563Options:
564
565 -, -i start with an empty environment
566 -u remove variable from the environment
567
568-------------------------------
569
570=item B<expr>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000571
572expr EXPRESSION
Eric Andersen1b355eb2000-09-05 17:37:48 +0000573
574Prints the value of EXPRESSION to standard output.
575
576EXPRESSION may be:
577
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000578 ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2
579 ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0
580 ARG1 < ARG2 ARG1 is less than ARG2
581 ARG1 <= ARG2 ARG1 is less than or equal to ARG2
582 ARG1 = ARG2 ARG1 is equal to ARG2
583 ARG1 != ARG2 ARG1 is unequal to ARG2
584 ARG1 >= ARG2 ARG1 is greater than or equal to ARG2
585 ARG1 > ARG2 ARG1 is greater than ARG2
586 ARG1 + ARG2 arithmetic sum of ARG1 and ARG2
587 ARG1 - ARG2 arithmetic difference of ARG1 and ARG2
588 ARG1 * ARG2 arithmetic product of ARG1 and ARG2
589 ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2
590 ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2
Eric Andersen1b355eb2000-09-05 17:37:48 +0000591 STRING : REGEXP anchored pattern match of REGEXP in STRING
592 match STRING REGEXP same as STRING : REGEXP
593 substr STRING POS LENGTH substring of STRING, POS counted from 1
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000594 index STRING CHARS index in STRING where any CHARS is found,
595 or 0
Eric Andersen1b355eb2000-09-05 17:37:48 +0000596 length STRING length of STRING
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000597 quote TOKEN interpret TOKEN as a string, even if
598 it is a keyword like `match' or an
599 operator like `/'
Eric Andersen1b355eb2000-09-05 17:37:48 +0000600 ( EXPRESSION ) value of EXPRESSION
601
602Beware that many operators need to be escaped or quoted for shells.
603Comparisons are arithmetic if both ARGs are numbers, else
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000604lexicographical. Pattern matches return the string matched between
605\( and \) or null; if \( and \) are not used, they return the number
Eric Andersen1b355eb2000-09-05 17:37:48 +0000606of characters matched or 0.
607
608-------------------------------
609
John Beppu5bca0af2001-04-05 19:41:23 +0000610=item B<false>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000611
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000612false
613
614Return an exit code of FALSE (1).
Erik Andersen5e1189e2000-04-15 16:34:54 +0000615
616Example:
617
John Beppue708cb52001-03-15 21:08:01 +0000618 $ false
619 $ echo $?
620 1
Erik Andersen5e1189e2000-04-15 16:34:54 +0000621
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000622-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000623
John Beppu5bca0af2001-04-05 19:41:23 +0000624=item B<fbset>
John Beppu46a4e762000-01-18 22:33:11 +0000625
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000626fbset [options] [mode]
John Beppu4581b4c2000-01-19 15:04:41 +0000627
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000628Show and modify frame buffer settings
John Beppu4581b4c2000-01-19 15:04:41 +0000629
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000630Example:
631
John Beppue708cb52001-03-15 21:08:01 +0000632 $ fbset
633 mode 1024x768-76
John Beppu79359d82001-04-05 20:03:33 +0000634 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
635 geometry 1024 768 1024 768 16
John Beppue708cb52001-03-15 21:08:01 +0000636 timings 12714 128 32 16 4 128 4
637 accel false
638 rgba 5/11,6/5,5/0,0/0
639 endmode
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000640
641-------------------------------
642
John Beppu5bca0af2001-04-05 19:41:23 +0000643=item B<fdflush>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000644
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000645fdflush DEVICE
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000646
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000647Forces floppy disk drive to detect disk change
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000648
649-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000650
John Beppu5bca0af2001-04-05 19:41:23 +0000651=item B<find>
John Beppu46a4e762000-01-18 22:33:11 +0000652
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000653find [PATH...] [EXPRESSION]
John Beppu4581b4c2000-01-19 15:04:41 +0000654
655Search for files in a directory hierarchy. The default PATH is
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000656the current directory; default EXPRESSION is 'B<-print>'
John Beppu4581b4c2000-01-19 15:04:41 +0000657
Erik Andersen62dc17a2000-04-13 01:18:23 +0000658EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000659
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000660 -follow Dereference symbolic links.
John Beppu5bca0af2001-04-05 19:41:23 +0000661 -name PATTERN File name (leading directories removed) matches PATTERN. -print Print (default and assumed).
662
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000663 -type X Filetype matches X (where X is one of: f,d,l,b,c,...)
664 -perm PERMS Permissions match any of (+NNN); all of (-NNN);
665 or exactly (NNN)
666 -mtime TIME Modified time is greater than (+N); less than (-N);
667 or exactly (N) days
Erik Andersen62dc17a2000-04-13 01:18:23 +0000668
669Example:
670
John Beppue708cb52001-03-15 21:08:01 +0000671 $ find / -name /etc/passwd
672 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000673
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000674-------------------------------
675
John Beppu5bca0af2001-04-05 19:41:23 +0000676=item B<free>
John Beppu46a4e762000-01-18 22:33:11 +0000677
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000678free
John Beppu4581b4c2000-01-19 15:04:41 +0000679
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000680Displays the amount of free and used system memory
Erik Andersen62dc17a2000-04-13 01:18:23 +0000681
682Example:
683
John Beppue708cb52001-03-15 21:08:01 +0000684 $ free
685 total used free shared buffers
686 Mem: 257628 248724 8904 59644 93124
687 Swap: 128516 8404 120112
688 Total: 386144 257128 129016
689
Erik Andersen62dc17a2000-04-13 01:18:23 +0000690
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000691-------------------------------
692
John Beppu5bca0af2001-04-05 19:41:23 +0000693=item B<freeramdisk>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000694
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000695freeramdisk DEVICE
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000696
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000697Frees all memory used by the specified ramdisk.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000698
699Example:
700
John Beppue708cb52001-03-15 21:08:01 +0000701 $ freeramdisk /dev/ram2
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000702
703-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000704
John Beppu5bca0af2001-04-05 19:41:23 +0000705=item B<fsck_minix>
John Beppu46a4e762000-01-18 22:33:11 +0000706
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000707fsck_minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000708
709Performs a consistency check for MINIX filesystems.
710
Eric Andersen2086e3d2000-07-04 22:17:01 +0000711Options:
John Beppuf17792c2000-04-13 03:16:01 +0000712
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000713 -l Lists all filenames
714 -r Perform interactive repairs
715 -a Perform automatic repairs
716 -v verbose
717 -s Outputs super-block information
718 -m Activates MINIX-like mode not cleared warnings
719 -f Force file system check.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000720
721-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000722
John Beppu5bca0af2001-04-05 19:41:23 +0000723=item B<getopt>
Eric Andersena1f16bb2000-08-21 22:02:34 +0000724
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000725getopt [OPTIONS]...
Eric Andersena1f16bb2000-08-21 22:02:34 +0000726
727Parse command options
728
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000729 -a, --alternative Allow long options starting with single -
730 -l, --longoptions=longopts Long options to be recognized
731 -n, --name=progname The name under which errors are reported
732 -o, --options=optstring Short options to be recognized
733 -q, --quiet Disable error reporting by getopt(3)
734 -Q, --quiet-output No normal output
735 -s, --shell=shell Set shell quoting conventions
736 -T, --test Test for getopt(1) version
737 -u, --unqote Do not quote the output
Eric Andersena1f16bb2000-08-21 22:02:34 +0000738
739Example:
Eric Andersene4c4d692000-08-21 23:29:45 +0000740
John Beppue708cb52001-03-15 21:08:01 +0000741 $ cat getopt.test
John Beppu79359d82001-04-05 20:03:33 +0000742 #!/bin/sh
John Beppue708cb52001-03-15 21:08:01 +0000743 GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
744 -n 'example.busybox' -- $@`
745 if [ $? != 0 ] ; then exit 1 ; fi
746 eval set -- $GETOPT
747 while true ; do
748 case $1 in
749 -a|--a-long) echo Option a ; shift ;;
750 -b|--b-long) echo Option b, argument `$2' ; shift 2 ;;
751 -c|--c-long)
752 case $2 in
753 \) echo Option c, no argument; shift 2 ;;
754 *) echo Option c, argument `$2' ; shift 2 ;;
755 esac ;;
756 --) shift ; break ;;
757 *) echo Internal error! ; exit 1 ;;
758 esac
759 done
Eric Andersena1f16bb2000-08-21 22:02:34 +0000760
761-------------------------------
762
John Beppu5bca0af2001-04-05 19:41:23 +0000763=item B<grep>
John Beppu46a4e762000-01-18 22:33:11 +0000764
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000765grep [B<-ihHnqvs>] pattern [files...]
John Beppu4581b4c2000-01-19 15:04:41 +0000766
Erik Andersen62dc17a2000-04-13 01:18:23 +0000767Search for PATTERN in each FILE or standard input.
768
Eric Andersen2086e3d2000-07-04 22:17:01 +0000769Options:
John Beppuf17792c2000-04-13 03:16:01 +0000770
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000771 -H prefix output lines with filename where match was found
772 -h suppress the prefixing filename on output
773 -i ignore case distinctions
774 -n print line number with output lines
775 -q be quiet. Returns 0 if result was found, 1 otherwise
776 -v select non-matching lines
777 -s suppress file open/read error messages
Erik Andersen62dc17a2000-04-13 01:18:23 +0000778
Erik Andersen62dc17a2000-04-13 01:18:23 +0000779Example:
780
John Beppue708cb52001-03-15 21:08:01 +0000781 $ grep root /etc/passwd
782 root:x:0:0:root:/root:/bin/bash
783 $ grep ^[rR]oo. /etc/passwd
784 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000785
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000786-------------------------------
787
John Beppu5bca0af2001-04-05 19:41:23 +0000788=item B<gunzip>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000789
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000790gunzip [OPTION]... FILE
Erik Andersen5e1189e2000-04-15 16:34:54 +0000791
792Uncompress FILE (or standard input if FILE is '-').
793
794Options:
795
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000796 -c Write output to standard output
797 -t Test compressed file integrity
Erik Andersen5e1189e2000-04-15 16:34:54 +0000798
799Example:
800
John Beppue708cb52001-03-15 21:08:01 +0000801 $ ls -la /tmp/BusyBox*
802 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
803 $ gunzip /tmp/BusyBox-0.43.tar.gz
804 $ ls -la /tmp/BusyBox*
805 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000806
807-------------------------------
808
John Beppu5bca0af2001-04-05 19:41:23 +0000809=item B<gzip>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000810
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000811gzip [OPTION]... FILE
Erik Andersen5e1189e2000-04-15 16:34:54 +0000812
813Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000814When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000815
816Options:
817
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000818 -c Write output to standard output instead of FILE.gz
819 -d decompress
Erik Andersen5e1189e2000-04-15 16:34:54 +0000820
821Example:
822
John Beppue708cb52001-03-15 21:08:01 +0000823 $ ls -la /tmp/BusyBox*
824 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
825 $ gzip /tmp/BusyBox-0.43.tar
826 $ ls -la /tmp/BusyBox*
827 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000828
829-------------------------------
830
John Beppu5bca0af2001-04-05 19:41:23 +0000831=item B<halt>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000832
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000833halt
Erik Andersen5e1189e2000-04-15 16:34:54 +0000834
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000835Halt the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000836
837-------------------------------
838
John Beppu5bca0af2001-04-05 19:41:23 +0000839=item B<head>
John Beppu46a4e762000-01-18 22:33:11 +0000840
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000841head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000842
843Print first 10 lines of each FILE to standard output.
844With more than one FILE, precede each with a header giving the
845file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000846
847Options:
John Beppuf17792c2000-04-13 03:16:01 +0000848
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000849 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000850
851Example:
852
John Beppue708cb52001-03-15 21:08:01 +0000853 $ head -n 2 /etc/passwd
854 root:x:0:0:root:/root:/bin/bash
855 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000856
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000857-------------------------------
858
John Beppu5bca0af2001-04-05 19:41:23 +0000859=item B<hostid>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000860
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000861hostid
Erik Andersen5e1189e2000-04-15 16:34:54 +0000862
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000863Print out a unique 32-bit identifier for the machine.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000864
865-------------------------------
866
John Beppu5bca0af2001-04-05 19:41:23 +0000867=item B<hostname>
John Beppu46a4e762000-01-18 22:33:11 +0000868
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000869hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000870
John Beppu4581b4c2000-01-19 15:04:41 +0000871Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000872(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000873
Erik Andersen62dc17a2000-04-13 01:18:23 +0000874Options:
John Beppuf17792c2000-04-13 03:16:01 +0000875
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000876 -s Short
877 -i Addresses for the hostname
878 -d DNS domain name
879 -F, --file FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000880
881Example:
882
John Beppue708cb52001-03-15 21:08:01 +0000883 $ hostname
884 slag
John Beppu46a4e762000-01-18 22:33:11 +0000885
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000886-------------------------------
887
John Beppu5bca0af2001-04-05 19:41:23 +0000888=item B<id>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000889
890id [OPTIONS]... [USERNAME]
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000891
892Print information for USERNAME or the current user
893
894Options:
895
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000896 -g prints only the group ID
897 -u prints only the user ID
898 -n print a name instead of a number (with for -ug)
899 -r prints the real user ID instead of the effective ID (with -ug)
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000900
901Example:
902
John Beppue708cb52001-03-15 21:08:01 +0000903 $ id
904 uid=1000(andersen) gid=1000(andersen)
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000905
906-------------------------------
907
John Beppu5bca0af2001-04-05 19:41:23 +0000908=item B<ifconfig>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000909
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000910ifconfig [B<-a>] <interface> [<address>]
911
912configure a network interface
913
914Options:
915
916 [[-]broadcast [<address>]] [[-]pointopoint [<address>]]
917 [netmask <address>] [dstaddr <address>]
918 [outfill <NN>] [keepalive <NN>]
919 [hw ether <address>] [metric <NN>] [mtu <NN>]
920 [[-]trailers] [[-]arp] [[-]allmulti]
921 [multicast] [[-]promisc] [txqueuelen <NN>] [[-]dynamic]
922 [mem_start <NN>] [io_addr <NN>] [irq <NN>]
923 [up|down] ...
924
925-------------------------------
926
John Beppu5bca0af2001-04-05 19:41:23 +0000927=item B<init>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000928
929init
Erik Andersen5e1189e2000-04-15 16:34:54 +0000930
931Init is the parent of all processes.
932
933This version of init is designed to be run only by the kernel.
934
935BusyBox init doesn't support multiple runlevels. The runlevels field of
936the /etc/inittab file is completely ignored by BusyBox init. If you want
937runlevels, use sysvinit.
938
939BusyBox init works just fine without an inittab. If no inittab is found,
940it has the following default behavior:
941
942 ::sysinit:/etc/init.d/rcS
943 ::askfirst:/bin/sh
John Beppu79359d82001-04-05 20:03:33 +0000944 ::ctrlaltdel:/sbin/reboot
945 ::shutdown:/sbin/swapoff -a
946 ::shutdown:/bin/umount -a -r
Erik Andersen5e1189e2000-04-15 16:34:54 +0000947
948if it detects that /dev/console is _not_ a serial console, it will also run:
949
950 tty2::askfirst:/bin/sh
John Beppu79359d82001-04-05 20:03:33 +0000951 tty3::askfirst:/bin/sh
952 tty4::askfirst:/bin/sh
Erik Andersen5e1189e2000-04-15 16:34:54 +0000953
954If you choose to use an /etc/inittab file, the inittab entry format is as follows:
955
956 <id>:<runlevels>:<action>:<process>
957
958 <id>:
959
960 WARNING: This field has a non-traditional meaning for BusyBox init!
961 The id field is used by BusyBox init to specify the controlling tty for
962 the specified process to run on. The contents of this field are
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000963 appended to /dev/ and used as-is. There is no need for this field to
Erik Andersen5e1189e2000-04-15 16:34:54 +0000964 be unique, although if it isn't you may have strange results. If this
Eric Andersen0d2acb02000-12-18 20:36:02 +0000965 field is left blank, the controlling tty is set to the console. Also
966 note that if BusyBox detects that a serial console is in use, then only
967 entries whose controlling tty is either the serial console or /dev/null
968 will be run. BusyBox init does nothing with utmp. We don't need no
969 stinkin' utmp.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000970
971 <runlevels>:
972
973 The runlevels field is completely ignored.
974
975 <action>:
976
977 Valid actions include: sysinit, respawn, askfirst, wait,
John Beppu79359d82001-04-05 20:03:33 +0000978 once, ctrlaltdel, and shutdown.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000979
Eric Anderseneb4218d2000-12-08 20:38:00 +0000980 The available actions can be classified into two groups: actions
981 that are run only once, and actions that are re-run when the specified
982 process exits.
983
984 Run only-once actions:
985
986 'sysinit' is the first item run on boot. init waits until all
987 sysinit actions are completed before continuing. Following the
988 completion of all sysinit actions, all 'wait' actions are run.
989 'wait' actions, like 'sysinit' actions, cause init to wait until
990 the specified task completes. 'once' actions are asyncronous,
991 therefore, init does not wait for them to complete. 'ctrlaltdel'
John Beppu79359d82001-04-05 20:03:33 +0000992 actions are run when the system detects that someone on the system
993 console has pressed the CTRL-ALT-DEL key combination. Typically one
994 wants to run 'reboot' at this point to cause the system to reboot.
995 Finally the 'shutdown' action specifies the actions to taken when
996 init is told to reboot. Unmounting filesystems and disabling swap
997 is a very good here
Eric Anderseneb4218d2000-12-08 20:38:00 +0000998
999 Run repeatedly actions:
1000
1001 'respawn' actions are run after the 'once' actions. When a process
1002 started with a 'respawn' action exits, init automatically restarts
1003 it. Unlike sysvinit, BusyBox init does not stop processes from
1004 respawning out of control. The 'askfirst' actions acts just like
1005 respawn, except that before running the specified process it
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001006 displays the line Please press Enter to activate this console.
Eric Anderseneb4218d2000-12-08 20:38:00 +00001007 and then waits for the user to press enter before starting the
1008 specified process.
1009
1010 Unrecognized actions (like initdefault) will cause init to emit an
1011 error message, and then go along with its business. All actions are
1012 run in the reverse order from how they appear in /etc/inittab.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001013
1014 <process>:
1015
1016 Specifies the process to be executed and it's command line.
1017
Erik Andersen5e1189e2000-04-15 16:34:54 +00001018Example /etc/inittab file:
Mark Whitleyf71378c2001-03-15 21:20:25 +00001019
John Beppu79359d82001-04-05 20:03:33 +00001020 # This is run first except when booting in single-user mode.
1021 #
Erik Andersen5e1189e2000-04-15 16:34:54 +00001022 ::sysinit:/etc/init.d/rcS
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001023
John Beppu79359d82001-04-05 20:03:33 +00001024 # /bin/sh invocations on selected ttys
1025 #
1026 # Start an askfirst shell on the console (whatever that may be)
1027 ::askfirst:-/bin/sh
1028 # Start an askfirst shell on /dev/tty2-4
1029 tty2::askfirst:-/bin/sh
Pavel Roskinc9db2e82000-09-15 17:24:13 +00001030 tty3::askfirst:-/bin/sh
1031 tty4::askfirst:-/bin/sh
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001032
John Beppu79359d82001-04-05 20:03:33 +00001033 # /sbin/getty invocations for selected ttys
1034 #
Pavel Roskinc9db2e82000-09-15 17:24:13 +00001035 tty4::respawn:/sbin/getty 38400 tty5
1036 tty5::respawn:/sbin/getty 38400 tty6
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001037
John Beppu5bca0af2001-04-05 19:41:23 +00001038
John Beppu79359d82001-04-05 20:03:33 +00001039 # Example of how to put a getty on a serial line (for a terminal)
1040 #
1041 #::respawn:/sbin/getty -L ttyS0 9600 vt100
1042 #::respawn:/sbin/getty -L ttyS1 9600 vt100
1043 #
1044 # Example how to put a getty on a modem line.
1045 #::respawn:/sbin/getty 57600 ttyS2
1046
1047 # Stuff to do before rebooting
1048 ::ctrlaltdel:/sbin/reboot
1049 ::shutdown:/bin/umount -a -r
1050 ::shutdown:/sbin/swapoff -a
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001051
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001052
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001053-------------------------------
1054
John Beppu5bca0af2001-04-05 19:41:23 +00001055=item B<insmod>
Eric Andersenfeb47c02000-06-21 21:03:13 +00001056
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001057insmod [OPTION]... MODULE [symbol=value]...
Eric Andersenfeb47c02000-06-21 21:03:13 +00001058
1059Loads the specified kernel modules into the kernel.
1060
1061Options:
1062
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001063 -f Force module to load into the wrong kernel version.
1064 -k Make module autoclean-able.
1065 -v verbose output
1066 -L Lock to prevent simultaneous loads of a module
1067 -x do not export externs
Eric Andersenfeb47c02000-06-21 21:03:13 +00001068
1069-------------------------------
1070
John Beppu5bca0af2001-04-05 19:41:23 +00001071=item B<kill>
John Beppu46a4e762000-01-18 22:33:11 +00001072
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001073kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +00001074
Erik Andersen62dc17a2000-04-13 01:18:23 +00001075Send a signal (default is SIGTERM) to the specified process(es).
1076
1077Options:
John Beppuf17792c2000-04-13 03:16:01 +00001078
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001079 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +00001080
1081Example:
1082
John Beppue708cb52001-03-15 21:08:01 +00001083 $ ps | grep apache
1084 252 root root S [apache]
1085 263 www-data www-data S [apache]
1086 264 www-data www-data S [apache]
1087 265 www-data www-data S [apache]
1088 266 www-data www-data S [apache]
1089 267 www-data www-data S [apache]
1090 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +00001091
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001092-------------------------------
1093
John Beppu5bca0af2001-04-05 19:41:23 +00001094=item B<killall>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001095
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001096killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001097
1098Send a signal (default is SIGTERM) to the specified process(es).
1099
1100Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001101
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001102 -l List all signal names and numbers.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001103
1104Example:
1105
John Beppue708cb52001-03-15 21:08:01 +00001106 $ killall apache
1107
Erik Andersen5e1189e2000-04-15 16:34:54 +00001108
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001109-------------------------------
1110
John Beppu5bca0af2001-04-05 19:41:23 +00001111=item B<klogd>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001112
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001113klogd B<-n>
1114
1115Kernel logger.
1116Options:
1117
1118 -n Run as a foreground process.
1119
1120-------------------------------
1121
John Beppu5bca0af2001-04-05 19:41:23 +00001122=item B<length>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001123
1124length STRING
Erik Andersen5e1189e2000-04-15 16:34:54 +00001125
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001126Prints out the length of the specified STRING.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001127
1128Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001129
John Beppue708cb52001-03-15 21:08:01 +00001130 $ length Hello
1131 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001132
1133-------------------------------
1134
John Beppu5bca0af2001-04-05 19:41:23 +00001135=item B<ln>
John Beppu46a4e762000-01-18 22:33:11 +00001136
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001137ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +00001138
John Beppu4581b4c2000-01-19 15:04:41 +00001139Create a link named LINK_NAME or DIRECTORY to the specified TARGET
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001140
Eric Andersenaddc9c22000-06-21 22:53:24 +00001141You may use '--' to indicate that all following arguments are non-options.
Pavel Roskin1a804e42000-06-21 21:38:00 +00001142
John Beppu4581b4c2000-01-19 15:04:41 +00001143Options:
1144
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001145 -s make symbolic links instead of hard links
1146 -f remove existing destination files
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001147 -n no dereference symlinks - treat like normal file
Pavel Roskin1a804e42000-06-21 21:38:00 +00001148
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001149Example:
1150
John Beppue708cb52001-03-15 21:08:01 +00001151 $ ln -s BusyBox /tmp/ls
1152 $ ls -l /tmp/ls
1153 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
1154
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001155
1156-------------------------------
1157
John Beppu5bca0af2001-04-05 19:41:23 +00001158=item B<loadacm>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001159
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001160loadacm < mapfile
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001161
1162Loads an acm from standard input.
1163
1164Example:
1165
John Beppue708cb52001-03-15 21:08:01 +00001166 $ loadacm < /etc/i18n/acmname
1167
Erik Andersen5e1189e2000-04-15 16:34:54 +00001168
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001169-------------------------------
1170
John Beppu5bca0af2001-04-05 19:41:23 +00001171=item B<loadfont>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001172
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001173loadfont < font
Erik Andersena6c75222000-04-18 00:00:52 +00001174
1175Loads a console font from standard input.
1176
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001177Example:
1178
John Beppue708cb52001-03-15 21:08:01 +00001179 $ loadfont < /etc/i18n/fontname
1180
Erik Andersen5e1189e2000-04-15 16:34:54 +00001181
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001182-------------------------------
1183
John Beppu5bca0af2001-04-05 19:41:23 +00001184=item B<loadkmap>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001185
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001186loadkmap < keymap
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001187
1188Loads a binary keyboard translation table from standard input.
1189
1190Example:
1191
John Beppue708cb52001-03-15 21:08:01 +00001192 $ loadkmap < /etc/i18n/lang-keymap
1193
Erik Andersen5e1189e2000-04-15 16:34:54 +00001194
1195-------------------------------
1196
John Beppu5bca0af2001-04-05 19:41:23 +00001197=item B<logger>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001198
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001199logger [OPTION]... [MESSAGE]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001200
Matt Kraai004827d2001-01-02 22:54:12 +00001201Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001202
1203Options:
1204
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001205 -s Log to stderr as well as the system log.
1206 -t Log using the specified tag (defaults to user name).
1207 -p Enter the message with the specified priority.
1208 This may be numerical or a ``facility.level'' pair.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001209
1210Example:
1211
John Beppue708cb52001-03-15 21:08:01 +00001212 $ logger hello
1213
Erik Andersen5e1189e2000-04-15 16:34:54 +00001214
1215-------------------------------
1216
John Beppu5bca0af2001-04-05 19:41:23 +00001217=item B<logname>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001218
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001219logname
Erik Andersen5e1189e2000-04-15 16:34:54 +00001220
1221Print the name of the current user.
1222
1223Example:
1224
John Beppue708cb52001-03-15 21:08:01 +00001225 $ logname
1226 root
1227
Erik Andersen5e1189e2000-04-15 16:34:54 +00001228
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001229-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001230
John Beppu5bca0af2001-04-05 19:41:23 +00001231=item B<logread>
John Beppu46a4e762000-01-18 22:33:11 +00001232
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001233logread
1234
1235Shows the messages from syslogd (using circular buffer).
1236
1237-------------------------------
1238
John Beppu5bca0af2001-04-05 19:41:23 +00001239=item B<ls>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001240
1241ls [B<-1AacCdeFilnpLRrSsTtuvwxXhk>] [filenames...]
1242
1243List directory contents
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001244
1245Options:
1246
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001247 -1 list files in a single column
1248 -A do not list implied . and ..
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001249 -a do not hide entries starting with .
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001250 -C list entries by columns
1251 -c with -l: show ctime
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001252 -d list directory entries instead of contents
1253 -e list both full date and full time
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001254 -F append indicator (one of */=@|) to entries
1255 -i list the i-node for each file
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001256 -l use a long listing format
1257 -n list numeric UIDs and GIDs instead of names
1258 -p append indicator (one of /=@|) to entries
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001259 -L list entries pointed to by symbolic links
1260 -R list subdirectories recursively
1261 -r sort the listing in reverse order
1262 -S sort the listing by file size
1263 -s list the size of each file, in blocks
1264 -T NUM assume Tabstop every NUM columns
1265 -t with -l: show modification time
1266 -u with -l: show access time
1267 -v sort the listing by version
1268 -w NUM assume the terminal is NUM columns wide
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001269 -x list entries by lines instead of by columns
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001270 -X sort the listing by extension
1271 -h print sizes in human readable format (e.g., 1K 243M 2G )
1272 -k print sizes in kilobytes(default)
John Beppu50ed0672000-04-13 23:44:04 +00001273
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001274-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001275
John Beppu5bca0af2001-04-05 19:41:23 +00001276=item B<lsmod>
John Beppu46a4e762000-01-18 22:33:11 +00001277
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001278lsmod
John Beppu4581b4c2000-01-19 15:04:41 +00001279
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001280List the currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001281
1282-------------------------------
1283
John Beppu5bca0af2001-04-05 19:41:23 +00001284=item B<makedevs>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001285
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001286makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001287
1288Creates a range of block or character special files
1289
1290TYPEs include:
1291
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001292 b: Make a block (buffered) device.
1293 c or u: Make a character (un-buffered) device.
1294 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001295
1296FIRST specifies the number appended to NAME to create the first device.
1297LAST specifies the number of the last item that should be created.
1298If 's' is the last argument, the base device is created as well.
1299
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001300For example:
1301
1302 makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63
1303 makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8
1304
Erik Andersen5e1189e2000-04-15 16:34:54 +00001305Example:
1306
John Beppue708cb52001-03-15 21:08:01 +00001307 $ makedevs /dev/ttyS c 4 66 2 63
1308 [creates ttyS2-ttyS63]
1309 $ makedevs /dev/hda b 3 0 0 8 s
1310 [creates hda,hda1-hda8]
1311
Erik Andersen5e1189e2000-04-15 16:34:54 +00001312
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001313-------------------------------
1314
John Beppu5bca0af2001-04-05 19:41:23 +00001315=item B<md5sum>
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001316
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001317md5sum [OPTION] [FILE]...
1318or: md5sum [OPTION] B<-c> [FILE]
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001319
1320Print or check MD5 checksums.
1321
1322Options:
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001323With no FILE, or when FILE is -, read standard input.
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001324
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001325 -b read files in binary mode
1326 -c check MD5 sums against given list
1327 -t read files in text mode (default)
1328 -g read a string
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001329
1330The following two options are useful only when verifying checksums:
1331
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001332 -s don't output anything, status code shows success
1333 -w warn about improperly formated MD5 checksum lines
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001334
1335Example:
1336
John Beppue708cb52001-03-15 21:08:01 +00001337 $ md5sum < busybox
1338 6fd11e98b98a58f64ff3398d7b324003
1339 $ md5sum busybox
1340 6fd11e98b98a58f64ff3398d7b324003 busybox
1341 $ md5sum -c -
1342 6fd11e98b98a58f64ff3398d7b324003 busybox
1343 busybox: OK
1344 ^D
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001345
1346-------------------------------
1347
John Beppu5bca0af2001-04-05 19:41:23 +00001348=item B<mkdir>
John Beppu46a4e762000-01-18 22:33:11 +00001349
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001350mkdir [OPTION] DIRECTORY...
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001351
John Beppu4581b4c2000-01-19 15:04:41 +00001352Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001353
John Beppu4581b4c2000-01-19 15:04:41 +00001354Options:
1355
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001356 -m set permission mode (as in chmod), not rwxrwxrwx - umask
1357 -p no error if existing, make parent directories as needed
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001358
1359Example:
1360
John Beppue708cb52001-03-15 21:08:01 +00001361 $ mkdir /tmp/foo
1362 $ mkdir /tmp/foo
1363 /tmp/foo: File exists
1364 $ mkdir /tmp/foo/bar/baz
1365 /tmp/foo/bar/baz: No such file or directory
1366 $ mkdir -p /tmp/foo/bar/baz
1367
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001368
1369-------------------------------
1370
John Beppu5bca0af2001-04-05 19:41:23 +00001371=item B<mkfifo>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001372
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001373mkfifo [OPTIONS] name
Erik Andersen5e1189e2000-04-15 16:34:54 +00001374
1375Creates a named pipe (identical to 'mknod name p')
1376
1377Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001378
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001379 -m create the pipe using the specified mode (default a=rw)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001380
1381-------------------------------
1382
John Beppu5bca0af2001-04-05 19:41:23 +00001383=item B<mkfs_minix>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001384
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001385mkfs_minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001386
1387Make a MINIX filesystem.
1388
Eric Andersen2086e3d2000-07-04 22:17:01 +00001389Options:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001390
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001391 -c Check the device for bad blocks
1392 -n [14|30] Specify the maximum length of filenames
1393 -i INODES Specify the number of inodes for the filesystem
1394 -l FILENAME Read the bad blocks list from FILENAME
1395 -v Make a Minix version 2 filesystem
Erik Andersen5e1189e2000-04-15 16:34:54 +00001396
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001397-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001398
John Beppu5bca0af2001-04-05 19:41:23 +00001399=item B<mknod>
John Beppu46a4e762000-01-18 22:33:11 +00001400
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001401mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001402
Erik Andersen5e1189e2000-04-15 16:34:54 +00001403Create a special file (block, character, or pipe).
1404
1405Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001406
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001407 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001408
1409TYPEs include:
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001410
1411 b: Make a block (buffered) device.
1412 c or u: Make a character (un-buffered) device.
1413 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001414
1415Example:
1416
John Beppue708cb52001-03-15 21:08:01 +00001417 $ mknod /dev/fd0 b 2 0
1418 $ mknod -m 644 /tmp/pipe p
1419
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001420
1421-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001422
John Beppu5bca0af2001-04-05 19:41:23 +00001423=item B<mkswap>
John Beppu46a4e762000-01-18 22:33:11 +00001424
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001425mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001426
John Beppu4581b4c2000-01-19 15:04:41 +00001427Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001428
John Beppu4581b4c2000-01-19 15:04:41 +00001429Options:
1430
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001431 -c Check for read-ability.
1432 -v0 Make version 0 swap [max 128 Megs].
1433 -v1 Make version 1 swap [big!] (default for kernels >
1434 2.1.117).
1435 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001436
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001437-------------------------------
1438
John Beppu5bca0af2001-04-05 19:41:23 +00001439=item B<mktemp>
Erik Andersen227a59b2000-04-25 23:24:55 +00001440
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001441mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001442
1443Creates a temporary file with its name based on TEMPLATE.
1444TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1445
1446Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001447
John Beppue708cb52001-03-15 21:08:01 +00001448 $ mktemp /tmp/temp.XXXXXX
1449 /tmp/temp.mWiLjM
1450 $ ls -la /tmp/temp.mWiLjM
1451 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1452
Erik Andersen227a59b2000-04-25 23:24:55 +00001453
1454-------------------------------
1455
John Beppu5bca0af2001-04-05 19:41:23 +00001456=item B<more>
John Beppu46a4e762000-01-18 22:33:11 +00001457
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001458more [FILE ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001459
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001460More is a filter for viewing FILE one screenful at a time.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001461
1462Example:
1463
John Beppue708cb52001-03-15 21:08:01 +00001464 $ dmesg | more
1465
John Beppu50ed0672000-04-13 23:44:04 +00001466
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001467-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001468
John Beppu5bca0af2001-04-05 19:41:23 +00001469=item B<mount>
John Beppu46a4e762000-01-18 22:33:11 +00001470
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001471mount [flags] device directory [B<-o> options,more-options]
1472
1473Mount a filesystem
John Beppu4581b4c2000-01-19 15:04:41 +00001474
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001475Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001476
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001477 -a: Mount all filesystems in fstab.
1478 -f: Fake Add entry to mount table but don't mount it.
1479 -n: Don't write a mount table entry.
1480 -o option: One of many filesystem options, listed below.
1481 -r: Mount the filesystem read-only.
1482 -t fs-type: Specify the filesystem type.
1483 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001484
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001485Options for use with the B<-o> flag:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001486
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001487 async/sync: Writes are asynchronous / synchronous.
1488 atime/noatime: Enable / disable updates to inode access times.
1489 dev/nodev: Allow use of special device files / disallow them.
1490 exec/noexec: Allow use of executable files / disallow them.
1491 loop: Mounts a file via loop device.
1492 suid/nosuid: Allow set-user-id-root programs / disallow them.
1493 remount: Re-mount a mounted filesystem, changing its flags.
1494 ro/rw: Mount for read-only / read-write.
1495
1496There are EVEN MORE flags that are specific to each filesystem.
1497You'll have to see the written documentation for those.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001498
1499Example:
1500
John Beppue708cb52001-03-15 21:08:01 +00001501 $ mount
1502 /dev/hda3 on / type minix (rw)
1503 proc on /proc type proc (rw)
1504 devpts on /dev/pts type devpts (rw)
1505 $ mount /dev/fd0 /mnt -t msdos -o ro
1506 $ mount /tmp/diskimage /opt -t ext2 -o loop
1507
John Beppu50ed0672000-04-13 23:44:04 +00001508
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001509-------------------------------
1510
John Beppu5bca0af2001-04-05 19:41:23 +00001511=item B<mt>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001512
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001513mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001514
1515Control magnetic tape drive operation
1516
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001517Available Opcodes:
1518
1519bsf bsfm bsr bss datacompression drvbuffer eof eom erase
1520fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2
1521ras3 reset retension rew rewoffline seek setblk setdensity
1522setpart tell unload unlock weof wset
1523
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001524-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001525
John Beppu5bca0af2001-04-05 19:41:23 +00001526=item B<mv>
John Beppu46a4e762000-01-18 22:33:11 +00001527
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001528mv SOURCE DEST
1529or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001530
1531Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001532
1533Example:
1534
John Beppue708cb52001-03-15 21:08:01 +00001535 $ mv /tmp/foo /bin/bar
1536
John Beppu50ed0672000-04-13 23:44:04 +00001537
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001538-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001539
John Beppu5bca0af2001-04-05 19:41:23 +00001540=item B<nc>
Eric Andersen028fb622000-07-04 20:07:13 +00001541
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001542nc [IP] [port]
Eric Andersen028fb622000-07-04 20:07:13 +00001543
1544Netcat opens a pipe to IP:port
1545
1546Example:
1547
John Beppue708cb52001-03-15 21:08:01 +00001548 $ nc foobar.somedomain.com 25
John Beppu79359d82001-04-05 20:03:33 +00001549 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1550 help
John Beppue708cb52001-03-15 21:08:01 +00001551 214-Commands supported:
1552 214- HELO EHLO MAIL RCPT DATA AUTH
1553 214 NOOP QUIT RSET HELP
1554 quit
1555 221 foobar closing connection
1556
Eric Andersen028fb622000-07-04 20:07:13 +00001557
1558-------------------------------
1559
John Beppu5bca0af2001-04-05 19:41:23 +00001560=item B<nslookup>
John Beppu46a4e762000-01-18 22:33:11 +00001561
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001562nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001563
Erik Andersen5e1189e2000-04-15 16:34:54 +00001564Queries the nameserver for the IP address of the given HOST
1565
1566Example:
1567
John Beppue708cb52001-03-15 21:08:01 +00001568 $ nslookup localhost
1569 Server: default
1570 Address: default
1571
1572 Name: debian
1573 Address: 127.0.0.1
1574
John Beppu46a4e762000-01-18 22:33:11 +00001575
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001576-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001577
John Beppu5bca0af2001-04-05 19:41:23 +00001578=item B<ping>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001579
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001580ping [OPTION]... host
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001581
1582Send ICMP ECHO_REQUEST packets to network hosts.
1583
1584Options:
1585
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001586 -c COUNT Send only COUNT pings.
Pavel Roskin0024abc2000-06-07 20:38:15 +00001587 -s SIZE Send SIZE data bytes in packets (default=56).
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001588 -q Quiet mode, only displays output at start
1589 and when finished.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001590
1591Example:
1592
John Beppue708cb52001-03-15 21:08:01 +00001593 $ ping localhost
1594 PING slag (127.0.0.1): 56 data bytes
1595 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1596
1597 --- debian ping statistics ---
1598 1 packets transmitted, 1 packets received, 0% packet loss
1599 round-trip min/avg/max = 20.1/20.1/20.1 ms
1600
Erik Andersen5e1189e2000-04-15 16:34:54 +00001601
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001602-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001603
John Beppu5bca0af2001-04-05 19:41:23 +00001604=item B<pivot_root>
John Beppu46a4e762000-01-18 22:33:11 +00001605
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001606pivot_root new_root put_old
1607
1608Move the current root file system to put_old and make new_root
1609the new root file system.
1610
1611-------------------------------
1612
John Beppu5bca0af2001-04-05 19:41:23 +00001613=item B<poweroff>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001614
1615poweroff
1616
1617Halt the system and request that the kernel shut off the power.
1618
1619-------------------------------
1620
John Beppu5bca0af2001-04-05 19:41:23 +00001621=item B<printf>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001622
1623printf FORMAT [ARGUMENT...]
1624
1625Formats and prints ARGUMENT(s) according to FORMAT,
1626Where FORMAT controls the output exactly as in C printf.
1627
1628Example:
1629
John Beppue708cb52001-03-15 21:08:01 +00001630 $ printf Val=%d
1631 5
1632 Val=5
1633
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001634
1635-------------------------------
1636
John Beppu5bca0af2001-04-05 19:41:23 +00001637=item B<ps>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001638
1639ps
Erik Andersen5e1189e2000-04-15 16:34:54 +00001640
1641Report process status
1642
1643This version of ps accepts no options.
1644
1645Example:
1646
John Beppue708cb52001-03-15 21:08:01 +00001647 $ ps
1648 PID Uid Gid State Command
1649 1 root root S init
1650 2 root root S [kflushd]
1651 3 root root S [kupdate]
1652 4 root root S [kpiod]
1653 5 root root S [kswapd]
1654 742 andersen andersen S [bash]
1655 743 andersen andersen S -bash
1656 745 root root S [getty]
1657 2990 andersen andersen R ps
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001658
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001659-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001660
John Beppu5bca0af2001-04-05 19:41:23 +00001661=item B<pwd>
John Beppu46a4e762000-01-18 22:33:11 +00001662
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001663pwd
1664
1665Print the full filename of the current working directory.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001666
1667Example:
1668
John Beppue708cb52001-03-15 21:08:01 +00001669 $ pwd
1670 /root
Erik Andersen5e1189e2000-04-15 16:34:54 +00001671
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001672-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001673
John Beppu5bca0af2001-04-05 19:41:23 +00001674=item B<rdate>
Eric Andersen918507e2000-08-21 22:46:33 +00001675
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001676rdate [OPTION] HOST
Eric Andersen918507e2000-08-21 22:46:33 +00001677
1678Get and possibly set the system date and time from a remote HOST.
1679
1680Options:
1681
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001682 -s Set the system date and time (default).
1683 -p Print the date and time.
Eric Andersen918507e2000-08-21 22:46:33 +00001684
1685-------------------------------
1686
John Beppu5bca0af2001-04-05 19:41:23 +00001687=item B<readlink>
John Beppu46a4e762000-01-18 22:33:11 +00001688
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001689readlink
1690
1691Read a symbolic link.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001692
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001693-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001694
John Beppu5bca0af2001-04-05 19:41:23 +00001695=item B<reboot>
Eric Andersenbf960f52000-07-21 21:32:12 +00001696
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001697reboot
1698
1699Reboot the system.
1700
1701-------------------------------
1702
John Beppu5bca0af2001-04-05 19:41:23 +00001703=item B<renice>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001704
1705renice priority pid [pid ...]
Eric Andersenbf960f52000-07-21 21:32:12 +00001706
1707Changes priority of running processes. Allowed priorities range
1708from 20 (the process runs only when nothing else is running) to 0
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001709(default priority) to B<-20> (almost nothing else ever gets to run).
Eric Andersenbf960f52000-07-21 21:32:12 +00001710
1711-------------------------------
1712
John Beppu5bca0af2001-04-05 19:41:23 +00001713=item B<reset>
Eric Andersenfa405d02000-08-21 21:18:52 +00001714
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001715reset
Eric Andersenfa405d02000-08-21 21:18:52 +00001716
1717Resets the screen.
1718
1719-------------------------------
1720
John Beppu5bca0af2001-04-05 19:41:23 +00001721=item B<rm>
John Beppu46a4e762000-01-18 22:33:11 +00001722
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001723rm [OPTION]... FILE...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001724
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001725Remove (unlink) the FILE(s). You may use '--' to
Eric Andersen815e9042000-06-06 16:15:23 +00001726indicate that all following arguments are non-options.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001727
1728Options:
1729
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001730 -i always prompt before removing each destinations
1731 -f remove existing destinations, never prompt
1732 -r or -R remove the contents of directories recursively
Erik Andersen5e1189e2000-04-15 16:34:54 +00001733
1734Example:
1735
John Beppue708cb52001-03-15 21:08:01 +00001736 $ rm -rf /tmp/foo
Erik Andersen5e1189e2000-04-15 16:34:54 +00001737
1738-------------------------------
1739
John Beppu5bca0af2001-04-05 19:41:23 +00001740=item B<rmdir>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001741
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001742rmdir [OPTION]... DIRECTORY...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001743
1744Remove the DIRECTORY(ies), if they are empty.
1745
1746Example:
1747
John Beppu79359d82001-04-05 20:03:33 +00001748 # rmdir /tmp/foo
Erik Andersen5e1189e2000-04-15 16:34:54 +00001749
1750-------------------------------
1751
John Beppu5bca0af2001-04-05 19:41:23 +00001752=item B<rmmod>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001753
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001754rmmod [OPTION]... [MODULE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001755
1756Unloads the specified kernel modules from the kernel.
1757
1758Options:
1759
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001760 -a Try to remove all unused kernel modules.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001761
1762Example:
1763
John Beppue708cb52001-03-15 21:08:01 +00001764 $ rmmod tulip
Erik Andersen5e1189e2000-04-15 16:34:54 +00001765
1766-------------------------------
1767
John Beppu5bca0af2001-04-05 19:41:23 +00001768=item B<route>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001769
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001770route [{add|del|flush}]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001771
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001772Edit the kernel's routing tables
Erik Andersen5e1189e2000-04-15 16:34:54 +00001773
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001774-------------------------------
Erik Andersen5e1189e2000-04-15 16:34:54 +00001775
John Beppu5bca0af2001-04-05 19:41:23 +00001776=item B<rpmunpack>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001777
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001778rpmunpack < package.rpm | gunzip | cpio B<-idmuv>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001779
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001780Extracts an rpm archive.
1781
1782-------------------------------
1783
John Beppu5bca0af2001-04-05 19:41:23 +00001784=item B<sed>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001785
1786sed [B<-Vhnef>] pattern [files...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001787
1788Options:
1789
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001790 -n suppress automatic printing of pattern space
1791 -e script add the script to the commands to be executed
1792 -f scriptfile add the contents of script-file to the commands to be executed
1793 -h display this help message
Erik Andersen5e1189e2000-04-15 16:34:54 +00001794
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001795If no B<-e> or B<-f> is given, the first non-option argument is taken as the
1796sed script to interpret. All remaining arguments are names of input
1797files; if no input files are specified, then the standard input is read.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001798
1799Example:
1800
John Beppue708cb52001-03-15 21:08:01 +00001801 $ echo foo | sed -e 's/f[a-zA-Z]o/bar/g'
1802 bar
Erik Andersen5e1189e2000-04-15 16:34:54 +00001803
1804-------------------------------
1805
John Beppu5bca0af2001-04-05 19:41:23 +00001806=item B<setkeycodes>
Erik Andersen4f3f7572000-04-28 00:18:56 +00001807
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001808setkeycodes SCANCODE KEYCODE ...
Erik Andersen4f3f7572000-04-28 00:18:56 +00001809
1810Set entries into the kernel's scancode-to-keycode map,
1811allowing unusual keyboards to generate usable keycodes.
1812
1813SCANCODE may be either xx or e0xx (hexadecimal),
1814and KEYCODE is given in decimal
1815
1816Example:
1817
John Beppue708cb52001-03-15 21:08:01 +00001818 $ setkeycodes e030 127
Erik Andersen4f3f7572000-04-28 00:18:56 +00001819
1820-------------------------------
1821
John Beppu5bca0af2001-04-05 19:41:23 +00001822=item B<sh>
Eric Andersen028fb622000-07-04 20:07:13 +00001823
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001824sh [FILE]...
1825or: sh B<-c> command [args]...
Eric Andersen028fb622000-07-04 20:07:13 +00001826
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001827lash: The BusyBox LAme SHell (command interpreter)
Eric Andersen028fb622000-07-04 20:07:13 +00001828
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001829This command does not yet have proper documentation.
Eric Andersen028fb622000-07-04 20:07:13 +00001830
1831Use lash just as you would use any other shell. It properly handles pipes,
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001832redirects, job control, can be used as the shell for scripts, and has a
1833sufficient set of builtins to do what is needed. It does not (yet) support
1834Bourne Shell syntax. If you need things like if-then-else, while, and such
1835use ash or bash. If you just need a very simple and extremely small shell,
1836this will do the job.
Eric Andersen028fb622000-07-04 20:07:13 +00001837
1838-------------------------------
1839
John Beppu5bca0af2001-04-05 19:41:23 +00001840=item B<sleep>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001841
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001842sleep N
Erik Andersen5e1189e2000-04-15 16:34:54 +00001843
1844Pause for N seconds.
1845
1846Example:
1847
John Beppue708cb52001-03-15 21:08:01 +00001848 $ sleep 2
1849 [2 second delay results]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001850
1851-------------------------------
1852
John Beppu5bca0af2001-04-05 19:41:23 +00001853=item B<sort>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001854
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001855sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001856
1857Sorts lines of text in the specified files
1858
1859Example:
1860
John Beppue708cb52001-03-15 21:08:01 +00001861 $ echo -e e
1862 f
1863 b
1864 d
1865 c
1866 a | sort
1867 a
1868 b
1869 c
1870 d
1871 e
1872 f
Erik Andersen5e1189e2000-04-15 16:34:54 +00001873
1874-------------------------------
1875
John Beppu5bca0af2001-04-05 19:41:23 +00001876=item B<stty>
Eric Andersen028fb622000-07-04 20:07:13 +00001877
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001878stty [B<-a>|g] [B<-F> device] [SETTING]...
1879
1880Without arguments, prints baud rate, line discipline,
1881and deviations from stty sane.
1882
1883Options:
1884
1885 -F device open device instead of stdin
1886 -a print all current settings in human-readable form
1887 -g print in stty-readable form
1888 [SETTING] see documentation
1889
1890-------------------------------
1891
John Beppu5bca0af2001-04-05 19:41:23 +00001892=item B<swapoff>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001893
1894swapoff [OPTION] [device]
Eric Andersen028fb622000-07-04 20:07:13 +00001895
1896Stop swapping virtual memory pages on the given device.
1897
1898Options:
1899
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001900 -a Stop swapping on all swap devices
Eric Andersen028fb622000-07-04 20:07:13 +00001901
1902-------------------------------
1903
John Beppu5bca0af2001-04-05 19:41:23 +00001904=item B<swapon>
Eric Andersen028fb622000-07-04 20:07:13 +00001905
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001906swapon [OPTION] [device]
Eric Andersen028fb622000-07-04 20:07:13 +00001907
1908Start swapping virtual memory pages on the given device.
1909
1910Options:
1911
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001912 -a Start swapping on all swap devices
Eric Andersen028fb622000-07-04 20:07:13 +00001913
1914-------------------------------
1915
John Beppu5bca0af2001-04-05 19:41:23 +00001916=item B<sync>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001917
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001918sync
Erik Andersen5e1189e2000-04-15 16:34:54 +00001919
1920Write all buffered filesystem blocks to disk.
1921
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001922-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001923
John Beppu5bca0af2001-04-05 19:41:23 +00001924=item B<syslogd>
John Beppu46a4e762000-01-18 22:33:11 +00001925
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001926syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001927
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001928Linux system and kernel logging utility.
1929Note that this version of syslogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001930
Erik Andersen5e1189e2000-04-15 16:34:54 +00001931Options:
Pavel Roskin049b7062000-06-07 21:19:49 +00001932
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001933 -m NUM Interval between MARK lines (default=20min, 0=off)
Pavel Roskinda10ec02000-06-07 21:08:25 +00001934 -n Run as a foreground process
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001935 -O FILE Use an alternate log file (default=/var/log/messages)
1936 -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)
1937 -L Log locally and via network logging (default is network only)
Eric Andersenced2cef2000-07-20 23:41:24 +00001938
1939Example:
1940
John Beppue708cb52001-03-15 21:08:01 +00001941 $ syslogd -R masterlog:514
1942 $ syslogd -R 192.168.1.1:601
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001943
1944-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001945
John Beppu5bca0af2001-04-05 19:41:23 +00001946=item B<tail>
John Beppu46a4e762000-01-18 22:33:11 +00001947
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001948tail [OPTION]... [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001949
1950Print last 10 lines of each FILE to standard output.
1951With more than one FILE, precede each with a header giving the
1952file name. With no FILE, or when FILE is -, read standard input.
1953
1954Options:
1955
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001956 -c N[kbm] output the last N bytes
1957 -n N[kbm] print last N lines instead of last 10
1958 -f output data as the file grows
1959 -q never output headers giving file names
1960 -s SEC wait SEC seconds between reads with -f
1961 -v always output headers giving file names
1962
John Beppue708cb52001-03-15 21:08:01 +00001963If the first character of N (bytes or lines) is a '+', output begins with
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001964the Nth item from the start of each file, otherwise, print the last N items
1965in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).
Erik Andersen5e1189e2000-04-15 16:34:54 +00001966
1967Example:
1968
John Beppue708cb52001-03-15 21:08:01 +00001969 $ tail -n 1 /etc/resolv.conf
1970 nameserver 10.0.0.1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001971
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001972-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001973
John Beppu5bca0af2001-04-05 19:41:23 +00001974=item B<tar>
John Beppu46a4e762000-01-18 22:33:11 +00001975
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001976tar -[cxtvO] [-B<-exclude> File] [B<-X> File][B<-f> tarFile] [FILE(s)] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001977
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001978Create, extract, or list files from a tar file.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001979
1980Main operation mode:
1981
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001982 c create
1983 x extract
1984 t list
Erik Andersen5e1189e2000-04-15 16:34:54 +00001985
1986File selection:
1987
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001988 f name of tarfile or - for stdin
1989 O extract to stdout
1990 exclude file to exclude
1991 X file with names to exclude
Erik Andersen5e1189e2000-04-15 16:34:54 +00001992
1993Informative output:
1994
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001995 v verbosely list files processed
Erik Andersen5e1189e2000-04-15 16:34:54 +00001996
1997Example:
1998
John Beppue708cb52001-03-15 21:08:01 +00001999 $ zcat /tmp/tarball.tar.gz | tar -xf -
2000 $ tar -cf /tmp/tarball.tar /usr/local
Erik Andersen5e1189e2000-04-15 16:34:54 +00002001
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002002-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002003
John Beppu5bca0af2001-04-05 19:41:23 +00002004=item B<tee>
Eric Andersen028fb622000-07-04 20:07:13 +00002005
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002006tee [OPTION]... [FILE]...
Eric Andersen028fb622000-07-04 20:07:13 +00002007
2008Copy standard input to each FILE, and also to standard output.
2009
2010Options:
2011
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002012 -a append to the given FILEs, do not overwrite
Eric Andersen028fb622000-07-04 20:07:13 +00002013
2014Example:
2015
John Beppue708cb52001-03-15 21:08:01 +00002016 $ echo Hello | tee /tmp/foo
2017 $ cat /tmp/foo
2018 Hello
Eric Andersen028fb622000-07-04 20:07:13 +00002019
2020-------------------------------
2021
John Beppu5bca0af2001-04-05 19:41:23 +00002022=item B<telnet>
Eric Andersen028fb622000-07-04 20:07:13 +00002023
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002024telnet host [port]
Eric Andersen028fb622000-07-04 20:07:13 +00002025
2026Telnet is used to establish interactive communication with another
2027computer over a network using the TELNET protocol.
2028
2029-------------------------------
2030
John Beppu5bca0af2001-04-05 19:41:23 +00002031=item B<test>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002032
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002033test EXPRESSION
2034 or [ EXPRESSION ]
Erik Andersen5e1189e2000-04-15 16:34:54 +00002035
2036Checks file types and compares values returning an exit
2037code determined by the value of EXPRESSION.
2038
2039Example:
2040
John Beppue708cb52001-03-15 21:08:01 +00002041 $ test 1 -eq 2
2042 $ echo $?
2043 1
2044 $ test 1 -eq 1
2045 $ echo $?
2046 0
2047 $ [ -d /etc ]
2048 $ echo $?
2049 0
2050 $ [ -d /junk ]
2051 $ echo $?
2052 1
Erik Andersen5e1189e2000-04-15 16:34:54 +00002053
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002054-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002055
John Beppu5bca0af2001-04-05 19:41:23 +00002056=item B<tftp>
John Beppu46a4e762000-01-18 22:33:11 +00002057
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002058tftp command SOURCE DEST
Erik Andersen5e1189e2000-04-15 16:34:54 +00002059
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002060Transfers a file from/to a tftp server using octet mode.
2061
2062Commands:
2063
2064 get Get file from server SOURCE and store to local DEST.
2065 put Put local file SOURCE to server DEST.
2066
2067When nameing a server, use the syntax server:file.
2068
2069-------------------------------
2070
John Beppu5bca0af2001-04-05 19:41:23 +00002071=item B<touch>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002072
2073touch [B<-c>] file [file ...]
2074
2075Update the last-modified date on the given file[s].
2076
2077Options:
2078
2079 -c Do not create any files
Erik Andersen5e1189e2000-04-15 16:34:54 +00002080
2081Example:
2082
John Beppue708cb52001-03-15 21:08:01 +00002083 $ ls -l /tmp/foo
2084 /bin/ls: /tmp/foo: No such file or directory
2085 $ touch /tmp/foo
2086 $ ls -l /tmp/foo
2087 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
2088
Erik Andersen5e1189e2000-04-15 16:34:54 +00002089
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002090-------------------------------
2091
John Beppu5bca0af2001-04-05 19:41:23 +00002092=item B<tr>
Erik Andersena19bc642000-05-02 06:40:02 +00002093
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002094tr [B<-cds>] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002095
Erik Andersen3c1217c2000-05-01 22:34:24 +00002096Translate, squeeze, and/or delete characters from
2097standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00002098
Erik Andersen3c1217c2000-05-01 22:34:24 +00002099Options:
2100
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002101 -c take complement of STRING1
2102 -d delete input characters coded STRING1
2103 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00002104
2105Example:
2106
John Beppue708cb52001-03-15 21:08:01 +00002107 $ echo gdkkn vnqkc | tr [a-y] [b-z]
2108 hello world
2109
Erik Andersen5e1189e2000-04-15 16:34:54 +00002110
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002111-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002112
John Beppu5bca0af2001-04-05 19:41:23 +00002113=item B<true>
John Beppu46a4e762000-01-18 22:33:11 +00002114
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002115true
2116
2117Return an exit code of TRUE (0).
Erik Andersen5e1189e2000-04-15 16:34:54 +00002118
2119Example:
2120
John Beppue708cb52001-03-15 21:08:01 +00002121 $ true
2122 $ echo $?
2123 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00002124
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002125-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002126
John Beppu5bca0af2001-04-05 19:41:23 +00002127=item B<tty>
John Beppu4581b4c2000-01-19 15:04:41 +00002128
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002129tty
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002130
2131Print the file name of the terminal connected to standard input.
2132
2133Options:
2134
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002135 -s print nothing, only return an exit status
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002136
2137Example:
2138
John Beppue708cb52001-03-15 21:08:01 +00002139 $ tty
2140 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00002141
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002142-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002143
John Beppu5bca0af2001-04-05 19:41:23 +00002144=item B<umount>
John Beppu46a4e762000-01-18 22:33:11 +00002145
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002146umount [flags] filesystem|directory
2147
2148Unmount file systems
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002149
2150Flags:
2151
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002152 -a: Unmount all file systems in /etc/mtab
2153 -n: Don't erase /etc/mtab entries
2154 -r: Try to remount devices as read-only if mount is busy
2155 -f: Force filesystem umount (i.e. unreachable NFS server)
2156 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002157
2158Example:
2159
John Beppue708cb52001-03-15 21:08:01 +00002160 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00002161
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002162-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00002163
John Beppu5bca0af2001-04-05 19:41:23 +00002164=item B<uname>
John Beppuf17792c2000-04-13 03:16:01 +00002165
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002166uname [OPTION]...
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002167
Erik Andersen26702fe2000-04-17 16:44:46 +00002168Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002169
2170Options:
2171
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002172 -a print all information
2173 -m the machine (hardware) type
2174 -n print the machine's network node hostname
2175 -r print the operating system release
2176 -s print the operating system name
2177 -p print the host processor type
2178 -v print the operating system version
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002179
2180Example:
2181
John Beppue708cb52001-03-15 21:08:01 +00002182 $ uname -a
John Beppu79359d82001-04-05 20:03:33 +00002183 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
2184
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002185
2186-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002187
John Beppu5bca0af2001-04-05 19:41:23 +00002188=item B<uniq>
John Beppu46a4e762000-01-18 22:33:11 +00002189
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002190uniq [OPTION]... [INPUT [OUTPUT]]
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002191
2192Discard all but one of successive identical lines from INPUT
2193(or standard input), writing to OUTPUT (or standard output).
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002194
Eric Andersen5b5db382000-12-09 16:37:53 +00002195Options:
2196
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002197 -c prefix lines by the number of occurrences
2198 -d only print duplicate lines
2199 -u only print unique lines
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002200
2201Example:
2202
John Beppue708cb52001-03-15 21:08:01 +00002203 $ echo -e a
2204 a
2205 b
2206 c
2207 c
2208 a | sort | uniq
2209 a
2210 b
2211 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00002212
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002213-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002214
John Beppu5bca0af2001-04-05 19:41:23 +00002215=item B<unix2dos>
Eric Andersencff3fe32000-09-20 19:22:26 +00002216
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002217unix2dos [option] [file]
Eric Andersencff3fe32000-09-20 19:22:26 +00002218
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002219See 'dos2unix -B<-help>' for help!
Eric Andersencff3fe32000-09-20 19:22:26 +00002220
2221-------------------------------
2222
John Beppu5bca0af2001-04-05 19:41:23 +00002223=item B<update>
Eric Andersencff3fe32000-09-20 19:22:26 +00002224
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002225update [options]
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002226
2227Periodically flushes filesystem buffers.
2228
2229Options:
2230
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002231 -S force use of sync(2) instead of flushing
2232 -s SECS call sync this often (default 30)
2233 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00002234
2235-------------------------------
2236
John Beppu5bca0af2001-04-05 19:41:23 +00002237=item B<uptime>
Erik Andersen5e1189e2000-04-15 16:34:54 +00002238
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002239uptime
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002240
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002241Display the time since the last boot.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002242
2243Example:
2244
John Beppue708cb52001-03-15 21:08:01 +00002245 $ uptime
2246 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
2247
Erik Andersen5e1189e2000-04-15 16:34:54 +00002248
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002249-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002250
John Beppu5bca0af2001-04-05 19:41:23 +00002251=item B<usleep>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002252
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002253usleep N
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002254
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002255Pause for N microseconds.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002256
2257Example:
2258
John Beppue708cb52001-03-15 21:08:01 +00002259 $ usleep 1000000
2260 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00002261
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002262-------------------------------
2263
John Beppu5bca0af2001-04-05 19:41:23 +00002264=item B<uudecode>
Eric Andersen028fb622000-07-04 20:07:13 +00002265
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002266uudecode [FILE]...
2267
2268Uudecode a file that is uuencoded.
2269
2270Options:
2271
John Beppu5bca0af2001-04-05 19:41:23 +00002272 -o FILE direct output to FILE
2273
2274Example:
2275
2276 $ uudecode -o busybox busybox.uu
2277 $ ls -l busybox
2278 -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
2279
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002280
2281-------------------------------
2282
John Beppu5bca0af2001-04-05 19:41:23 +00002283=item B<uuencode>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002284
2285uuencode [OPTION] [INFILE] REMOTEFILE
Eric Andersen028fb622000-07-04 20:07:13 +00002286
2287Uuencode a file.
2288
2289Options:
2290
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002291 -m use base64 encoding as of RFC1521
Eric Andersen028fb622000-07-04 20:07:13 +00002292
2293Example:
2294
John Beppue708cb52001-03-15 21:08:01 +00002295 $ uuencode busybox busybox
2296 begin 755 busybox
2297 <encoded file snipped>
2298 $ uudecode busybox busybox > busybox.uu
2299 $
Eric Andersen028fb622000-07-04 20:07:13 +00002300
2301-------------------------------
2302
John Beppu79359d82001-04-05 20:03:33 +00002303=item B<vi>
2304
2305vi [OPTION] [FILE]...
2306
2307edit FILE.
2308
2309Options:
2310
2311 -R Read-only- do not write to the file.
2312
2313-------------------------------
2314
John Beppu5bca0af2001-04-05 19:41:23 +00002315=item B<watchdog>
Eric Andersen028fb622000-07-04 20:07:13 +00002316
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002317watchdog DEV
Eric Andersen028fb622000-07-04 20:07:13 +00002318
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002319Periodically write to watchdog device DEV
Eric Andersen028fb622000-07-04 20:07:13 +00002320
2321-------------------------------
2322
John Beppu5bca0af2001-04-05 19:41:23 +00002323=item B<wc>
Eric Andersenffde8672001-01-25 23:40:32 +00002324
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002325wc [OPTION]... [FILE]...
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002326
2327Print line, word, and byte counts for each FILE, and a total line if
2328more than one FILE is specified. With no FILE, read standard input.
2329
2330Options:
2331
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002332 -c print the byte counts
2333 -l print the newline counts
2334 -L print the length of the longest line
2335 -w print the word counts
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002336
2337Example:
2338
John Beppue708cb52001-03-15 21:08:01 +00002339 $ wc /etc/passwd
2340 31 46 1365 /etc/passwd
2341
Erik Andersen5e1189e2000-04-15 16:34:54 +00002342
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002343-------------------------------
2344
John Beppu5bca0af2001-04-05 19:41:23 +00002345=item B<wget>
Pavel Roskinafa06622000-06-21 21:43:24 +00002346
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002347wget [B<-c>] [B<-O> file] url
2348
Eric Andersen79757c92001-04-05 21:45:54 +00002349wget retrieves files via HTTP or FTP
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002350
2351Options:
2352
2353 -c continue retrieval of aborted transfers
Eric Andersen79757c92001-04-05 21:45:54 +00002354 -q quiet mode - do not print
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002355 -O save to filename ('-' for stdout)
2356
2357-------------------------------
2358
John Beppu5bca0af2001-04-05 19:41:23 +00002359=item B<which>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002360
2361which [COMMAND ...]
Pavel Roskinafa06622000-06-21 21:43:24 +00002362
2363Locates a COMMAND.
2364
2365Example:
2366
John Beppue708cb52001-03-15 21:08:01 +00002367 $ which login
2368 /bin/login
Pavel Roskinafa06622000-06-21 21:43:24 +00002369
2370-------------------------------
2371
John Beppu5bca0af2001-04-05 19:41:23 +00002372=item B<whoami>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002373
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002374whoami
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002375
2376Prints the user name associated with the current effective user id.
2377
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002378-------------------------------
2379
John Beppu5bca0af2001-04-05 19:41:23 +00002380=item B<xargs>
Eric Andersen5b176932000-09-22 20:22:28 +00002381
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002382xargs [COMMAND] [ARGS...]
Eric Andersen5b176932000-09-22 20:22:28 +00002383
2384Executes COMMAND on every item given by standard input.
2385
Eric Andersen5b176932000-09-22 20:22:28 +00002386Example:
2387
John Beppue708cb52001-03-15 21:08:01 +00002388 $ ls | xargs gzip
2389 $ find . -name '*.c' -print | xargs rm
2390
Eric Andersen5b176932000-09-22 20:22:28 +00002391
2392-------------------------------
2393
John Beppu5bca0af2001-04-05 19:41:23 +00002394=item B<yes>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002395
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002396yes [OPTION]... [STRING]...
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002397
John Beppue708cb52001-03-15 21:08:01 +00002398Repeatedly outputs a line with all specified STRING(s), or 'y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00002399
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002400-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00002401
John Beppu5bca0af2001-04-05 19:41:23 +00002402=item B<zcat>
John Beppu46a4e762000-01-18 22:33:11 +00002403
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002404zcat FILE
2405
2406Uncompress to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00002407
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002408-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002409
Erik Andersena19bc642000-05-02 06:40:02 +00002410=head1 LIBC NSS
2411
2412GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
2413library for the local environment, and to configure how it reads system data,
2414such as passwords and group information. BusyBox has made it Policy that it
2415will never use NSS, and will never use and libc calls that make use of NSS.
2416This allows you to run an embedded system without the need for installing an
2417/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
2418
2419If you are using a system that is using a remote LDAP server for authentication
2420via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
2421BusyBox source. Chances are though, that if you have enough space to install
2422of that stuff on your system, then you probably want the full GNU utilities.
2423
John Beppu3a1b6be2000-01-18 15:45:59 +00002424=head1 SEE ALSO
2425
2426textutils(1), shellutils(1), etc...
2427
2428=head1 MAINTAINER
2429
Erik Andersen1101d232000-04-19 05:15:12 +00002430Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002431
2432=head1 AUTHORS
2433
John Beppu08fe43d2000-01-19 12:39:16 +00002434The following people have contributed code to BusyBox whether
2435they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00002436
John Beppu3a1b6be2000-01-18 15:45:59 +00002437
John Beppu08fe43d2000-01-19 12:39:16 +00002438=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002439
Eric Andersen57f83ff2000-09-24 02:41:44 +00002440Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
2441
2442 Tons of new stuff, major rewrite of most of the
2443 core apps, tons of new apps as noted in header files.
2444
2445=for html <br>
2446
2447Edward Betts <edward@debian.org>
2448
2449 expr, hostid, logname, tty, wc, whoami, yes
2450
2451=for html <br>
2452
John Beppu08fe43d2000-01-19 12:39:16 +00002453John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002454
Eric Andersen57f83ff2000-09-24 02:41:44 +00002455 du, head, nslookup, sort, tee, uniq
2456
John Beppu08fe43d2000-01-19 12:39:16 +00002457=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002458
John Beppu08fe43d2000-01-19 12:39:16 +00002459Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002460
Eric Andersen57f83ff2000-09-24 02:41:44 +00002461 tiny-ls(ls)
2462
John Beppu08fe43d2000-01-19 12:39:16 +00002463=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002464
John Beppu08fe43d2000-01-19 12:39:16 +00002465Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00002466
Eric Andersen57f83ff2000-09-24 02:41:44 +00002467 fbset, ping, hostname, and mkfifo
2468
John Beppu08fe43d2000-01-19 12:39:16 +00002469=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002470
John Beppu08fe43d2000-01-19 12:39:16 +00002471Dave Cinege <dcinege@psychosis.com>
2472
Eric Andersen57f83ff2000-09-24 02:41:44 +00002473 more(v2), makedevs, dutmp, modularization, auto links file,
2474 various fixes, Linux Router Project maintenance
2475
John Beppu08fe43d2000-01-19 12:39:16 +00002476=for html <br>
2477
John Beppu50ed0672000-04-13 23:44:04 +00002478Karl M. Hegbloom <karlheg@debian.org>
2479
Eric Andersen57f83ff2000-09-24 02:41:44 +00002480 cp_mv.c, the test suite, various fixes to utility.c, &c.
2481
2482=for html <br>
2483
2484Daniel Jacobowitz <dan@debian.org>
2485
2486 mktemp.c
2487
2488=for html <br>
2489
2490Matt Kraai <kraai@alumni.carnegiemellon.edu>
2491
2492 documentation, bugfixes
2493
John Beppu50ed0672000-04-13 23:44:04 +00002494=for html <br>
2495
John Beppu4fd10fc2000-04-17 05:13:59 +00002496John Lombardo <john@deltanet.com>
2497
Eric Andersen57f83ff2000-09-24 02:41:44 +00002498 dirname, tr
2499
John Beppu4fd10fc2000-04-17 05:13:59 +00002500=for html <br>
2501
Eric Andersen86ab8a32000-06-02 03:21:42 +00002502Glenn McGrath <bug1@netconnect.com.au>
2503
Eric Andersen57f83ff2000-09-24 02:41:44 +00002504 ar.c
2505
Eric Andersen86ab8a32000-06-02 03:21:42 +00002506=for html <br>
2507
Eric Andersen57f83ff2000-09-24 02:41:44 +00002508Bruce Perens <bruce@pixar.com>
2509
2510 Original author of BusyBox. His code is still in many apps.
2511
2512=for html <br>
2513
2514Chip Rosenthal <chip@unicom.com>, <crosenth@covad.com>
2515
2516 wget - Contributed by permission of Covad Communications
John Beppu08fe43d2000-01-19 12:39:16 +00002517
2518=for html <br>
2519
Pavel Roskin339b8922000-06-20 00:11:07 +00002520Pavel Roskin <proski@gnu.org>
Eric Andersen08e92892000-06-02 03:21:36 +00002521
Eric Andersen57f83ff2000-09-24 02:41:44 +00002522 Lots of bugs fixes and patches.
2523
2524=for html <br>
2525
2526Gyepi Sam <gyepi@praxis-sw.com>
2527
2528 Remote logging feature for syslogd
2529
Eric Andersen08e92892000-06-02 03:21:36 +00002530=for html <br>
2531
John Beppu08fe43d2000-01-19 12:39:16 +00002532Linus Torvalds <torvalds@transmeta.com>
2533
Eric Andersen57f83ff2000-09-24 02:41:44 +00002534 mkswap, fsck.minix, mkfs.minix
2535
John Beppu08fe43d2000-01-19 12:39:16 +00002536=for html <br>
2537
John Beppu2aee9932000-09-15 08:04:42 +00002538Mark Whitley <markw@lineo.com>
2539
Eric Andersen57f83ff2000-09-24 02:41:44 +00002540 sed remix, bug fixes, style-guide, etc.
2541
John Beppu2aee9932000-09-15 08:04:42 +00002542=for html <br>
2543
John Beppu08fe43d2000-01-19 12:39:16 +00002544Charles P. Wright <cpwright@villagenet.com>
2545
Eric Andersen57f83ff2000-09-24 02:41:44 +00002546 gzip, mini-netcat(nc)
2547
John Beppu08fe43d2000-01-19 12:39:16 +00002548=for html <br>
2549
2550Enrique Zanardi <ezanardi@ull.es>
2551
Eric Andersen57f83ff2000-09-24 02:41:44 +00002552 tarcat (since removed), loadkmap, various fixes, Debian maintenance
John Beppu3a1b6be2000-01-18 15:45:59 +00002553
2554=cut
John Beppu08fe43d2000-01-19 12:39:16 +00002555
Eric Andersen79757c92001-04-05 21:45:54 +00002556# $Id: busybox.pod,v 1.96 2001/04/05 21:45:54 andersen Exp $