blob: cdf96bcc9d650388468a9ca5a50761120ccf346f [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
634 geometry 1024 768 1024 768 16
635 timings 12714 128 32 16 4 128 4
636 accel false
637 rgba 5/11,6/5,5/0,0/0
638 endmode
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000639
640-------------------------------
641
John Beppu5bca0af2001-04-05 19:41:23 +0000642=item B<fdflush>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000643
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000644fdflush DEVICE
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000645
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000646Forces floppy disk drive to detect disk change
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000647
648-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000649
John Beppu5bca0af2001-04-05 19:41:23 +0000650=item B<find>
John Beppu46a4e762000-01-18 22:33:11 +0000651
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000652find [PATH...] [EXPRESSION]
John Beppu4581b4c2000-01-19 15:04:41 +0000653
654Search for files in a directory hierarchy. The default PATH is
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000655the current directory; default EXPRESSION is 'B<-print>'
John Beppu4581b4c2000-01-19 15:04:41 +0000656
Erik Andersen62dc17a2000-04-13 01:18:23 +0000657EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000658
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000659 -follow Dereference symbolic links.
John Beppu5bca0af2001-04-05 19:41:23 +0000660 -name PATTERN File name (leading directories removed) matches PATTERN. -print Print (default and assumed).
661
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000662 -type X Filetype matches X (where X is one of: f,d,l,b,c,...)
663 -perm PERMS Permissions match any of (+NNN); all of (-NNN);
664 or exactly (NNN)
665 -mtime TIME Modified time is greater than (+N); less than (-N);
666 or exactly (N) days
Erik Andersen62dc17a2000-04-13 01:18:23 +0000667
668Example:
669
John Beppue708cb52001-03-15 21:08:01 +0000670 $ find / -name /etc/passwd
671 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000672
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000673-------------------------------
674
John Beppu5bca0af2001-04-05 19:41:23 +0000675=item B<free>
John Beppu46a4e762000-01-18 22:33:11 +0000676
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000677free
John Beppu4581b4c2000-01-19 15:04:41 +0000678
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000679Displays the amount of free and used system memory
Erik Andersen62dc17a2000-04-13 01:18:23 +0000680
681Example:
682
John Beppue708cb52001-03-15 21:08:01 +0000683 $ free
684 total used free shared buffers
685 Mem: 257628 248724 8904 59644 93124
686 Swap: 128516 8404 120112
687 Total: 386144 257128 129016
688
Erik Andersen62dc17a2000-04-13 01:18:23 +0000689
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000690-------------------------------
691
John Beppu5bca0af2001-04-05 19:41:23 +0000692=item B<freeramdisk>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000693
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000694freeramdisk DEVICE
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000695
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000696Frees all memory used by the specified ramdisk.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000697
698Example:
699
John Beppue708cb52001-03-15 21:08:01 +0000700 $ freeramdisk /dev/ram2
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000701
702-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000703
John Beppu5bca0af2001-04-05 19:41:23 +0000704=item B<fsck_minix>
John Beppu46a4e762000-01-18 22:33:11 +0000705
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000706fsck_minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000707
708Performs a consistency check for MINIX filesystems.
709
Eric Andersen2086e3d2000-07-04 22:17:01 +0000710Options:
John Beppuf17792c2000-04-13 03:16:01 +0000711
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000712 -l Lists all filenames
713 -r Perform interactive repairs
714 -a Perform automatic repairs
715 -v verbose
716 -s Outputs super-block information
717 -m Activates MINIX-like mode not cleared warnings
718 -f Force file system check.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000719
720-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000721
John Beppu5bca0af2001-04-05 19:41:23 +0000722=item B<getopt>
Eric Andersena1f16bb2000-08-21 22:02:34 +0000723
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000724getopt [OPTIONS]...
Eric Andersena1f16bb2000-08-21 22:02:34 +0000725
726Parse command options
727
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000728 -a, --alternative Allow long options starting with single -
729 -l, --longoptions=longopts Long options to be recognized
730 -n, --name=progname The name under which errors are reported
731 -o, --options=optstring Short options to be recognized
732 -q, --quiet Disable error reporting by getopt(3)
733 -Q, --quiet-output No normal output
734 -s, --shell=shell Set shell quoting conventions
735 -T, --test Test for getopt(1) version
736 -u, --unqote Do not quote the output
Eric Andersena1f16bb2000-08-21 22:02:34 +0000737
738Example:
Eric Andersene4c4d692000-08-21 23:29:45 +0000739
John Beppue708cb52001-03-15 21:08:01 +0000740 $ cat getopt.test
741 GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
742 -n 'example.busybox' -- $@`
743 if [ $? != 0 ] ; then exit 1 ; fi
744 eval set -- $GETOPT
745 while true ; do
746 case $1 in
747 -a|--a-long) echo Option a ; shift ;;
748 -b|--b-long) echo Option b, argument `$2' ; shift 2 ;;
749 -c|--c-long)
750 case $2 in
751 \) echo Option c, no argument; shift 2 ;;
752 *) echo Option c, argument `$2' ; shift 2 ;;
753 esac ;;
754 --) shift ; break ;;
755 *) echo Internal error! ; exit 1 ;;
756 esac
757 done
Eric Andersena1f16bb2000-08-21 22:02:34 +0000758
759-------------------------------
760
John Beppu5bca0af2001-04-05 19:41:23 +0000761=item B<grep>
John Beppu46a4e762000-01-18 22:33:11 +0000762
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000763grep [B<-ihHnqvs>] pattern [files...]
John Beppu4581b4c2000-01-19 15:04:41 +0000764
Erik Andersen62dc17a2000-04-13 01:18:23 +0000765Search for PATTERN in each FILE or standard input.
766
Eric Andersen2086e3d2000-07-04 22:17:01 +0000767Options:
John Beppuf17792c2000-04-13 03:16:01 +0000768
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000769 -H prefix output lines with filename where match was found
770 -h suppress the prefixing filename on output
771 -i ignore case distinctions
772 -n print line number with output lines
773 -q be quiet. Returns 0 if result was found, 1 otherwise
774 -v select non-matching lines
775 -s suppress file open/read error messages
Erik Andersen62dc17a2000-04-13 01:18:23 +0000776
Erik Andersen62dc17a2000-04-13 01:18:23 +0000777Example:
778
John Beppue708cb52001-03-15 21:08:01 +0000779 $ grep root /etc/passwd
780 root:x:0:0:root:/root:/bin/bash
781 $ grep ^[rR]oo. /etc/passwd
782 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000783
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000784-------------------------------
785
John Beppu5bca0af2001-04-05 19:41:23 +0000786=item B<gunzip>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000787
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000788gunzip [OPTION]... FILE
Erik Andersen5e1189e2000-04-15 16:34:54 +0000789
790Uncompress FILE (or standard input if FILE is '-').
791
792Options:
793
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000794 -c Write output to standard output
795 -t Test compressed file integrity
Erik Andersen5e1189e2000-04-15 16:34:54 +0000796
797Example:
798
John Beppue708cb52001-03-15 21:08:01 +0000799 $ ls -la /tmp/BusyBox*
800 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
801 $ gunzip /tmp/BusyBox-0.43.tar.gz
802 $ ls -la /tmp/BusyBox*
803 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000804
805-------------------------------
806
John Beppu5bca0af2001-04-05 19:41:23 +0000807=item B<gzip>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000808
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000809gzip [OPTION]... FILE
Erik Andersen5e1189e2000-04-15 16:34:54 +0000810
811Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000812When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000813
814Options:
815
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000816 -c Write output to standard output instead of FILE.gz
817 -d decompress
Erik Andersen5e1189e2000-04-15 16:34:54 +0000818
819Example:
820
John Beppue708cb52001-03-15 21:08:01 +0000821 $ ls -la /tmp/BusyBox*
822 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
823 $ gzip /tmp/BusyBox-0.43.tar
824 $ ls -la /tmp/BusyBox*
825 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000826
827-------------------------------
828
John Beppu5bca0af2001-04-05 19:41:23 +0000829=item B<halt>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000830
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000831halt
Erik Andersen5e1189e2000-04-15 16:34:54 +0000832
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000833Halt the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000834
835-------------------------------
836
John Beppu5bca0af2001-04-05 19:41:23 +0000837=item B<head>
John Beppu46a4e762000-01-18 22:33:11 +0000838
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000839head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000840
841Print first 10 lines of each FILE to standard output.
842With more than one FILE, precede each with a header giving the
843file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000844
845Options:
John Beppuf17792c2000-04-13 03:16:01 +0000846
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000847 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000848
849Example:
850
John Beppue708cb52001-03-15 21:08:01 +0000851 $ head -n 2 /etc/passwd
852 root:x:0:0:root:/root:/bin/bash
853 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000854
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000855-------------------------------
856
John Beppu5bca0af2001-04-05 19:41:23 +0000857=item B<hostid>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000858
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000859hostid
Erik Andersen5e1189e2000-04-15 16:34:54 +0000860
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000861Print out a unique 32-bit identifier for the machine.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000862
863-------------------------------
864
John Beppu5bca0af2001-04-05 19:41:23 +0000865=item B<hostname>
John Beppu46a4e762000-01-18 22:33:11 +0000866
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000867hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000868
John Beppu4581b4c2000-01-19 15:04:41 +0000869Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000870(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000871
Erik Andersen62dc17a2000-04-13 01:18:23 +0000872Options:
John Beppuf17792c2000-04-13 03:16:01 +0000873
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000874 -s Short
875 -i Addresses for the hostname
876 -d DNS domain name
877 -F, --file FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000878
879Example:
880
John Beppue708cb52001-03-15 21:08:01 +0000881 $ hostname
882 slag
John Beppu46a4e762000-01-18 22:33:11 +0000883
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000884-------------------------------
885
John Beppu5bca0af2001-04-05 19:41:23 +0000886=item B<id>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000887
888id [OPTIONS]... [USERNAME]
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000889
890Print information for USERNAME or the current user
891
892Options:
893
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000894 -g prints only the group ID
895 -u prints only the user ID
896 -n print a name instead of a number (with for -ug)
897 -r prints the real user ID instead of the effective ID (with -ug)
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000898
899Example:
900
John Beppue708cb52001-03-15 21:08:01 +0000901 $ id
902 uid=1000(andersen) gid=1000(andersen)
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000903
904-------------------------------
905
John Beppu5bca0af2001-04-05 19:41:23 +0000906=item B<ifconfig>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000907
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000908ifconfig [B<-a>] <interface> [<address>]
909
910configure a network interface
911
912Options:
913
914 [[-]broadcast [<address>]] [[-]pointopoint [<address>]]
915 [netmask <address>] [dstaddr <address>]
916 [outfill <NN>] [keepalive <NN>]
917 [hw ether <address>] [metric <NN>] [mtu <NN>]
918 [[-]trailers] [[-]arp] [[-]allmulti]
919 [multicast] [[-]promisc] [txqueuelen <NN>] [[-]dynamic]
920 [mem_start <NN>] [io_addr <NN>] [irq <NN>]
921 [up|down] ...
922
923-------------------------------
924
John Beppu5bca0af2001-04-05 19:41:23 +0000925=item B<init>
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000926
927init
Erik Andersen5e1189e2000-04-15 16:34:54 +0000928
929Init is the parent of all processes.
930
931This version of init is designed to be run only by the kernel.
932
933BusyBox init doesn't support multiple runlevels. The runlevels field of
934the /etc/inittab file is completely ignored by BusyBox init. If you want
935runlevels, use sysvinit.
936
937BusyBox init works just fine without an inittab. If no inittab is found,
938it has the following default behavior:
939
940 ::sysinit:/etc/init.d/rcS
941 ::askfirst:/bin/sh
942
943if it detects that /dev/console is _not_ a serial console, it will also run:
944
945 tty2::askfirst:/bin/sh
946
947If you choose to use an /etc/inittab file, the inittab entry format is as follows:
948
949 <id>:<runlevels>:<action>:<process>
950
951 <id>:
952
953 WARNING: This field has a non-traditional meaning for BusyBox init!
954 The id field is used by BusyBox init to specify the controlling tty for
955 the specified process to run on. The contents of this field are
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000956 appended to /dev/ and used as-is. There is no need for this field to
Erik Andersen5e1189e2000-04-15 16:34:54 +0000957 be unique, although if it isn't you may have strange results. If this
Eric Andersen0d2acb02000-12-18 20:36:02 +0000958 field is left blank, the controlling tty is set to the console. Also
959 note that if BusyBox detects that a serial console is in use, then only
960 entries whose controlling tty is either the serial console or /dev/null
961 will be run. BusyBox init does nothing with utmp. We don't need no
962 stinkin' utmp.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000963
964 <runlevels>:
965
966 The runlevels field is completely ignored.
967
968 <action>:
969
970 Valid actions include: sysinit, respawn, askfirst, wait,
John Beppu5bca0af2001-04-05 19:41:23 +0000971 once, and ctrlaltdel.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000972
Eric Anderseneb4218d2000-12-08 20:38:00 +0000973 The available actions can be classified into two groups: actions
974 that are run only once, and actions that are re-run when the specified
975 process exits.
976
977 Run only-once actions:
978
979 'sysinit' is the first item run on boot. init waits until all
980 sysinit actions are completed before continuing. Following the
981 completion of all sysinit actions, all 'wait' actions are run.
982 'wait' actions, like 'sysinit' actions, cause init to wait until
983 the specified task completes. 'once' actions are asyncronous,
984 therefore, init does not wait for them to complete. 'ctrlaltdel'
John Beppu5bca0af2001-04-05 19:41:23 +0000985 actions are run immediately before init causes the system to reboot
986 (unmounting filesystems with a 'ctrlaltdel' action is a very good
987 idea).
Eric Anderseneb4218d2000-12-08 20:38:00 +0000988
989 Run repeatedly actions:
990
991 'respawn' actions are run after the 'once' actions. When a process
992 started with a 'respawn' action exits, init automatically restarts
993 it. Unlike sysvinit, BusyBox init does not stop processes from
994 respawning out of control. The 'askfirst' actions acts just like
995 respawn, except that before running the specified process it
Eric Andersen0d3a02e2001-03-15 18:14:25 +0000996 displays the line Please press Enter to activate this console.
Eric Anderseneb4218d2000-12-08 20:38:00 +0000997 and then waits for the user to press enter before starting the
998 specified process.
999
1000 Unrecognized actions (like initdefault) will cause init to emit an
1001 error message, and then go along with its business. All actions are
1002 run in the reverse order from how they appear in /etc/inittab.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001003
1004 <process>:
1005
1006 Specifies the process to be executed and it's command line.
1007
Erik Andersen5e1189e2000-04-15 16:34:54 +00001008Example /etc/inittab file:
Mark Whitleyf71378c2001-03-15 21:20:25 +00001009
Erik Andersen5e1189e2000-04-15 16:34:54 +00001010 ::sysinit:/etc/init.d/rcS
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001011
John Beppu5bca0af2001-04-05 19:41:23 +00001012 ::askfirst:-/bin/sh
1013 tty2::askfirst:-/bin/sh
Pavel Roskinc9db2e82000-09-15 17:24:13 +00001014 tty3::askfirst:-/bin/sh
1015 tty4::askfirst:-/bin/sh
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001016
Pavel Roskinc9db2e82000-09-15 17:24:13 +00001017 tty4::respawn:/sbin/getty 38400 tty5
1018 tty5::respawn:/sbin/getty 38400 tty6
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001019
John Beppu5bca0af2001-04-05 19:41:23 +00001020
1021
1022 ::ctrlaltdel:/bin/umount -a -r
1023 ::ctrlaltdel:/sbin/swapoff -a
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001024
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001025
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001026-------------------------------
1027
John Beppu5bca0af2001-04-05 19:41:23 +00001028=item B<insmod>
Eric Andersenfeb47c02000-06-21 21:03:13 +00001029
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001030insmod [OPTION]... MODULE [symbol=value]...
Eric Andersenfeb47c02000-06-21 21:03:13 +00001031
1032Loads the specified kernel modules into the kernel.
1033
1034Options:
1035
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001036 -f Force module to load into the wrong kernel version.
1037 -k Make module autoclean-able.
1038 -v verbose output
1039 -L Lock to prevent simultaneous loads of a module
1040 -x do not export externs
Eric Andersenfeb47c02000-06-21 21:03:13 +00001041
1042-------------------------------
1043
John Beppu5bca0af2001-04-05 19:41:23 +00001044=item B<kill>
John Beppu46a4e762000-01-18 22:33:11 +00001045
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001046kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +00001047
Erik Andersen62dc17a2000-04-13 01:18:23 +00001048Send a signal (default is SIGTERM) to the specified process(es).
1049
1050Options:
John Beppuf17792c2000-04-13 03:16:01 +00001051
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001052 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +00001053
1054Example:
1055
John Beppue708cb52001-03-15 21:08:01 +00001056 $ ps | grep apache
1057 252 root root S [apache]
1058 263 www-data www-data S [apache]
1059 264 www-data www-data S [apache]
1060 265 www-data www-data S [apache]
1061 266 www-data www-data S [apache]
1062 267 www-data www-data S [apache]
1063 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +00001064
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001065-------------------------------
1066
John Beppu5bca0af2001-04-05 19:41:23 +00001067=item B<killall>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001068
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001069killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001070
1071Send a signal (default is SIGTERM) to the specified process(es).
1072
1073Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001074
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001075 -l List all signal names and numbers.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001076
1077Example:
1078
John Beppue708cb52001-03-15 21:08:01 +00001079 $ killall apache
1080
Erik Andersen5e1189e2000-04-15 16:34:54 +00001081
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001082-------------------------------
1083
John Beppu5bca0af2001-04-05 19:41:23 +00001084=item B<klogd>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001085
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001086klogd B<-n>
1087
1088Kernel logger.
1089Options:
1090
1091 -n Run as a foreground process.
1092
1093-------------------------------
1094
John Beppu5bca0af2001-04-05 19:41:23 +00001095=item B<length>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001096
1097length STRING
Erik Andersen5e1189e2000-04-15 16:34:54 +00001098
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001099Prints out the length of the specified STRING.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001100
1101Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001102
John Beppue708cb52001-03-15 21:08:01 +00001103 $ length Hello
1104 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001105
1106-------------------------------
1107
John Beppu5bca0af2001-04-05 19:41:23 +00001108=item B<ln>
John Beppu46a4e762000-01-18 22:33:11 +00001109
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001110ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +00001111
John Beppu4581b4c2000-01-19 15:04:41 +00001112Create a link named LINK_NAME or DIRECTORY to the specified TARGET
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001113
Eric Andersenaddc9c22000-06-21 22:53:24 +00001114You may use '--' to indicate that all following arguments are non-options.
Pavel Roskin1a804e42000-06-21 21:38:00 +00001115
John Beppu4581b4c2000-01-19 15:04:41 +00001116Options:
1117
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001118 -s make symbolic links instead of hard links
1119 -f remove existing destination files
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001120 -n no dereference symlinks - treat like normal file
Pavel Roskin1a804e42000-06-21 21:38:00 +00001121
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001122Example:
1123
John Beppue708cb52001-03-15 21:08:01 +00001124 $ ln -s BusyBox /tmp/ls
1125 $ ls -l /tmp/ls
1126 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
1127
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001128
1129-------------------------------
1130
John Beppu5bca0af2001-04-05 19:41:23 +00001131=item B<loadacm>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001132
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001133loadacm < mapfile
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001134
1135Loads an acm from standard input.
1136
1137Example:
1138
John Beppue708cb52001-03-15 21:08:01 +00001139 $ loadacm < /etc/i18n/acmname
1140
Erik Andersen5e1189e2000-04-15 16:34:54 +00001141
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001142-------------------------------
1143
John Beppu5bca0af2001-04-05 19:41:23 +00001144=item B<loadfont>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001145
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001146loadfont < font
Erik Andersena6c75222000-04-18 00:00:52 +00001147
1148Loads a console font from standard input.
1149
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001150Example:
1151
John Beppue708cb52001-03-15 21:08:01 +00001152 $ loadfont < /etc/i18n/fontname
1153
Erik Andersen5e1189e2000-04-15 16:34:54 +00001154
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001155-------------------------------
1156
John Beppu5bca0af2001-04-05 19:41:23 +00001157=item B<loadkmap>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001158
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001159loadkmap < keymap
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001160
1161Loads a binary keyboard translation table from standard input.
1162
1163Example:
1164
John Beppue708cb52001-03-15 21:08:01 +00001165 $ loadkmap < /etc/i18n/lang-keymap
1166
Erik Andersen5e1189e2000-04-15 16:34:54 +00001167
1168-------------------------------
1169
John Beppu5bca0af2001-04-05 19:41:23 +00001170=item B<logger>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001171
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001172logger [OPTION]... [MESSAGE]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001173
Matt Kraai004827d2001-01-02 22:54:12 +00001174Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001175
1176Options:
1177
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001178 -s Log to stderr as well as the system log.
1179 -t Log using the specified tag (defaults to user name).
1180 -p Enter the message with the specified priority.
1181 This may be numerical or a ``facility.level'' pair.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001182
1183Example:
1184
John Beppue708cb52001-03-15 21:08:01 +00001185 $ logger hello
1186
Erik Andersen5e1189e2000-04-15 16:34:54 +00001187
1188-------------------------------
1189
John Beppu5bca0af2001-04-05 19:41:23 +00001190=item B<logname>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001191
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001192logname
Erik Andersen5e1189e2000-04-15 16:34:54 +00001193
1194Print the name of the current user.
1195
1196Example:
1197
John Beppue708cb52001-03-15 21:08:01 +00001198 $ logname
1199 root
1200
Erik Andersen5e1189e2000-04-15 16:34:54 +00001201
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001202-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001203
John Beppu5bca0af2001-04-05 19:41:23 +00001204=item B<logread>
John Beppu46a4e762000-01-18 22:33:11 +00001205
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001206logread
1207
1208Shows the messages from syslogd (using circular buffer).
1209
1210-------------------------------
1211
John Beppu5bca0af2001-04-05 19:41:23 +00001212=item B<ls>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001213
1214ls [B<-1AacCdeFilnpLRrSsTtuvwxXhk>] [filenames...]
1215
1216List directory contents
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001217
1218Options:
1219
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001220 -1 list files in a single column
1221 -A do not list implied . and ..
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001222 -a do not hide entries starting with .
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001223 -C list entries by columns
1224 -c with -l: show ctime
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001225 -d list directory entries instead of contents
1226 -e list both full date and full time
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001227 -F append indicator (one of */=@|) to entries
1228 -i list the i-node for each file
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001229 -l use a long listing format
1230 -n list numeric UIDs and GIDs instead of names
1231 -p append indicator (one of /=@|) to entries
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001232 -L list entries pointed to by symbolic links
1233 -R list subdirectories recursively
1234 -r sort the listing in reverse order
1235 -S sort the listing by file size
1236 -s list the size of each file, in blocks
1237 -T NUM assume Tabstop every NUM columns
1238 -t with -l: show modification time
1239 -u with -l: show access time
1240 -v sort the listing by version
1241 -w NUM assume the terminal is NUM columns wide
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001242 -x list entries by lines instead of by columns
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001243 -X sort the listing by extension
1244 -h print sizes in human readable format (e.g., 1K 243M 2G )
1245 -k print sizes in kilobytes(default)
John Beppu50ed0672000-04-13 23:44:04 +00001246
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001247-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001248
John Beppu5bca0af2001-04-05 19:41:23 +00001249=item B<lsmod>
John Beppu46a4e762000-01-18 22:33:11 +00001250
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001251lsmod
John Beppu4581b4c2000-01-19 15:04:41 +00001252
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001253List the currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001254
1255-------------------------------
1256
John Beppu5bca0af2001-04-05 19:41:23 +00001257=item B<makedevs>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001258
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001259makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001260
1261Creates a range of block or character special files
1262
1263TYPEs include:
1264
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001265 b: Make a block (buffered) device.
1266 c or u: Make a character (un-buffered) device.
1267 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001268
1269FIRST specifies the number appended to NAME to create the first device.
1270LAST specifies the number of the last item that should be created.
1271If 's' is the last argument, the base device is created as well.
1272
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001273For example:
1274
1275 makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63
1276 makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8
1277
Erik Andersen5e1189e2000-04-15 16:34:54 +00001278Example:
1279
John Beppue708cb52001-03-15 21:08:01 +00001280 $ makedevs /dev/ttyS c 4 66 2 63
1281 [creates ttyS2-ttyS63]
1282 $ makedevs /dev/hda b 3 0 0 8 s
1283 [creates hda,hda1-hda8]
1284
Erik Andersen5e1189e2000-04-15 16:34:54 +00001285
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001286-------------------------------
1287
John Beppu5bca0af2001-04-05 19:41:23 +00001288=item B<md5sum>
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001289
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001290md5sum [OPTION] [FILE]...
1291or: md5sum [OPTION] B<-c> [FILE]
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001292
1293Print or check MD5 checksums.
1294
1295Options:
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001296With no FILE, or when FILE is -, read standard input.
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001297
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001298 -b read files in binary mode
1299 -c check MD5 sums against given list
1300 -t read files in text mode (default)
1301 -g read a string
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001302
1303The following two options are useful only when verifying checksums:
1304
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001305 -s don't output anything, status code shows success
1306 -w warn about improperly formated MD5 checksum lines
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001307
1308Example:
1309
John Beppue708cb52001-03-15 21:08:01 +00001310 $ md5sum < busybox
1311 6fd11e98b98a58f64ff3398d7b324003
1312 $ md5sum busybox
1313 6fd11e98b98a58f64ff3398d7b324003 busybox
1314 $ md5sum -c -
1315 6fd11e98b98a58f64ff3398d7b324003 busybox
1316 busybox: OK
1317 ^D
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001318
1319-------------------------------
1320
John Beppu5bca0af2001-04-05 19:41:23 +00001321=item B<mkdir>
John Beppu46a4e762000-01-18 22:33:11 +00001322
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001323mkdir [OPTION] DIRECTORY...
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001324
John Beppu4581b4c2000-01-19 15:04:41 +00001325Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001326
John Beppu4581b4c2000-01-19 15:04:41 +00001327Options:
1328
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001329 -m set permission mode (as in chmod), not rwxrwxrwx - umask
1330 -p no error if existing, make parent directories as needed
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001331
1332Example:
1333
John Beppue708cb52001-03-15 21:08:01 +00001334 $ mkdir /tmp/foo
1335 $ mkdir /tmp/foo
1336 /tmp/foo: File exists
1337 $ mkdir /tmp/foo/bar/baz
1338 /tmp/foo/bar/baz: No such file or directory
1339 $ mkdir -p /tmp/foo/bar/baz
1340
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001341
1342-------------------------------
1343
John Beppu5bca0af2001-04-05 19:41:23 +00001344=item B<mkfifo>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001345
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001346mkfifo [OPTIONS] name
Erik Andersen5e1189e2000-04-15 16:34:54 +00001347
1348Creates a named pipe (identical to 'mknod name p')
1349
1350Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001351
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001352 -m create the pipe using the specified mode (default a=rw)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001353
1354-------------------------------
1355
John Beppu5bca0af2001-04-05 19:41:23 +00001356=item B<mkfs_minix>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001357
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001358mkfs_minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001359
1360Make a MINIX filesystem.
1361
Eric Andersen2086e3d2000-07-04 22:17:01 +00001362Options:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001363
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001364 -c Check the device for bad blocks
1365 -n [14|30] Specify the maximum length of filenames
1366 -i INODES Specify the number of inodes for the filesystem
1367 -l FILENAME Read the bad blocks list from FILENAME
1368 -v Make a Minix version 2 filesystem
Erik Andersen5e1189e2000-04-15 16:34:54 +00001369
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001370-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001371
John Beppu5bca0af2001-04-05 19:41:23 +00001372=item B<mknod>
John Beppu46a4e762000-01-18 22:33:11 +00001373
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001374mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001375
Erik Andersen5e1189e2000-04-15 16:34:54 +00001376Create a special file (block, character, or pipe).
1377
1378Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001379
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001380 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001381
1382TYPEs include:
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001383
1384 b: Make a block (buffered) device.
1385 c or u: Make a character (un-buffered) device.
1386 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001387
1388Example:
1389
John Beppue708cb52001-03-15 21:08:01 +00001390 $ mknod /dev/fd0 b 2 0
1391 $ mknod -m 644 /tmp/pipe p
1392
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001393
1394-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001395
John Beppu5bca0af2001-04-05 19:41:23 +00001396=item B<mkswap>
John Beppu46a4e762000-01-18 22:33:11 +00001397
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001398mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001399
John Beppu4581b4c2000-01-19 15:04:41 +00001400Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001401
John Beppu4581b4c2000-01-19 15:04:41 +00001402Options:
1403
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001404 -c Check for read-ability.
1405 -v0 Make version 0 swap [max 128 Megs].
1406 -v1 Make version 1 swap [big!] (default for kernels >
1407 2.1.117).
1408 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001409
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001410-------------------------------
1411
John Beppu5bca0af2001-04-05 19:41:23 +00001412=item B<mktemp>
Erik Andersen227a59b2000-04-25 23:24:55 +00001413
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001414mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001415
1416Creates a temporary file with its name based on TEMPLATE.
1417TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1418
1419Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001420
John Beppue708cb52001-03-15 21:08:01 +00001421 $ mktemp /tmp/temp.XXXXXX
1422 /tmp/temp.mWiLjM
1423 $ ls -la /tmp/temp.mWiLjM
1424 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1425
Erik Andersen227a59b2000-04-25 23:24:55 +00001426
1427-------------------------------
1428
John Beppu5bca0af2001-04-05 19:41:23 +00001429=item B<more>
John Beppu46a4e762000-01-18 22:33:11 +00001430
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001431more [FILE ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001432
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001433More is a filter for viewing FILE one screenful at a time.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001434
1435Example:
1436
John Beppue708cb52001-03-15 21:08:01 +00001437 $ dmesg | more
1438
John Beppu50ed0672000-04-13 23:44:04 +00001439
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001440-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001441
John Beppu5bca0af2001-04-05 19:41:23 +00001442=item B<mount>
John Beppu46a4e762000-01-18 22:33:11 +00001443
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001444mount [flags] device directory [B<-o> options,more-options]
1445
1446Mount a filesystem
John Beppu4581b4c2000-01-19 15:04:41 +00001447
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001448Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001449
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001450 -a: Mount all filesystems in fstab.
1451 -f: Fake Add entry to mount table but don't mount it.
1452 -n: Don't write a mount table entry.
1453 -o option: One of many filesystem options, listed below.
1454 -r: Mount the filesystem read-only.
1455 -t fs-type: Specify the filesystem type.
1456 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001457
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001458Options for use with the B<-o> flag:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001459
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001460 async/sync: Writes are asynchronous / synchronous.
1461 atime/noatime: Enable / disable updates to inode access times.
1462 dev/nodev: Allow use of special device files / disallow them.
1463 exec/noexec: Allow use of executable files / disallow them.
1464 loop: Mounts a file via loop device.
1465 suid/nosuid: Allow set-user-id-root programs / disallow them.
1466 remount: Re-mount a mounted filesystem, changing its flags.
1467 ro/rw: Mount for read-only / read-write.
1468
1469There are EVEN MORE flags that are specific to each filesystem.
1470You'll have to see the written documentation for those.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001471
1472Example:
1473
John Beppue708cb52001-03-15 21:08:01 +00001474 $ mount
1475 /dev/hda3 on / type minix (rw)
1476 proc on /proc type proc (rw)
1477 devpts on /dev/pts type devpts (rw)
1478 $ mount /dev/fd0 /mnt -t msdos -o ro
1479 $ mount /tmp/diskimage /opt -t ext2 -o loop
1480
John Beppu50ed0672000-04-13 23:44:04 +00001481
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001482-------------------------------
1483
John Beppu5bca0af2001-04-05 19:41:23 +00001484=item B<mt>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001485
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001486mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001487
1488Control magnetic tape drive operation
1489
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001490Available Opcodes:
1491
1492bsf bsfm bsr bss datacompression drvbuffer eof eom erase
1493fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2
1494ras3 reset retension rew rewoffline seek setblk setdensity
1495setpart tell unload unlock weof wset
1496
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001497-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001498
John Beppu5bca0af2001-04-05 19:41:23 +00001499=item B<mv>
John Beppu46a4e762000-01-18 22:33:11 +00001500
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001501mv SOURCE DEST
1502or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001503
1504Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001505
1506Example:
1507
John Beppue708cb52001-03-15 21:08:01 +00001508 $ mv /tmp/foo /bin/bar
1509
John Beppu50ed0672000-04-13 23:44:04 +00001510
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001511-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001512
John Beppu5bca0af2001-04-05 19:41:23 +00001513=item B<nc>
Eric Andersen028fb622000-07-04 20:07:13 +00001514
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001515nc [IP] [port]
Eric Andersen028fb622000-07-04 20:07:13 +00001516
1517Netcat opens a pipe to IP:port
1518
1519Example:
1520
John Beppue708cb52001-03-15 21:08:01 +00001521 $ nc foobar.somedomain.com 25
1522 220 foobar ESMTP Exim 3.12 help
1523 214-Commands supported:
1524 214- HELO EHLO MAIL RCPT DATA AUTH
1525 214 NOOP QUIT RSET HELP
1526 quit
1527 221 foobar closing connection
1528
Eric Andersen028fb622000-07-04 20:07:13 +00001529
1530-------------------------------
1531
John Beppu5bca0af2001-04-05 19:41:23 +00001532=item B<nslookup>
John Beppu46a4e762000-01-18 22:33:11 +00001533
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001534nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001535
Erik Andersen5e1189e2000-04-15 16:34:54 +00001536Queries the nameserver for the IP address of the given HOST
1537
1538Example:
1539
John Beppue708cb52001-03-15 21:08:01 +00001540 $ nslookup localhost
1541 Server: default
1542 Address: default
1543
1544 Name: debian
1545 Address: 127.0.0.1
1546
John Beppu46a4e762000-01-18 22:33:11 +00001547
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001548-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001549
John Beppu5bca0af2001-04-05 19:41:23 +00001550=item B<ping>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001551
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001552ping [OPTION]... host
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001553
1554Send ICMP ECHO_REQUEST packets to network hosts.
1555
1556Options:
1557
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001558 -c COUNT Send only COUNT pings.
Pavel Roskin0024abc2000-06-07 20:38:15 +00001559 -s SIZE Send SIZE data bytes in packets (default=56).
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001560 -q Quiet mode, only displays output at start
1561 and when finished.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001562
1563Example:
1564
John Beppue708cb52001-03-15 21:08:01 +00001565 $ ping localhost
1566 PING slag (127.0.0.1): 56 data bytes
1567 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1568
1569 --- debian ping statistics ---
1570 1 packets transmitted, 1 packets received, 0% packet loss
1571 round-trip min/avg/max = 20.1/20.1/20.1 ms
1572
Erik Andersen5e1189e2000-04-15 16:34:54 +00001573
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001574-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001575
John Beppu5bca0af2001-04-05 19:41:23 +00001576=item B<pivot_root>
John Beppu46a4e762000-01-18 22:33:11 +00001577
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001578pivot_root new_root put_old
1579
1580Move the current root file system to put_old and make new_root
1581the new root file system.
1582
1583-------------------------------
1584
John Beppu5bca0af2001-04-05 19:41:23 +00001585=item B<poweroff>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001586
1587poweroff
1588
1589Halt the system and request that the kernel shut off the power.
1590
1591-------------------------------
1592
John Beppu5bca0af2001-04-05 19:41:23 +00001593=item B<printf>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001594
1595printf FORMAT [ARGUMENT...]
1596
1597Formats and prints ARGUMENT(s) according to FORMAT,
1598Where FORMAT controls the output exactly as in C printf.
1599
1600Example:
1601
John Beppue708cb52001-03-15 21:08:01 +00001602 $ printf Val=%d
1603 5
1604 Val=5
1605
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001606
1607-------------------------------
1608
John Beppu5bca0af2001-04-05 19:41:23 +00001609=item B<ps>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001610
1611ps
Erik Andersen5e1189e2000-04-15 16:34:54 +00001612
1613Report process status
1614
1615This version of ps accepts no options.
1616
1617Example:
1618
John Beppue708cb52001-03-15 21:08:01 +00001619 $ ps
1620 PID Uid Gid State Command
1621 1 root root S init
1622 2 root root S [kflushd]
1623 3 root root S [kupdate]
1624 4 root root S [kpiod]
1625 5 root root S [kswapd]
1626 742 andersen andersen S [bash]
1627 743 andersen andersen S -bash
1628 745 root root S [getty]
1629 2990 andersen andersen R ps
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001630
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001631-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001632
John Beppu5bca0af2001-04-05 19:41:23 +00001633=item B<pwd>
John Beppu46a4e762000-01-18 22:33:11 +00001634
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001635pwd
1636
1637Print the full filename of the current working directory.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001638
1639Example:
1640
John Beppue708cb52001-03-15 21:08:01 +00001641 $ pwd
1642 /root
Erik Andersen5e1189e2000-04-15 16:34:54 +00001643
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001644-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001645
John Beppu5bca0af2001-04-05 19:41:23 +00001646=item B<rdate>
Eric Andersen918507e2000-08-21 22:46:33 +00001647
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001648rdate [OPTION] HOST
Eric Andersen918507e2000-08-21 22:46:33 +00001649
1650Get and possibly set the system date and time from a remote HOST.
1651
1652Options:
1653
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001654 -s Set the system date and time (default).
1655 -p Print the date and time.
Eric Andersen918507e2000-08-21 22:46:33 +00001656
1657-------------------------------
1658
John Beppu5bca0af2001-04-05 19:41:23 +00001659=item B<readlink>
John Beppu46a4e762000-01-18 22:33:11 +00001660
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001661readlink
1662
1663Read a symbolic link.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001664
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001665-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001666
John Beppu5bca0af2001-04-05 19:41:23 +00001667=item B<reboot>
Eric Andersenbf960f52000-07-21 21:32:12 +00001668
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001669reboot
1670
1671Reboot the system.
1672
1673-------------------------------
1674
John Beppu5bca0af2001-04-05 19:41:23 +00001675=item B<renice>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001676
1677renice priority pid [pid ...]
Eric Andersenbf960f52000-07-21 21:32:12 +00001678
1679Changes priority of running processes. Allowed priorities range
1680from 20 (the process runs only when nothing else is running) to 0
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001681(default priority) to B<-20> (almost nothing else ever gets to run).
Eric Andersenbf960f52000-07-21 21:32:12 +00001682
1683-------------------------------
1684
John Beppu5bca0af2001-04-05 19:41:23 +00001685=item B<reset>
Eric Andersenfa405d02000-08-21 21:18:52 +00001686
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001687reset
Eric Andersenfa405d02000-08-21 21:18:52 +00001688
1689Resets the screen.
1690
1691-------------------------------
1692
John Beppu5bca0af2001-04-05 19:41:23 +00001693=item B<rm>
John Beppu46a4e762000-01-18 22:33:11 +00001694
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001695rm [OPTION]... FILE...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001696
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001697Remove (unlink) the FILE(s). You may use '--' to
Eric Andersen815e9042000-06-06 16:15:23 +00001698indicate that all following arguments are non-options.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001699
1700Options:
1701
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001702 -i always prompt before removing each destinations
1703 -f remove existing destinations, never prompt
1704 -r or -R remove the contents of directories recursively
Erik Andersen5e1189e2000-04-15 16:34:54 +00001705
1706Example:
1707
John Beppue708cb52001-03-15 21:08:01 +00001708 $ rm -rf /tmp/foo
Erik Andersen5e1189e2000-04-15 16:34:54 +00001709
1710-------------------------------
1711
John Beppu5bca0af2001-04-05 19:41:23 +00001712=item B<rmdir>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001713
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001714rmdir [OPTION]... DIRECTORY...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001715
1716Remove the DIRECTORY(ies), if they are empty.
1717
1718Example:
1719
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001720
Erik Andersen5e1189e2000-04-15 16:34:54 +00001721
1722-------------------------------
1723
John Beppu5bca0af2001-04-05 19:41:23 +00001724=item B<rmmod>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001725
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001726rmmod [OPTION]... [MODULE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001727
1728Unloads the specified kernel modules from the kernel.
1729
1730Options:
1731
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001732 -a Try to remove all unused kernel modules.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001733
1734Example:
1735
John Beppue708cb52001-03-15 21:08:01 +00001736 $ rmmod tulip
Erik Andersen5e1189e2000-04-15 16:34:54 +00001737
1738-------------------------------
1739
John Beppu5bca0af2001-04-05 19:41:23 +00001740=item B<route>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001741
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001742route [{add|del|flush}]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001743
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001744Edit the kernel's routing tables
Erik Andersen5e1189e2000-04-15 16:34:54 +00001745
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001746-------------------------------
Erik Andersen5e1189e2000-04-15 16:34:54 +00001747
John Beppu5bca0af2001-04-05 19:41:23 +00001748=item B<rpmunpack>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001749
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001750rpmunpack < package.rpm | gunzip | cpio B<-idmuv>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001751
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001752Extracts an rpm archive.
1753
1754-------------------------------
1755
John Beppu5bca0af2001-04-05 19:41:23 +00001756=item B<sed>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001757
1758sed [B<-Vhnef>] pattern [files...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001759
1760Options:
1761
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001762 -n suppress automatic printing of pattern space
1763 -e script add the script to the commands to be executed
1764 -f scriptfile add the contents of script-file to the commands to be executed
1765 -h display this help message
Erik Andersen5e1189e2000-04-15 16:34:54 +00001766
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001767If no B<-e> or B<-f> is given, the first non-option argument is taken as the
1768sed script to interpret. All remaining arguments are names of input
1769files; if no input files are specified, then the standard input is read.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001770
1771Example:
1772
John Beppue708cb52001-03-15 21:08:01 +00001773 $ echo foo | sed -e 's/f[a-zA-Z]o/bar/g'
1774 bar
Erik Andersen5e1189e2000-04-15 16:34:54 +00001775
1776-------------------------------
1777
John Beppu5bca0af2001-04-05 19:41:23 +00001778=item B<setkeycodes>
Erik Andersen4f3f7572000-04-28 00:18:56 +00001779
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001780setkeycodes SCANCODE KEYCODE ...
Erik Andersen4f3f7572000-04-28 00:18:56 +00001781
1782Set entries into the kernel's scancode-to-keycode map,
1783allowing unusual keyboards to generate usable keycodes.
1784
1785SCANCODE may be either xx or e0xx (hexadecimal),
1786and KEYCODE is given in decimal
1787
1788Example:
1789
John Beppue708cb52001-03-15 21:08:01 +00001790 $ setkeycodes e030 127
Erik Andersen4f3f7572000-04-28 00:18:56 +00001791
1792-------------------------------
1793
John Beppu5bca0af2001-04-05 19:41:23 +00001794=item B<sh>
Eric Andersen028fb622000-07-04 20:07:13 +00001795
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001796sh [FILE]...
1797or: sh B<-c> command [args]...
Eric Andersen028fb622000-07-04 20:07:13 +00001798
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001799lash: The BusyBox LAme SHell (command interpreter)
Eric Andersen028fb622000-07-04 20:07:13 +00001800
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001801This command does not yet have proper documentation.
Eric Andersen028fb622000-07-04 20:07:13 +00001802
1803Use lash just as you would use any other shell. It properly handles pipes,
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001804redirects, job control, can be used as the shell for scripts, and has a
1805sufficient set of builtins to do what is needed. It does not (yet) support
1806Bourne Shell syntax. If you need things like if-then-else, while, and such
1807use ash or bash. If you just need a very simple and extremely small shell,
1808this will do the job.
Eric Andersen028fb622000-07-04 20:07:13 +00001809
1810-------------------------------
1811
John Beppu5bca0af2001-04-05 19:41:23 +00001812=item B<sleep>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001813
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001814sleep N
Erik Andersen5e1189e2000-04-15 16:34:54 +00001815
1816Pause for N seconds.
1817
1818Example:
1819
John Beppue708cb52001-03-15 21:08:01 +00001820 $ sleep 2
1821 [2 second delay results]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001822
1823-------------------------------
1824
John Beppu5bca0af2001-04-05 19:41:23 +00001825=item B<sort>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001826
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001827sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001828
1829Sorts lines of text in the specified files
1830
1831Example:
1832
John Beppue708cb52001-03-15 21:08:01 +00001833 $ echo -e e
1834 f
1835 b
1836 d
1837 c
1838 a | sort
1839 a
1840 b
1841 c
1842 d
1843 e
1844 f
Erik Andersen5e1189e2000-04-15 16:34:54 +00001845
1846-------------------------------
1847
John Beppu5bca0af2001-04-05 19:41:23 +00001848=item B<stty>
Eric Andersen028fb622000-07-04 20:07:13 +00001849
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001850stty [B<-a>|g] [B<-F> device] [SETTING]...
1851
1852Without arguments, prints baud rate, line discipline,
1853and deviations from stty sane.
1854
1855Options:
1856
1857 -F device open device instead of stdin
1858 -a print all current settings in human-readable form
1859 -g print in stty-readable form
1860 [SETTING] see documentation
1861
1862-------------------------------
1863
John Beppu5bca0af2001-04-05 19:41:23 +00001864=item B<swapoff>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001865
1866swapoff [OPTION] [device]
Eric Andersen028fb622000-07-04 20:07:13 +00001867
1868Stop swapping virtual memory pages on the given device.
1869
1870Options:
1871
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001872 -a Stop swapping on all swap devices
Eric Andersen028fb622000-07-04 20:07:13 +00001873
1874-------------------------------
1875
John Beppu5bca0af2001-04-05 19:41:23 +00001876=item B<swapon>
Eric Andersen028fb622000-07-04 20:07:13 +00001877
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001878swapon [OPTION] [device]
Eric Andersen028fb622000-07-04 20:07:13 +00001879
1880Start swapping virtual memory pages on the given device.
1881
1882Options:
1883
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001884 -a Start swapping on all swap devices
Eric Andersen028fb622000-07-04 20:07:13 +00001885
1886-------------------------------
1887
John Beppu5bca0af2001-04-05 19:41:23 +00001888=item B<sync>
Erik Andersen5e1189e2000-04-15 16:34:54 +00001889
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001890sync
Erik Andersen5e1189e2000-04-15 16:34:54 +00001891
1892Write all buffered filesystem blocks to disk.
1893
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001894-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001895
John Beppu5bca0af2001-04-05 19:41:23 +00001896=item B<syslogd>
John Beppu46a4e762000-01-18 22:33:11 +00001897
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001898syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001899
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001900Linux system and kernel logging utility.
1901Note that this version of syslogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001902
Erik Andersen5e1189e2000-04-15 16:34:54 +00001903Options:
Pavel Roskin049b7062000-06-07 21:19:49 +00001904
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001905 -m NUM Interval between MARK lines (default=20min, 0=off)
Pavel Roskinda10ec02000-06-07 21:08:25 +00001906 -n Run as a foreground process
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001907 -O FILE Use an alternate log file (default=/var/log/messages)
1908 -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)
1909 -L Log locally and via network logging (default is network only)
Eric Andersenced2cef2000-07-20 23:41:24 +00001910
1911Example:
1912
John Beppue708cb52001-03-15 21:08:01 +00001913 $ syslogd -R masterlog:514
1914 $ syslogd -R 192.168.1.1:601
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001915
1916-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001917
John Beppu5bca0af2001-04-05 19:41:23 +00001918=item B<tail>
John Beppu46a4e762000-01-18 22:33:11 +00001919
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001920tail [OPTION]... [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001921
1922Print last 10 lines of each FILE to standard output.
1923With more than one FILE, precede each with a header giving the
1924file name. With no FILE, or when FILE is -, read standard input.
1925
1926Options:
1927
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001928 -c N[kbm] output the last N bytes
1929 -n N[kbm] print last N lines instead of last 10
1930 -f output data as the file grows
1931 -q never output headers giving file names
1932 -s SEC wait SEC seconds between reads with -f
1933 -v always output headers giving file names
1934
John Beppue708cb52001-03-15 21:08:01 +00001935If the first character of N (bytes or lines) is a '+', output begins with
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001936the Nth item from the start of each file, otherwise, print the last N items
1937in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).
Erik Andersen5e1189e2000-04-15 16:34:54 +00001938
1939Example:
1940
John Beppue708cb52001-03-15 21:08:01 +00001941 $ tail -n 1 /etc/resolv.conf
1942 nameserver 10.0.0.1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001943
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001944-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001945
John Beppu5bca0af2001-04-05 19:41:23 +00001946=item B<tar>
John Beppu46a4e762000-01-18 22:33:11 +00001947
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001948tar -[cxtvO] [-B<-exclude> File] [B<-X> File][B<-f> tarFile] [FILE(s)] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001949
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001950Create, extract, or list files from a tar file.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001951
1952Main operation mode:
1953
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001954 c create
1955 x extract
1956 t list
Erik Andersen5e1189e2000-04-15 16:34:54 +00001957
1958File selection:
1959
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001960 f name of tarfile or - for stdin
1961 O extract to stdout
1962 exclude file to exclude
1963 X file with names to exclude
Erik Andersen5e1189e2000-04-15 16:34:54 +00001964
1965Informative output:
1966
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001967 v verbosely list files processed
Erik Andersen5e1189e2000-04-15 16:34:54 +00001968
1969Example:
1970
John Beppue708cb52001-03-15 21:08:01 +00001971 $ zcat /tmp/tarball.tar.gz | tar -xf -
1972 $ tar -cf /tmp/tarball.tar /usr/local
Erik Andersen5e1189e2000-04-15 16:34:54 +00001973
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001974-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001975
John Beppu5bca0af2001-04-05 19:41:23 +00001976=item B<tee>
Eric Andersen028fb622000-07-04 20:07:13 +00001977
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001978tee [OPTION]... [FILE]...
Eric Andersen028fb622000-07-04 20:07:13 +00001979
1980Copy standard input to each FILE, and also to standard output.
1981
1982Options:
1983
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001984 -a append to the given FILEs, do not overwrite
Eric Andersen028fb622000-07-04 20:07:13 +00001985
1986Example:
1987
John Beppue708cb52001-03-15 21:08:01 +00001988 $ echo Hello | tee /tmp/foo
1989 $ cat /tmp/foo
1990 Hello
Eric Andersen028fb622000-07-04 20:07:13 +00001991
1992-------------------------------
1993
John Beppu5bca0af2001-04-05 19:41:23 +00001994=item B<telnet>
Eric Andersen028fb622000-07-04 20:07:13 +00001995
Eric Andersen0d3a02e2001-03-15 18:14:25 +00001996telnet host [port]
Eric Andersen028fb622000-07-04 20:07:13 +00001997
1998Telnet is used to establish interactive communication with another
1999computer over a network using the TELNET protocol.
2000
2001-------------------------------
2002
John Beppu5bca0af2001-04-05 19:41:23 +00002003=item B<test>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002004
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002005test EXPRESSION
2006 or [ EXPRESSION ]
Erik Andersen5e1189e2000-04-15 16:34:54 +00002007
2008Checks file types and compares values returning an exit
2009code determined by the value of EXPRESSION.
2010
2011Example:
2012
John Beppue708cb52001-03-15 21:08:01 +00002013 $ test 1 -eq 2
2014 $ echo $?
2015 1
2016 $ test 1 -eq 1
2017 $ echo $?
2018 0
2019 $ [ -d /etc ]
2020 $ echo $?
2021 0
2022 $ [ -d /junk ]
2023 $ echo $?
2024 1
Erik Andersen5e1189e2000-04-15 16:34:54 +00002025
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002026-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002027
John Beppu5bca0af2001-04-05 19:41:23 +00002028=item B<tftp>
John Beppu46a4e762000-01-18 22:33:11 +00002029
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002030tftp command SOURCE DEST
Erik Andersen5e1189e2000-04-15 16:34:54 +00002031
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002032Transfers a file from/to a tftp server using octet mode.
2033
2034Commands:
2035
2036 get Get file from server SOURCE and store to local DEST.
2037 put Put local file SOURCE to server DEST.
2038
2039When nameing a server, use the syntax server:file.
2040
2041-------------------------------
2042
John Beppu5bca0af2001-04-05 19:41:23 +00002043=item B<touch>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002044
2045touch [B<-c>] file [file ...]
2046
2047Update the last-modified date on the given file[s].
2048
2049Options:
2050
2051 -c Do not create any files
Erik Andersen5e1189e2000-04-15 16:34:54 +00002052
2053Example:
2054
John Beppue708cb52001-03-15 21:08:01 +00002055 $ ls -l /tmp/foo
2056 /bin/ls: /tmp/foo: No such file or directory
2057 $ touch /tmp/foo
2058 $ ls -l /tmp/foo
2059 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
2060
Erik Andersen5e1189e2000-04-15 16:34:54 +00002061
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002062-------------------------------
2063
John Beppu5bca0af2001-04-05 19:41:23 +00002064=item B<tr>
Erik Andersena19bc642000-05-02 06:40:02 +00002065
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002066tr [B<-cds>] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002067
Erik Andersen3c1217c2000-05-01 22:34:24 +00002068Translate, squeeze, and/or delete characters from
2069standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00002070
Erik Andersen3c1217c2000-05-01 22:34:24 +00002071Options:
2072
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002073 -c take complement of STRING1
2074 -d delete input characters coded STRING1
2075 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00002076
2077Example:
2078
John Beppue708cb52001-03-15 21:08:01 +00002079 $ echo gdkkn vnqkc | tr [a-y] [b-z]
2080 hello world
2081
Erik Andersen5e1189e2000-04-15 16:34:54 +00002082
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002083-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002084
John Beppu5bca0af2001-04-05 19:41:23 +00002085=item B<true>
John Beppu46a4e762000-01-18 22:33:11 +00002086
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002087true
2088
2089Return an exit code of TRUE (0).
Erik Andersen5e1189e2000-04-15 16:34:54 +00002090
2091Example:
2092
John Beppue708cb52001-03-15 21:08:01 +00002093 $ true
2094 $ echo $?
2095 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00002096
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002097-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002098
John Beppu5bca0af2001-04-05 19:41:23 +00002099=item B<tty>
John Beppu4581b4c2000-01-19 15:04:41 +00002100
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002101tty
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002102
2103Print the file name of the terminal connected to standard input.
2104
2105Options:
2106
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002107 -s print nothing, only return an exit status
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002108
2109Example:
2110
John Beppue708cb52001-03-15 21:08:01 +00002111 $ tty
2112 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00002113
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002114-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002115
John Beppu5bca0af2001-04-05 19:41:23 +00002116=item B<umount>
John Beppu46a4e762000-01-18 22:33:11 +00002117
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002118umount [flags] filesystem|directory
2119
2120Unmount file systems
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002121
2122Flags:
2123
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002124 -a: Unmount all file systems in /etc/mtab
2125 -n: Don't erase /etc/mtab entries
2126 -r: Try to remount devices as read-only if mount is busy
2127 -f: Force filesystem umount (i.e. unreachable NFS server)
2128 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002129
2130Example:
2131
John Beppue708cb52001-03-15 21:08:01 +00002132 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00002133
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002134-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00002135
John Beppu5bca0af2001-04-05 19:41:23 +00002136=item B<uname>
John Beppuf17792c2000-04-13 03:16:01 +00002137
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002138uname [OPTION]...
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002139
Erik Andersen26702fe2000-04-17 16:44:46 +00002140Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002141
2142Options:
2143
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002144 -a print all information
2145 -m the machine (hardware) type
2146 -n print the machine's network node hostname
2147 -r print the operating system release
2148 -s print the operating system name
2149 -p print the host processor type
2150 -v print the operating system version
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002151
2152Example:
2153
John Beppue708cb52001-03-15 21:08:01 +00002154 $ uname -a
2155 Linux debian 2.2.15pre13
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002156
2157-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002158
John Beppu5bca0af2001-04-05 19:41:23 +00002159=item B<uniq>
John Beppu46a4e762000-01-18 22:33:11 +00002160
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002161uniq [OPTION]... [INPUT [OUTPUT]]
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002162
2163Discard all but one of successive identical lines from INPUT
2164(or standard input), writing to OUTPUT (or standard output).
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002165
Eric Andersen5b5db382000-12-09 16:37:53 +00002166Options:
2167
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002168 -c prefix lines by the number of occurrences
2169 -d only print duplicate lines
2170 -u only print unique lines
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002171
2172Example:
2173
John Beppue708cb52001-03-15 21:08:01 +00002174 $ echo -e a
2175 a
2176 b
2177 c
2178 c
2179 a | sort | uniq
2180 a
2181 b
2182 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00002183
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002184-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002185
John Beppu5bca0af2001-04-05 19:41:23 +00002186=item B<unix2dos>
Eric Andersencff3fe32000-09-20 19:22:26 +00002187
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002188unix2dos [option] [file]
Eric Andersencff3fe32000-09-20 19:22:26 +00002189
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002190See 'dos2unix -B<-help>' for help!
Eric Andersencff3fe32000-09-20 19:22:26 +00002191
2192-------------------------------
2193
John Beppu5bca0af2001-04-05 19:41:23 +00002194=item B<update>
Eric Andersencff3fe32000-09-20 19:22:26 +00002195
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002196update [options]
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002197
2198Periodically flushes filesystem buffers.
2199
2200Options:
2201
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002202 -S force use of sync(2) instead of flushing
2203 -s SECS call sync this often (default 30)
2204 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00002205
2206-------------------------------
2207
John Beppu5bca0af2001-04-05 19:41:23 +00002208=item B<uptime>
Erik Andersen5e1189e2000-04-15 16:34:54 +00002209
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002210uptime
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002211
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002212Display the time since the last boot.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002213
2214Example:
2215
John Beppue708cb52001-03-15 21:08:01 +00002216 $ uptime
2217 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
2218
Erik Andersen5e1189e2000-04-15 16:34:54 +00002219
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002220-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002221
John Beppu5bca0af2001-04-05 19:41:23 +00002222=item B<usleep>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002223
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002224usleep N
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002225
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002226Pause for N microseconds.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002227
2228Example:
2229
John Beppue708cb52001-03-15 21:08:01 +00002230 $ usleep 1000000
2231 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00002232
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002233-------------------------------
2234
John Beppu5bca0af2001-04-05 19:41:23 +00002235=item B<uudecode>
Eric Andersen028fb622000-07-04 20:07:13 +00002236
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002237uudecode [FILE]...
2238
2239Uudecode a file that is uuencoded.
2240
2241Options:
2242
John Beppu5bca0af2001-04-05 19:41:23 +00002243 -o FILE direct output to FILE
2244
2245Example:
2246
2247 $ uudecode -o busybox busybox.uu
2248 $ ls -l busybox
2249 -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
2250
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002251
2252-------------------------------
2253
John Beppu5bca0af2001-04-05 19:41:23 +00002254=item B<uuencode>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002255
2256uuencode [OPTION] [INFILE] REMOTEFILE
Eric Andersen028fb622000-07-04 20:07:13 +00002257
2258Uuencode a file.
2259
2260Options:
2261
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002262 -m use base64 encoding as of RFC1521
Eric Andersen028fb622000-07-04 20:07:13 +00002263
2264Example:
2265
John Beppue708cb52001-03-15 21:08:01 +00002266 $ uuencode busybox busybox
2267 begin 755 busybox
2268 <encoded file snipped>
2269 $ uudecode busybox busybox > busybox.uu
2270 $
Eric Andersen028fb622000-07-04 20:07:13 +00002271
2272-------------------------------
2273
John Beppu5bca0af2001-04-05 19:41:23 +00002274=item B<watchdog>
Eric Andersen028fb622000-07-04 20:07:13 +00002275
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002276watchdog DEV
Eric Andersen028fb622000-07-04 20:07:13 +00002277
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002278Periodically write to watchdog device DEV
Eric Andersen028fb622000-07-04 20:07:13 +00002279
2280-------------------------------
2281
John Beppu5bca0af2001-04-05 19:41:23 +00002282=item B<wc>
Eric Andersenffde8672001-01-25 23:40:32 +00002283
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002284wc [OPTION]... [FILE]...
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002285
2286Print line, word, and byte counts for each FILE, and a total line if
2287more than one FILE is specified. With no FILE, read standard input.
2288
2289Options:
2290
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002291 -c print the byte counts
2292 -l print the newline counts
2293 -L print the length of the longest line
2294 -w print the word counts
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002295
2296Example:
2297
John Beppue708cb52001-03-15 21:08:01 +00002298 $ wc /etc/passwd
2299 31 46 1365 /etc/passwd
2300
Erik Andersen5e1189e2000-04-15 16:34:54 +00002301
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002302-------------------------------
2303
John Beppu5bca0af2001-04-05 19:41:23 +00002304=item B<wget>
Pavel Roskinafa06622000-06-21 21:43:24 +00002305
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002306wget [B<-c>] [B<-O> file] url
2307
2308wget retrieves files via HTTP
2309
2310Options:
2311
2312 -c continue retrieval of aborted transfers
2313 -O save to filename ('-' for stdout)
2314
2315-------------------------------
2316
John Beppu5bca0af2001-04-05 19:41:23 +00002317=item B<which>
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002318
2319which [COMMAND ...]
Pavel Roskinafa06622000-06-21 21:43:24 +00002320
2321Locates a COMMAND.
2322
2323Example:
2324
John Beppue708cb52001-03-15 21:08:01 +00002325 $ which login
2326 /bin/login
Pavel Roskinafa06622000-06-21 21:43:24 +00002327
2328-------------------------------
2329
John Beppu5bca0af2001-04-05 19:41:23 +00002330=item B<whoami>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002331
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002332whoami
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002333
2334Prints the user name associated with the current effective user id.
2335
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002336-------------------------------
2337
John Beppu5bca0af2001-04-05 19:41:23 +00002338=item B<xargs>
Eric Andersen5b176932000-09-22 20:22:28 +00002339
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002340xargs [COMMAND] [ARGS...]
Eric Andersen5b176932000-09-22 20:22:28 +00002341
2342Executes COMMAND on every item given by standard input.
2343
Eric Andersen5b176932000-09-22 20:22:28 +00002344Example:
2345
John Beppue708cb52001-03-15 21:08:01 +00002346 $ ls | xargs gzip
2347 $ find . -name '*.c' -print | xargs rm
2348
Eric Andersen5b176932000-09-22 20:22:28 +00002349
2350-------------------------------
2351
John Beppu5bca0af2001-04-05 19:41:23 +00002352=item B<yes>
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002353
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002354yes [OPTION]... [STRING]...
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002355
John Beppue708cb52001-03-15 21:08:01 +00002356Repeatedly outputs a line with all specified STRING(s), or 'y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00002357
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002358-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00002359
John Beppu5bca0af2001-04-05 19:41:23 +00002360=item B<zcat>
John Beppu46a4e762000-01-18 22:33:11 +00002361
Eric Andersen0d3a02e2001-03-15 18:14:25 +00002362zcat FILE
2363
2364Uncompress to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00002365
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002366-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002367
Erik Andersena19bc642000-05-02 06:40:02 +00002368=head1 LIBC NSS
2369
2370GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
2371library for the local environment, and to configure how it reads system data,
2372such as passwords and group information. BusyBox has made it Policy that it
2373will never use NSS, and will never use and libc calls that make use of NSS.
2374This allows you to run an embedded system without the need for installing an
2375/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
2376
2377If you are using a system that is using a remote LDAP server for authentication
2378via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
2379BusyBox source. Chances are though, that if you have enough space to install
2380of that stuff on your system, then you probably want the full GNU utilities.
2381
John Beppu3a1b6be2000-01-18 15:45:59 +00002382=head1 SEE ALSO
2383
2384textutils(1), shellutils(1), etc...
2385
2386=head1 MAINTAINER
2387
Erik Andersen1101d232000-04-19 05:15:12 +00002388Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002389
2390=head1 AUTHORS
2391
John Beppu08fe43d2000-01-19 12:39:16 +00002392The following people have contributed code to BusyBox whether
2393they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00002394
John Beppu3a1b6be2000-01-18 15:45:59 +00002395
John Beppu08fe43d2000-01-19 12:39:16 +00002396=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002397
Eric Andersen57f83ff2000-09-24 02:41:44 +00002398Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
2399
2400 Tons of new stuff, major rewrite of most of the
2401 core apps, tons of new apps as noted in header files.
2402
2403=for html <br>
2404
2405Edward Betts <edward@debian.org>
2406
2407 expr, hostid, logname, tty, wc, whoami, yes
2408
2409=for html <br>
2410
John Beppu08fe43d2000-01-19 12:39:16 +00002411John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002412
Eric Andersen57f83ff2000-09-24 02:41:44 +00002413 du, head, nslookup, sort, tee, uniq
2414
John Beppu08fe43d2000-01-19 12:39:16 +00002415=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002416
John Beppu08fe43d2000-01-19 12:39:16 +00002417Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002418
Eric Andersen57f83ff2000-09-24 02:41:44 +00002419 tiny-ls(ls)
2420
John Beppu08fe43d2000-01-19 12:39:16 +00002421=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002422
John Beppu08fe43d2000-01-19 12:39:16 +00002423Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00002424
Eric Andersen57f83ff2000-09-24 02:41:44 +00002425 fbset, ping, hostname, and mkfifo
2426
John Beppu08fe43d2000-01-19 12:39:16 +00002427=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002428
John Beppu08fe43d2000-01-19 12:39:16 +00002429Dave Cinege <dcinege@psychosis.com>
2430
Eric Andersen57f83ff2000-09-24 02:41:44 +00002431 more(v2), makedevs, dutmp, modularization, auto links file,
2432 various fixes, Linux Router Project maintenance
2433
John Beppu08fe43d2000-01-19 12:39:16 +00002434=for html <br>
2435
John Beppu50ed0672000-04-13 23:44:04 +00002436Karl M. Hegbloom <karlheg@debian.org>
2437
Eric Andersen57f83ff2000-09-24 02:41:44 +00002438 cp_mv.c, the test suite, various fixes to utility.c, &c.
2439
2440=for html <br>
2441
2442Daniel Jacobowitz <dan@debian.org>
2443
2444 mktemp.c
2445
2446=for html <br>
2447
2448Matt Kraai <kraai@alumni.carnegiemellon.edu>
2449
2450 documentation, bugfixes
2451
John Beppu50ed0672000-04-13 23:44:04 +00002452=for html <br>
2453
John Beppu4fd10fc2000-04-17 05:13:59 +00002454John Lombardo <john@deltanet.com>
2455
Eric Andersen57f83ff2000-09-24 02:41:44 +00002456 dirname, tr
2457
John Beppu4fd10fc2000-04-17 05:13:59 +00002458=for html <br>
2459
Eric Andersen86ab8a32000-06-02 03:21:42 +00002460Glenn McGrath <bug1@netconnect.com.au>
2461
Eric Andersen57f83ff2000-09-24 02:41:44 +00002462 ar.c
2463
Eric Andersen86ab8a32000-06-02 03:21:42 +00002464=for html <br>
2465
Eric Andersen57f83ff2000-09-24 02:41:44 +00002466Bruce Perens <bruce@pixar.com>
2467
2468 Original author of BusyBox. His code is still in many apps.
2469
2470=for html <br>
2471
2472Chip Rosenthal <chip@unicom.com>, <crosenth@covad.com>
2473
2474 wget - Contributed by permission of Covad Communications
John Beppu08fe43d2000-01-19 12:39:16 +00002475
2476=for html <br>
2477
Pavel Roskin339b8922000-06-20 00:11:07 +00002478Pavel Roskin <proski@gnu.org>
Eric Andersen08e92892000-06-02 03:21:36 +00002479
Eric Andersen57f83ff2000-09-24 02:41:44 +00002480 Lots of bugs fixes and patches.
2481
2482=for html <br>
2483
2484Gyepi Sam <gyepi@praxis-sw.com>
2485
2486 Remote logging feature for syslogd
2487
Eric Andersen08e92892000-06-02 03:21:36 +00002488=for html <br>
2489
John Beppu08fe43d2000-01-19 12:39:16 +00002490Linus Torvalds <torvalds@transmeta.com>
2491
Eric Andersen57f83ff2000-09-24 02:41:44 +00002492 mkswap, fsck.minix, mkfs.minix
2493
John Beppu08fe43d2000-01-19 12:39:16 +00002494=for html <br>
2495
John Beppu2aee9932000-09-15 08:04:42 +00002496Mark Whitley <markw@lineo.com>
2497
Eric Andersen57f83ff2000-09-24 02:41:44 +00002498 sed remix, bug fixes, style-guide, etc.
2499
John Beppu2aee9932000-09-15 08:04:42 +00002500=for html <br>
2501
John Beppu08fe43d2000-01-19 12:39:16 +00002502Charles P. Wright <cpwright@villagenet.com>
2503
Eric Andersen57f83ff2000-09-24 02:41:44 +00002504 gzip, mini-netcat(nc)
2505
John Beppu08fe43d2000-01-19 12:39:16 +00002506=for html <br>
2507
2508Enrique Zanardi <ezanardi@ull.es>
2509
Eric Andersen57f83ff2000-09-24 02:41:44 +00002510 tarcat (since removed), loadkmap, various fixes, Debian maintenance
John Beppu3a1b6be2000-01-18 15:45:59 +00002511
2512=cut
John Beppu08fe43d2000-01-19 12:39:16 +00002513
John Beppu5bca0af2001-04-05 19:41:23 +00002514# $Id: busybox.pod,v 1.94 2001/04/05 19:41:23 beppu Exp $