blob: 3bedcefb759f8b3147528124fe8786ffe2d11f81 [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
Pavel Roskinf7a01952000-06-21 20:25:07 +000058ar, basename, cat, chgrp, chmod, chown, chroot, chvt, clear, cp, cut, date,
Eric Andersen61dc0572000-07-11 17:29:36 +000059dc, dd, deallocvt, df, dirname, dmesg, du, dumpkmap, dutmp, echo, false, fbset,
Eric Andersena1f16bb2000-08-21 22:02:34 +000060fdflush, find, free, freeramdisk, fsck.minix, getopt, grep, gunzip, gzip, halt,
Pavel Roskinf7a01952000-06-21 20:25:07 +000061head, hostid, hostname, id, init, insmod, kill, killall, length, ln,
62loadacm, loadfont, loadkmap, logger, logname, ls, lsmod, makedevs, mkdir,
63mkfifo, mkfs.minix, mknod, mkswap, mktemp, more, mount, mt, mv, nc,
Eric Andersen918507e2000-08-21 22:46:33 +000064nslookup, ping, poweroff, printf, ps, pwd, rdate, reboot, renice, reset, rm, rmdir, rmmod, sed,
Eric Andersen9cf44e72000-07-08 00:09:30 +000065setkeycodes, sh, sleep, sort, swapoff, swapon, sync, syslogd, tail,
Pavel Roskinf7a01952000-06-21 20:25:07 +000066tar, tee, telnet, test, touch, tr, true, tty, umount, uname, uniq, update,
67uptime, usleep, uudecode, uuencode, wc, which, whoami, yes, zcat, [
Erik Andersen62dc17a2000-04-13 01:18:23 +000068
Erik Andersena19bc642000-05-02 06:40:02 +000069-------------------------------
70
John Beppu46a4e762000-01-18 22:33:11 +000071=over 4
72
Eric Andersen86ab8a32000-06-02 03:21:42 +000073=item ar
74
75Usage: ar [optxvV] archive [filenames]
76
77Extract or list files from an ar archive.
78
79Options:
80
81 o preserve original dates
82 p extract to stdout
83 t list
84 x extract
85 v verbosely list files processed
86
87-------------------------------
88
Erik Andersen62dc17a2000-04-13 01:18:23 +000089=item basename
90
Erik Andersenac130e12000-05-10 05:00:31 +000091Usage: basename FILE [SUFFIX]
Erik Andersen62dc17a2000-04-13 01:18:23 +000092
Erik Andersenac130e12000-05-10 05:00:31 +000093Strips directory path and suffixes from FILE.
94If specified, also removes any trailing SUFFIX.
Erik Andersen62dc17a2000-04-13 01:18:23 +000095
Pavel Roskin1a804e42000-06-21 21:38:00 +000096Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +000097
98 $ basename /usr/local/bin/foo
99 foo
100 $ basename /usr/local/bin/
101 bin
Erik Andersenac130e12000-05-10 05:00:31 +0000102 $ basename /foo/bar.txt .txt
103 bar
Erik Andersen62dc17a2000-04-13 01:18:23 +0000104
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000105-------------------------------
106
Erik Andersena6c75222000-04-18 00:00:52 +0000107=item cat
John Beppu46a4e762000-01-18 22:33:11 +0000108
Erik Andersencf8d38a2000-04-21 01:23:36 +0000109Usage: cat [FILE ...]
Erik Andersen62dc17a2000-04-13 01:18:23 +0000110
Erik Andersencf8d38a2000-04-21 01:23:36 +0000111Concatenates FILE(s) and prints them to the standard output.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000112
113Example:
114
115 $ cat /proc/uptime
116 110716.72 17.67
John Beppu4581b4c2000-01-19 15:04:41 +0000117
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000118-------------------------------
119
Erik Andersen5e1189e2000-04-15 16:34:54 +0000120=item chgrp
121
122Usage: chgrp [OPTION]... GROUP FILE...
123
124Change the group membership of each FILE to GROUP.
Erik Andersen26702fe2000-04-17 16:44:46 +0000125
Erik Andersen5e1189e2000-04-15 16:34:54 +0000126Options:
127
128 -R change files and directories recursively
Erik Andersen26702fe2000-04-17 16:44:46 +0000129
Erik Andersen5e1189e2000-04-15 16:34:54 +0000130Example:
131
132 $ ls -l /tmp/foo
133 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
134 $ chgrp root /tmp/foo
135 $ ls -l /tmp/foo
136 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
137
138-------------------------------
139
John Beppu46a4e762000-01-18 22:33:11 +0000140=item chmod
141
John Beppuf17792c2000-04-13 03:16:01 +0000142Usage: chmod [B<-R>] MODE[,MODE]... FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000143
Erik Andersencf8d38a2000-04-21 01:23:36 +0000144Changes file access permissions for the specified FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000145Each MODE is defined by combining the letters for WHO has access to the file,
146an OPERATOR for selecting how the permissions should be changed, and a
Eric Andersen98cd53e2000-06-16 19:56:44 +0000147PERMISSION for FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000148
Erik Andersencf8d38a2000-04-21 01:23:36 +0000149WHO may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000150
Erik Andersencf8d38a2000-04-21 01:23:36 +0000151 u User who owns the file
152 g Users in the file's Group
Erik Andersen62dc17a2000-04-13 01:18:23 +0000153 o Other users not in the file's group
154 a All users
155
Erik Andersencf8d38a2000-04-21 01:23:36 +0000156OPERATOR may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000157
Erik Andersencf8d38a2000-04-21 01:23:36 +0000158 + Add a permission
159 - Remove a permission
160 = Assign a permission
Pavel Roskin1a804e42000-06-21 21:38:00 +0000161
Erik Andersencf8d38a2000-04-21 01:23:36 +0000162PERMISSION may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000163
Erik Andersencf8d38a2000-04-21 01:23:36 +0000164 r Read
Erik Andersen62dc17a2000-04-13 01:18:23 +0000165 w Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000166 x Execute (or access for directories)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000167 s Set user (or group) ID bit
Eric Andersen98cd53e2000-06-16 19:56:44 +0000168 t Sticky bit (for directories prevents removing files by non-owners)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000169
Erik Andersencf8d38a2000-04-21 01:23:36 +0000170Alternately, permissions can be set numerically where the first three
171numbers are calculated by adding the octal values, such as
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000172
Erik Andersen62dc17a2000-04-13 01:18:23 +0000173 4 Read
174 2 Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000175 1 Execute
Erik Andersen62dc17a2000-04-13 01:18:23 +0000176
Erik Andersencf8d38a2000-04-21 01:23:36 +0000177An optional fourth digit can also be used to specify
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000178
Erik Andersen62dc17a2000-04-13 01:18:23 +0000179 4 Set user ID
180 2 Set group ID
Eric Andersen98cd53e2000-06-16 19:56:44 +0000181 1 Sticky bit
Erik Andersen62dc17a2000-04-13 01:18:23 +0000182
John Beppu4581b4c2000-01-19 15:04:41 +0000183Options:
184
Erik Andersencf8d38a2000-04-21 01:23:36 +0000185 -R Change files and directories recursively.
Pavel Roskin1a804e42000-06-21 21:38:00 +0000186
Erik Andersen62dc17a2000-04-13 01:18:23 +0000187Example:
188
189 $ ls -l /tmp/foo
190 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
191 $ chmod u+x /tmp/foo
192 $ ls -l /tmp/foo
193 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
194 $ chmod 444 /tmp/foo
195 $ ls -l /tmp/foo
196 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000197
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000198-------------------------------
199
John Beppu46a4e762000-01-18 22:33:11 +0000200=item chown
201
Erik Andersencf8d38a2000-04-21 01:23:36 +0000202Usage: chown [OPTION]... OWNER[<.|:>[GROUP] FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000203
Erik Andersen62dc17a2000-04-13 01:18:23 +0000204Changes the owner and/or group of each FILE to OWNER and/or GROUP.
John Beppu5a50def2000-04-17 17:46:46 +0000205
John Beppu4581b4c2000-01-19 15:04:41 +0000206Options:
207
Erik Andersencf8d38a2000-04-21 01:23:36 +0000208 -R Changes files and directories recursively
Erik Andersen62dc17a2000-04-13 01:18:23 +0000209
210Example:
211
212 $ ls -l /tmp/foo
213 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
214 $ chown root /tmp/foo
215 $ ls -l /tmp/foo
216 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
217 $ chown root.root /tmp/foo
218 ls -l /tmp/foo
219 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000220
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000221-------------------------------
222
John Beppu46a4e762000-01-18 22:33:11 +0000223=item chroot
224
John Beppu4581b4c2000-01-19 15:04:41 +0000225Usage: chroot NEWROOT [COMMAND...]
226
227Run COMMAND with root directory set to NEWROOT.
Pavel Roskin1a804e42000-06-21 21:38:00 +0000228
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000229Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000230
231 $ ls -l /bin/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000232 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox
Erik Andersen62dc17a2000-04-13 01:18:23 +0000233 $ mount /dev/hdc1 /mnt -t minix
234 $ chroot /mnt
235 $ ls -l /bin/ls
236 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
John Beppu4581b4c2000-01-19 15:04:41 +0000237
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000238-------------------------------
239
John Beppu46a4e762000-01-18 22:33:11 +0000240=item chvt
241
John Beppu4581b4c2000-01-19 15:04:41 +0000242Usage: chvt N
243
Erik Andersencf8d38a2000-04-21 01:23:36 +0000244Changes the foreground virtual terminal to /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000245
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000246-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000247
Eric Andersen028fb622000-07-04 20:07:13 +0000248=item clear
249
250Clears the screen.
251
252-------------------------------
253
John Beppu46a4e762000-01-18 22:33:11 +0000254=item cp
255
John Beppu4581b4c2000-01-19 15:04:41 +0000256Usage: cp [OPTION]... SOURCE DEST
257
Erik Andersen62dc17a2000-04-13 01:18:23 +0000258 or: cp [OPTION]... SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +0000259
Erik Andersencf8d38a2000-04-21 01:23:36 +0000260Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
John Beppu4581b4c2000-01-19 15:04:41 +0000261
Erik Andersene31c0662000-05-02 05:32:07 +0000262Options:
263
Erik Andersencf8d38a2000-04-21 01:23:36 +0000264 -a Same as -dpR
265 -d Preserves links
Eric Andersen98cd53e2000-06-16 19:56:44 +0000266 -p Preserves file attributes if possible
Erik Andersencf8d38a2000-04-21 01:23:36 +0000267 -R Copies directories recursively
John Beppu4581b4c2000-01-19 15:04:41 +0000268
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000269-------------------------------
270
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000271=item cut
272
273Usage: cut [OPTION]... [FILE]...
274
275Prints selected fields from each input FILE to standard output.
276
277Options:
278
Eric Andersen1386e702000-06-26 12:14:30 +0000279 -b LIST Output only bytes from LIST
280 -c LIST Output only characters from LIST
281 -d CHAR Use CHAR instead of tab as the field delimiter
Pavel Roskin0010ee42000-07-21 15:10:57 +0000282 -s Output only the lines containing delimiter
Eric Andersen1386e702000-06-26 12:14:30 +0000283 -f N Print only these fields
284 -n Ignored
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000285
286Example:
287
288 $ echo "Hello world" | cut -f 1 -d ' '
289 Hello
290 $ echo "Hello world" | cut -f 2 -d ' '
291 world
292
293
294-------------------------------
295
John Beppu46a4e762000-01-18 22:33:11 +0000296=item date
297
Erik Andersen62dc17a2000-04-13 01:18:23 +0000298Usage: date [OPTION]... [+FORMAT]
John Beppu4581b4c2000-01-19 15:04:41 +0000299
Erik Andersen62dc17a2000-04-13 01:18:23 +0000300 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
301
Erik Andersencf8d38a2000-04-21 01:23:36 +0000302Displays the current time in the given FORMAT, or sets the system date.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000303
304Options:
Erik Andersene31c0662000-05-02 05:32:07 +0000305
Erik Andersencf8d38a2000-04-21 01:23:36 +0000306 -R Outputs RFC-822 compliant date string
307 -s Sets time described by STRING
308 -u Prints or sets Coordinated Universal Time
Erik Andersen62dc17a2000-04-13 01:18:23 +0000309
310Example:
John Beppuf17792c2000-04-13 03:16:01 +0000311
Erik Andersen62dc17a2000-04-13 01:18:23 +0000312 $ date
313 Wed Apr 12 18:52:41 MDT 2000
John Beppu4581b4c2000-01-19 15:04:41 +0000314
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000315-------------------------------
316
John Beppu00216792000-06-21 19:06:16 +0000317=item dc
318
319Usage: dc expression ...
320
321This is a Tiny RPN calculator that understands the
322following operations: +, -, /, *, and, or, not, eor.
323If no arguments are given, dc will process input from STDIN.
324
325The behaviour of BusyBox/dc deviates (just a little ;-) from
326GNU/dc, but this will be remedied in the future.
327
328Example:
329
330 $ dc 2 2 +
331 4
332 $ dc 8 8 \* 2 2 + /
333 16
334 $ dc 0 1 and
335 0
336 $ dc 0 1 or
337 1
338 $ echo 72 9 div 8 mul | dc
339 64
340
341-------------------------------
342
John Beppu46a4e762000-01-18 22:33:11 +0000343=item dd
344
Erik Andersen62dc17a2000-04-13 01:18:23 +0000345Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
John Beppu4581b4c2000-01-19 15:04:41 +0000346
347Copy a file, converting and formatting according to options
348
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000349 if=FILE read from FILE instead of stdin
350 of=FILE write to FILE instead of stdout
351 bs=n read and write n bytes at a time
352 count=n copy only n input blocks
353 skip=n skip n input blocks
354 seek=n skip n output blocks
Erik Andersen62dc17a2000-04-13 01:18:23 +0000355
356Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
Pavel Roskin1a804e42000-06-21 21:38:00 +0000357
Erik Andersen62dc17a2000-04-13 01:18:23 +0000358Example:
359
360 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
361 4+0 records in
362 4+0 records out
363
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000364-------------------------------
365
Eric Andersen028fb622000-07-04 20:07:13 +0000366=item deallocvt
367
368Usage: deallocvt N
369
370Deallocates unused virtual terminal /dev/ttyN
371
372-------------------------------
373
John Beppu46a4e762000-01-18 22:33:11 +0000374=item df
375
Erik Andersen62dc17a2000-04-13 01:18:23 +0000376Usage: df [filesystem ...]
377
378Prints the filesystem space used and space available.
379
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000380Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000381
382 $ df
383 Filesystem 1k-blocks Used Available Use% Mounted on
384 /dev/sda3 8690864 8553540 137324 98% /
385 /dev/sda1 64216 36364 27852 57% /boot
386 $ df /dev/sda3
387 Filesystem 1k-blocks Used Available Use% Mounted on
388 /dev/sda3 8690864 8553540 137324 98% /
John Beppu4581b4c2000-01-19 15:04:41 +0000389
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000390-------------------------------
391
392=item dirname
393
394Usage: dirname NAME
395
396Strip non-directory suffix from file name
397
398Example:
399
400 $ dirname /tmp/foo
401 /tmp
402 $ dirname /tmp/foo/
403 /tmp
404
405-------------------------------
406
John Beppu46a4e762000-01-18 22:33:11 +0000407=item dmesg
408
John Beppuf17792c2000-04-13 03:16:01 +0000409Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
Pavel Roskin1a804e42000-06-21 21:38:00 +0000410
Erik Andersen62dc17a2000-04-13 01:18:23 +0000411Print or controls the kernel ring buffer.
John Beppu4581b4c2000-01-19 15:04:41 +0000412
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000413-------------------------------
414
John Beppu46a4e762000-01-18 22:33:11 +0000415=item du
416
Erik Andersen62dc17a2000-04-13 01:18:23 +0000417Usage: du [OPTION]... [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000418
Erik Andersen62dc17a2000-04-13 01:18:23 +0000419Summarize disk space used for each FILE and/or directory.
420Disk space is printed in units of 1k (i.e. 1024 bytes).
421
422Options:
John Beppuf17792c2000-04-13 03:16:01 +0000423
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000424 -l count sizes many times if hard linked
425 -s display only a total for each argument
Erik Andersen62dc17a2000-04-13 01:18:23 +0000426
427Example:
428
Erik Andersencf8d38a2000-04-21 01:23:36 +0000429 $ ./BusyBox du
Erik Andersen62dc17a2000-04-13 01:18:23 +0000430 16 ./CVS
431 12 ./kernel-patches/CVS
432 80 ./kernel-patches
433 12 ./tests/CVS
434 36 ./tests
435 12 ./scripts/CVS
436 16 ./scripts
437 12 ./docs/CVS
438 104 ./docs
439 2417 .
Pavel Roskin1a804e42000-06-21 21:38:00 +0000440
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000441-------------------------------
442
Eric Andersen61dc0572000-07-11 17:29:36 +0000443=item dumpkmap
444
445Usage: dumpkmap
446
447Prints out a binary keyboard translation table to standard input.
448
Eric Andersen18a10142000-09-01 16:12:57 +0000449Example:
450
451 $ dumpkmap > keymap
452
Eric Andersen61dc0572000-07-11 17:29:36 +0000453-------------------------------
454
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000455=item dutmp
456
457Usage: dutmp [FILE]
458
459Dump utmp file format (pipe delimited) from FILE
460or stdin to stdout.
461
462Example:
463
464 $ dutmp /var/run/utmp
465 8|7||si|||0|0|0|955637625|760097|0
466 2|0|~|~~|reboot||0|0|0|955637625|782235|0
467 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
468 8|125||l4|||0|0|0|955637629|998367|0
469 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
470 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
471 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
Pavel Roskin1a804e42000-06-21 21:38:00 +0000472
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000473-------------------------------
474
475=item echo
476
477Usage: echo [-neE] [ARG ...]
478
479Prints the specified ARGs to stdout
480
481Options:
482
483 -n suppress trailing newline
484 -e interpret backslash-escaped characters (i.e. \t=tab etc)
485 -E disable interpretation of backslash-escaped characters
486
487Example:
488
489 $ echo "Erik is cool"
490 Erik is cool
491 $ echo -e "Erik\nis\ncool"
492 Erik
493 is
494 cool
495 $ echo "Erik\nis\ncool"
496 Erik\nis\ncool
Pavel Roskin1a804e42000-06-21 21:38:00 +0000497
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000498-------------------------------
499
Eric Andersen1b355eb2000-09-05 17:37:48 +0000500=item echo
501
502
503Usage: expr EXPRESSION
504
505Prints the value of EXPRESSION to standard output.
506
507EXPRESSION may be:
508
509 ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2
510 ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0
511 ARG1 < ARG2 ARG1 is less than ARG2
512 ARG1 <= ARG2 ARG1 is less than or equal to ARG2
513 ARG1 = ARG2 ARG1 is equal to ARG2
514 ARG1 != ARG2 ARG1 is unequal to ARG2
515 ARG1 >= ARG2 ARG1 is greater than or equal to ARG2
516 ARG1 > ARG2 ARG1 is greater than ARG2
517 ARG1 + ARG2 arithmetic sum of ARG1 and ARG2
518 ARG1 - ARG2 arithmetic difference of ARG1 and ARG2
519 ARG1 * ARG2 arithmetic product of ARG1 and ARG2
520 ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2
521 ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2
522 STRING : REGEXP anchored pattern match of REGEXP in STRING
523 match STRING REGEXP same as STRING : REGEXP
524 substr STRING POS LENGTH substring of STRING, POS counted from 1
525 index STRING CHARS index in STRING where any CHARS is found, or 0
526 length STRING length of STRING
527 quote TOKEN interpret TOKEN as a string, even if it is a
528 keyword like `match' or an operator like `/'
529 ( EXPRESSION ) value of EXPRESSION
530
531Beware that many operators need to be escaped or quoted for shells.
532Comparisons are arithmetic if both ARGs are numbers, else
533lexicographical. Pattern matches return the string matched between
534\( and \) or null; if \( and \) are not used, they return the number
535of characters matched or 0.
536
537-------------------------------
538
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000539=item false
540
Erik Andersen5e1189e2000-04-15 16:34:54 +0000541Returns an exit code of FALSE (1)
542
543Example:
544
545 $ false
546 $ echo $?
547 1
548
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000549-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000550
John Beppu46a4e762000-01-18 22:33:11 +0000551=item fbset
552
John Beppu4581b4c2000-01-19 15:04:41 +0000553Usage: fbset [options] [mode]
554
Erik Andersen62dc17a2000-04-13 01:18:23 +0000555Show and modify frame buffer device settings
556
John Beppu4581b4c2000-01-19 15:04:41 +0000557Options:
558
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000559 -h
560 -fb
561 -db
562 -a
563 -i
564 -g
565 -t
566 -accel
567 -hsync
568 -vsync
569 -laced
570 -double
John Beppu4581b4c2000-01-19 15:04:41 +0000571
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000572Example:
573
574 $ fbset
575 mode "1024x768-76"
576 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
577 geometry 1024 768 1024 768 16
578 timings 12714 128 32 16 4 128 4
579 accel false
580 rgba 5/11,6/5,5/0,0/0
581 endmode
582
583-------------------------------
584
585=item fdflush
586
587Usage: fdflush device
588
589Force floppy disk drive to detect disk change
590
591-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000592
John Beppu46a4e762000-01-18 22:33:11 +0000593=item find
594
John Beppu4581b4c2000-01-19 15:04:41 +0000595Usage: find [PATH...] [EXPRESSION]
596
597Search for files in a directory hierarchy. The default PATH is
598the current directory; default EXPRESSION is '-print'
599
John Beppu4581b4c2000-01-19 15:04:41 +0000600
Erik Andersen62dc17a2000-04-13 01:18:23 +0000601EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000602
603 -follow Dereference symbolic links.
604 -name PATTERN File name (leading directories removed) matches PATTERN.
605 -print print the full file name followed by a newline to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000606
607Example:
608
609 $ find / -name /etc/passwd
610 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000611
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000612-------------------------------
613
John Beppu46a4e762000-01-18 22:33:11 +0000614=item free
615
John Beppu4581b4c2000-01-19 15:04:41 +0000616Usage: free
617
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000618Displays the amount of free and used system memory.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000619
620Example:
621
622 $ free
Erik Andersen5e1189e2000-04-15 16:34:54 +0000623 total used free shared buffers
Erik Andersen62dc17a2000-04-13 01:18:23 +0000624 Mem: 257628 248724 8904 59644 93124
625 Swap: 128516 8404 120112
626 Total: 386144 257128 129016
627
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000628-------------------------------
629
630=item freeramdisk
631
632Usage: freeramdisk DEVICE
633
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000634Frees all memory used by the specified ramdisk.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000635
636Example:
637
638 $ freeramdisk /dev/ram2
639
640-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000641
John Beppu46a4e762000-01-18 22:33:11 +0000642=item fsck.minix
643
John Beppuf17792c2000-04-13 03:16:01 +0000644Usage: fsck.minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000645
646Performs a consistency check for MINIX filesystems.
647
Eric Andersen2086e3d2000-07-04 22:17:01 +0000648Options:
John Beppuf17792c2000-04-13 03:16:01 +0000649
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000650 -l Lists all filenames
651 -r Perform interactive repairs
652 -a Perform automatic repairs
653 -v verbose
654 -s Outputs super-block information
655 -m Activates MINIX-like "mode not cleared" warnings
656 -f Force file system check.
657
658-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000659
Eric Andersena1f16bb2000-08-21 22:02:34 +0000660=item getopt
661
662Usage: getopt [OPTIONS]...
663
664Parse command options
665
666Options:
667
668 -a, --alternative Allow long options starting with single -\n"
669 -l, --longoptions=longopts Long options to be recognized\n"
670 -n, --name=progname The name under which errors are reported\n"
671 -o, --options=optstring Short options to be recognized\n"
672 -q, --quiet Disable error reporting by getopt(3)\n"
673 -Q, --quiet-output No normal output\n"
674 -s, --shell=shell Set shell quoting conventions\n"
675 -T, --test Test for getopt(1) version\n"
676 -u, --unqote Do not quote the output\n"
677
678Example:
Eric Andersene4c4d692000-08-21 23:29:45 +0000679
Eric Andersena1f16bb2000-08-21 22:02:34 +0000680 $ cat getopt.test
681 #!/bin/sh
682 GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
683 -n 'example.busybox' -- "$@"`
684 if [ $? != 0 ] ; then exit 1 ; fi
685 eval set -- "$GETOPT"
686 while true ; do
687 case $1 in
688 -a|--a-long) echo "Option a" ; shift ;;
689 -b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;;
690 -c|--c-long)
691 case "$2" in
692 "") echo "Option c, no argument"; shift 2 ;;
693 *) echo "Option c, argument \`$2'" ; shift 2 ;;
694 esac ;;
695 --) shift ; break ;;
696 *) echo "Internal error!" ; exit 1 ;;
697 esac
698 done
699
700
701-------------------------------
702
John Beppu46a4e762000-01-18 22:33:11 +0000703=item grep
704
Erik Andersen62dc17a2000-04-13 01:18:23 +0000705Usage: grep [OPTIONS]... PATTERN [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000706
Erik Andersen62dc17a2000-04-13 01:18:23 +0000707Search for PATTERN in each FILE or standard input.
708
Eric Andersen2086e3d2000-07-04 22:17:01 +0000709Options:
John Beppuf17792c2000-04-13 03:16:01 +0000710
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000711 -h suppress the prefixing filename on output
712 -i ignore case distinctions
713 -n print line number with output lines
714 -q be quiet. Returns 0 if result was found, 1 otherwise
Erik Andersena19bc642000-05-02 06:40:02 +0000715 -v select non-matching lines
Erik Andersen62dc17a2000-04-13 01:18:23 +0000716
Eric Andersen98cd53e2000-06-16 19:56:44 +0000717This version of grep matches full regular expressions.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000718
Erik Andersen62dc17a2000-04-13 01:18:23 +0000719Example:
720
721 $ grep root /etc/passwd
722 root:x:0:0:root:/root:/bin/bash
723 $ grep ^[rR]oo. /etc/passwd
724 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000725
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000726-------------------------------
727
728=item gunzip
729
Erik Andersen5e1189e2000-04-15 16:34:54 +0000730Usage: gunzip [OPTION]... FILE
731
732Uncompress FILE (or standard input if FILE is '-').
733
734Options:
735
736 -c Write output to standard output
737 -t Test compressed file integrity
738
739Example:
740
Erik Andersencf8d38a2000-04-21 01:23:36 +0000741 $ ls -la /tmp/BusyBox*
742 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
743 $ gunzip /tmp/BusyBox-0.43.tar.gz
744 $ ls -la /tmp/BusyBox*
745 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000746
747-------------------------------
748
749=item gzip
750
Erik Andersen5e1189e2000-04-15 16:34:54 +0000751Usage: gzip [OPTION]... FILE
752
753Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000754When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000755
756Options:
757
758 -c Write output to standard output instead of FILE.gz
759
760Example:
761
Erik Andersencf8d38a2000-04-21 01:23:36 +0000762 $ ls -la /tmp/BusyBox*
763 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
764 $ gzip /tmp/BusyBox-0.43.tar
765 $ ls -la /tmp/BusyBox*
766 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen5e1189e2000-04-15 16:34:54 +0000767
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000768
769-------------------------------
770
771=item halt
772
Erik Andersen5e1189e2000-04-15 16:34:54 +0000773Usage: halt
774
Eric Andersen98cd53e2000-06-16 19:56:44 +0000775This command halts the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000776
777-------------------------------
778
John Beppu46a4e762000-01-18 22:33:11 +0000779=item head
780
Erik Andersen62dc17a2000-04-13 01:18:23 +0000781Usage: head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000782
783Print first 10 lines of each FILE to standard output.
784With more than one FILE, precede each with a header giving the
785file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000786
787Options:
John Beppuf17792c2000-04-13 03:16:01 +0000788
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000789 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000790
791Example:
792
793 $ head -n 2 /etc/passwd
794 root:x:0:0:root:/root:/bin/bash
795 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000796
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000797-------------------------------
798
799=item hostid
800
Erik Andersen5e1189e2000-04-15 16:34:54 +0000801Usage: hostid
802
803Prints out a unique 32-bit identifier for the current
804machine. The 32-bit identifier is intended to be unique
805among all UNIX systems in existence.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000806
807-------------------------------
808
John Beppu46a4e762000-01-18 22:33:11 +0000809=item hostname
810
John Beppuf17792c2000-04-13 03:16:01 +0000811Usage: hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000812
John Beppu4581b4c2000-01-19 15:04:41 +0000813Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000814(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000815
Erik Andersen62dc17a2000-04-13 01:18:23 +0000816Options:
John Beppuf17792c2000-04-13 03:16:01 +0000817
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000818 -s Short
819 -i Addresses for the hostname
820 -d DNS domain name
821 -F FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000822
823Example:
824
825 $ hostname
826 slag
John Beppu46a4e762000-01-18 22:33:11 +0000827
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000828-------------------------------
829
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000830=item id
831
832Print information for USERNAME or the current user
833
834Options:
835
836 -g prints only the group ID
837 -u prints only the user ID
838 -r prints the real user ID instead of the effective ID (with -ug)
839
840Example:
841
842 $ id
843 uid=1000(andersen) gid=1000(andersen)
844
845-------------------------------
846
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000847=item init
848
Erik Andersen5e1189e2000-04-15 16:34:54 +0000849Usage: init
850
851Init is the parent of all processes.
852
853This version of init is designed to be run only by the kernel.
854
855BusyBox init doesn't support multiple runlevels. The runlevels field of
856the /etc/inittab file is completely ignored by BusyBox init. If you want
857runlevels, use sysvinit.
858
859BusyBox init works just fine without an inittab. If no inittab is found,
860it has the following default behavior:
861
862 ::sysinit:/etc/init.d/rcS
863 ::askfirst:/bin/sh
864
865if it detects that /dev/console is _not_ a serial console, it will also run:
866
867 tty2::askfirst:/bin/sh
868
869If you choose to use an /etc/inittab file, the inittab entry format is as follows:
870
871 <id>:<runlevels>:<action>:<process>
872
873 <id>:
874
875 WARNING: This field has a non-traditional meaning for BusyBox init!
876 The id field is used by BusyBox init to specify the controlling tty for
877 the specified process to run on. The contents of this field are
878 appended to "/dev/" and used as-is. There is no need for this field to
879 be unique, although if it isn't you may have strange results. If this
880 field is left blank, it is completely ignored. Also note that if
881 BusyBox detects that a serial console is in use, then all entries
882 containing non-empty id fields will _not_ be run. BusyBox init does
883 nothing with utmp. We don't need no stinkin' utmp.
884
885 <runlevels>:
886
887 The runlevels field is completely ignored.
888
889 <action>:
890
891 Valid actions include: sysinit, respawn, askfirst, wait,
892 once, and ctrlaltdel.
893
894 askfirst acts just like respawn, but before running the specified
895 process it displays the line "Please press Enter to activate this
896 console." and then waits for the user to press enter before starting
897 the specified process.
898
Eric Andersen98cd53e2000-06-16 19:56:44 +0000899 Unrecognized actions (like initdefault) will cause init to emit
Erik Andersen5e1189e2000-04-15 16:34:54 +0000900 an error message, and then go along with its business.
901
902 <process>:
903
904 Specifies the process to be executed and it's command line.
905
906
907Example /etc/inittab file:
908
909 # This is run first except when booting in single-user mode.
910 #
911 ::sysinit:/etc/init.d/rcS
912
913 # /bin/sh invocations on selected ttys
914 #
915 # Start an "askfirst" shell on the console (whatever that may be)
916 ::askfirst:/bin/sh
917 # Start an "askfirst" shell on /dev/tty2
918 tty2::askfirst:/bin/sh
919
920 # /sbin/getty invocations for selected ttys
921 #
922 tty4::respawn:/sbin/getty 38400 tty4
923 tty5::respawn:/sbin/getty 38400 tty5
924
925
926 # Example of how to put a getty on a serial line (for a terminal)
927 #
928 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
929 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
930 #
931 # Example how to put a getty on a modem line.
932 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
933
934 # Stuff to do before rebooting
935 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
936 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000937
938-------------------------------
939
Eric Andersenfeb47c02000-06-21 21:03:13 +0000940=item insmod
941
942Usage: insmod [OPTION]... MODULE [symbol=value]...
943
944Loads the specified kernel modules into the kernel.
945
946Options:
947
948 -f Force module to load into the wrong kernel version.
949 -k Make module autoclean-able.
950 -v verbose output
951 -x do not export externs
952
953-------------------------------
954
John Beppu46a4e762000-01-18 22:33:11 +0000955=item kill
956
John Beppuf17792c2000-04-13 03:16:01 +0000957Usage: kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000958
Erik Andersen62dc17a2000-04-13 01:18:23 +0000959Send a signal (default is SIGTERM) to the specified process(es).
960
961Options:
John Beppuf17792c2000-04-13 03:16:01 +0000962
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000963 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000964
965Example:
966
967 $ ps | grep apache
968 252 root root S [apache]
969 263 www-data www-data S [apache]
970 264 www-data www-data S [apache]
971 265 www-data www-data S [apache]
972 266 www-data www-data S [apache]
973 267 www-data www-data S [apache]
974 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +0000975
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000976-------------------------------
977
978=item killall
979
John Beppu9057b6a2000-04-16 10:22:28 +0000980Usage: killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +0000981
982Send a signal (default is SIGTERM) to the specified process(es).
983
984Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000985
Erik Andersen5e1189e2000-04-15 16:34:54 +0000986 -l List all signal names and numbers.
987
988Example:
989
990 $ killall apache
991
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000992-------------------------------
993
994=item length
995
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000996Usage: length STRING
Erik Andersen5e1189e2000-04-15 16:34:54 +0000997
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000998Prints out the length of the specified STRING.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000999
1000Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001001
Erik Andersen5e1189e2000-04-15 16:34:54 +00001002 $ length "Hello"
1003 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001004
1005-------------------------------
1006
John Beppu46a4e762000-01-18 22:33:11 +00001007=item ln
1008
John Beppu4581b4c2000-01-19 15:04:41 +00001009Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +00001010
John Beppu4581b4c2000-01-19 15:04:41 +00001011Create a link named LINK_NAME or DIRECTORY to the specified TARGET
Eric Andersenaddc9c22000-06-21 22:53:24 +00001012You may use '--' to indicate that all following arguments are non-options.
Pavel Roskin1a804e42000-06-21 21:38:00 +00001013
John Beppu4581b4c2000-01-19 15:04:41 +00001014Options:
1015
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001016 -s make symbolic links instead of hard links
1017 -f remove existing destination files
Pavel Roskin1a804e42000-06-21 21:38:00 +00001018
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001019Example:
1020
Erik Andersencf8d38a2000-04-21 01:23:36 +00001021 $ ln -s BusyBox /tmp/ls
Erik Andersena19bc642000-05-02 06:40:02 +00001022 $ ls -l /tmp/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +00001023 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001024
1025-------------------------------
1026
1027=item loadacm
1028
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001029Usage: loadacm
1030
1031Loads an acm from standard input.
1032
1033Example:
1034
1035 $ loadacm < /etc/i18n/acmname
Erik Andersen5e1189e2000-04-15 16:34:54 +00001036
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001037-------------------------------
1038
1039=item loadfont
1040
Erik Andersena6c75222000-04-18 00:00:52 +00001041Usage: loadfont
1042
1043Loads a console font from standard input.
1044
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001045Example:
1046
1047 $ loadfont < /etc/i18n/fontname
Erik Andersen5e1189e2000-04-15 16:34:54 +00001048
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001049-------------------------------
1050
1051=item loadkmap
1052
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001053Usage: loadkmap
1054
1055Loads a binary keyboard translation table from standard input.
1056
1057Example:
1058
1059 $ loadkmap < /etc/i18n/lang-keymap
Erik Andersen5e1189e2000-04-15 16:34:54 +00001060
1061-------------------------------
1062
1063=item logger
1064
1065Usage: logger [OPTION]... [MESSAGE]
1066
1067Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
1068
1069Options:
1070
1071 -s Log to stderr as well as the system log.
1072 -t Log using the specified tag (defaults to user name).
1073 -p Enter the message with the specified priority.
1074 This may be numerical or a ``facility.level'' pair.
1075
1076Example:
1077
1078 $ logger "hello"
1079
1080-------------------------------
1081
1082=item logname
1083
1084Usage: logname
1085
1086Print the name of the current user.
1087
1088Example:
1089
1090 $ logname
1091 root
1092
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001093-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001094
John Beppu46a4e762000-01-18 22:33:11 +00001095=item ls
1096
Eric Andersena42982e2000-06-07 17:28:53 +00001097Usage: ls [B<-1acdelnpuxACFR>] [filenames...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001098
1099Options:
1100
1101 -a do not hide entries starting with .
1102 -c with -l: show ctime (the time of last
1103 modification of file status information)
1104 -d list directory entries instead of contents
1105 -e list both full date and full time
1106 -l use a long listing format
1107 -n list numeric UIDs and GIDs instead of names
1108 -p append indicator (one of /=@|) to entries
1109 -u with -l: show access time (the time of last
1110 access of the file)
1111 -x list entries by lines instead of by columns
1112 -A do not list implied . and ..
1113 -C list entries by columns
1114 -F append indicator (one of */=@|) to entries
Eric Andersena42982e2000-06-07 17:28:53 +00001115 -R list subdirectories recursively
John Beppu50ed0672000-04-13 23:44:04 +00001116
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001117-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001118
John Beppu46a4e762000-01-18 22:33:11 +00001119=item lsmod
1120
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001121Usage: lsmod
John Beppu4581b4c2000-01-19 15:04:41 +00001122
Erik Andersen5e1189e2000-04-15 16:34:54 +00001123Shows a list of all currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001124
1125-------------------------------
1126
1127=item makedevs
1128
Erik Andersen5e1189e2000-04-15 16:34:54 +00001129Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
1130
1131Creates a range of block or character special files
1132
1133TYPEs include:
1134
1135 b: Make a block (buffered) device.
1136 c or u: Make a character (un-buffered) device.
1137 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
1138
1139FIRST specifies the number appended to NAME to create the first device.
1140LAST specifies the number of the last item that should be created.
1141If 's' is the last argument, the base device is created as well.
1142
1143Example:
1144
1145 $ makedevs /dev/ttyS c 4 66 2 63
1146 [creates ttyS2-ttyS63]
1147 $ makedevs /dev/hda b 3 0 0 8 s
1148 [creates hda,hda1-hda8]
1149
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001150-------------------------------
1151
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001152=item md5sum
1153
1154Usage: md5sum [OPTION] [file ...]
1155
1156Print or check MD5 checksums.
1157
1158Options:
1159
1160 -b read files in binary mode
1161 -c check MD5 sums against given list
1162 -t read files in text mode (default)
1163 -g read a string
1164
1165The following two options are useful only when verifying checksums:
1166
1167 -s don't output anything, status code shows success
1168 -w warn about improperly formated MD5 checksum lines
1169
1170Example:
1171
1172 $ md5sum busybox
1173 6fd11e98b98a58f64ff3398d7b324003 busybox
1174 $ md5sum -c -
1175 6fd11e98b98a58f64ff3398d7b324003 busybox
1176 busybox: OK
1177 ^D
1178
1179-------------------------------
1180
John Beppu46a4e762000-01-18 22:33:11 +00001181=item mkdir
1182
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001183Usage: mkdir [OPTION] DIRECTORY...
1184
John Beppu4581b4c2000-01-19 15:04:41 +00001185Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001186
John Beppu4581b4c2000-01-19 15:04:41 +00001187Options:
1188
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001189 -m set permission mode (as in chmod), not rwxrwxrwx - umask
Eric Andersen98cd53e2000-06-16 19:56:44 +00001190 -p no error if directory exists, make parent directories as needed
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001191
1192Example:
1193
1194 $ mkdir /tmp/foo
1195 $ mkdir /tmp/foo
1196 /tmp/foo: File exists
1197 $ mkdir /tmp/foo/bar/baz
1198 /tmp/foo/bar/baz: No such file or directory
1199 $ mkdir -p /tmp/foo/bar/baz
1200
1201-------------------------------
1202
1203=item mkfifo
1204
Erik Andersen5e1189e2000-04-15 16:34:54 +00001205Usage: mkfifo [OPTIONS] name
1206
1207Creates a named pipe (identical to 'mknod name p')
1208
1209Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001210
Erik Andersen5e1189e2000-04-15 16:34:54 +00001211 -m create the pipe using the specified mode (default a=rw)
1212
1213-------------------------------
1214
1215=item mkfs.minix
1216
1217Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1218
1219Make a MINIX filesystem.
1220
Eric Andersen2086e3d2000-07-04 22:17:01 +00001221Options:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001222
1223 -c Check the device for bad blocks
1224 -n [14|30] Specify the maximum length of filenames
1225 -i Specify the number of inodes for the filesystem
1226 -l FILENAME Read the bad blocks list from FILENAME
1227 -v Make a Minix version 2 filesystem
1228
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001229-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001230
John Beppu46a4e762000-01-18 22:33:11 +00001231=item mknod
1232
Erik Andersen5e1189e2000-04-15 16:34:54 +00001233Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001234
Erik Andersen5e1189e2000-04-15 16:34:54 +00001235Create a special file (block, character, or pipe).
1236
1237Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001238
Erik Andersen5e1189e2000-04-15 16:34:54 +00001239 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001240
1241TYPEs include:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001242 b: Make a block (buffered) device.
1243 c or u: Make a character (un-buffered) device.
1244 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001245
1246Example:
1247
1248 $ mknod /dev/fd0 b 2 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00001249 $ mknod -m 644 /tmp/pipe p
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001250
1251-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001252
John Beppu46a4e762000-01-18 22:33:11 +00001253=item mkswap
1254
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001255Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1256
John Beppu4581b4c2000-01-19 15:04:41 +00001257Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001258
John Beppu4581b4c2000-01-19 15:04:41 +00001259Options:
1260
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001261 -c Check for read-ability.
1262 -v0 Make version 0 swap [max 128 Megs].
1263 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1264 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001265
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001266-------------------------------
1267
Erik Andersen227a59b2000-04-25 23:24:55 +00001268=item mktemp
1269
Erik Andersene31c0662000-05-02 05:32:07 +00001270Usage: mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001271
1272Creates a temporary file with its name based on TEMPLATE.
1273TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1274
1275Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001276
Erik Andersen227a59b2000-04-25 23:24:55 +00001277 $ mktemp /tmp/temp.XXXXXX
1278 /tmp/temp.mWiLjM
1279 $ ls -la /tmp/temp.mWiLjM
1280 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1281
1282-------------------------------
1283
John Beppu46a4e762000-01-18 22:33:11 +00001284=item more
1285
John Beppu4581b4c2000-01-19 15:04:41 +00001286Usage: more [file ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001287
1288More is a filter for paging through text one screenful at a time.
1289
1290Example:
1291
1292 $ dmesg | more
John Beppu50ed0672000-04-13 23:44:04 +00001293
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001294-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001295
John Beppu46a4e762000-01-18 22:33:11 +00001296=item mount
1297
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001298Usage: mount [flags]
1299 mount [flags] device directory [B<-o> options,more-options]
John Beppu4581b4c2000-01-19 15:04:41 +00001300
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001301Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001302
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001303 -a: Mount all file systems in fstab.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001304 -o option: One of many filesystem options, listed below.
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001305 -r: Mount the filesystem read-only.
1306 -t fs-type: Specify the filesystem type.
1307 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001308
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001309Options for use with the "B<-o>" flag:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001310
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001311 async/sync: Writes are asynchronous / synchronous.
1312 atime/noatime: Enable / disable updates to inode access times.
1313 dev/nodev: Allow use of special device files / disallow them.
1314 exec/noexec: Allow use of executable files / disallow them.
1315 loop: Mounts a file via loop device.
1316 suid/nosuid: Allow set-user-id-root programs / disallow them.
1317 remount: Re-mount a currently-mounted filesystem, changing its flags.
1318 ro/rw: Mount for read-only / read-write.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001319 There are EVEN MORE flags that are specific to each filesystem.
1320 You'll have to see the written documentation for those.
1321
1322Example:
1323
1324 $ mount
1325 /dev/hda3 on / type minix (rw)
1326 proc on /proc type proc (rw)
1327 devpts on /dev/pts type devpts (rw)
1328 $ mount /dev/fd0 /mnt -t msdos -o ro
1329 $ mount /tmp/diskimage /opt -t ext2 -o loop
John Beppu50ed0672000-04-13 23:44:04 +00001330
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001331-------------------------------
1332
1333=item mt
1334
John Beppu9057b6a2000-04-16 10:22:28 +00001335Usage: mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001336
1337Control magnetic tape drive operation
1338
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001339-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001340
John Beppu46a4e762000-01-18 22:33:11 +00001341=item mv
1342
John Beppu4581b4c2000-01-19 15:04:41 +00001343Usage: mv SOURCE DEST
1344
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001345 or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001346
1347Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001348
1349Example:
1350
1351 $ mv /tmp/foo /bin/bar
John Beppu50ed0672000-04-13 23:44:04 +00001352
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001353-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001354
Eric Andersen028fb622000-07-04 20:07:13 +00001355=item nc
1356
1357Usage: nc [IP] [port]
1358
1359Netcat opens a pipe to IP:port
1360
1361Example:
1362
1363 $ nc foobar.somedomain.com 25
1364 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1365 help
1366 214-Commands supported:
1367 214- HELO EHLO MAIL RCPT DATA AUTH
1368 214 NOOP QUIT RSET HELP
1369 quit
1370 221 foobar closing connection
1371
1372-------------------------------
1373
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001374=item nslookup
John Beppu46a4e762000-01-18 22:33:11 +00001375
Erik Andersen5e1189e2000-04-15 16:34:54 +00001376Usage: nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001377
Erik Andersen5e1189e2000-04-15 16:34:54 +00001378Queries the nameserver for the IP address of the given HOST
1379
1380Example:
1381
1382 $ nslookup localhost
1383 Server: default
1384 Address: default
1385
1386 Name: debian
1387 Address: 127.0.0.1
John Beppu46a4e762000-01-18 22:33:11 +00001388
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001389-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001390
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001391=item ping
1392
1393Usage: ping [OPTION]... host
1394
1395Send ICMP ECHO_REQUEST packets to network hosts.
1396
1397Options:
1398
1399 -c COUNT Send only COUNT pings.
Pavel Roskin0024abc2000-06-07 20:38:15 +00001400 -s SIZE Send SIZE data bytes in packets (default=56).
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001401 -q Quiet mode, only displays output at start
1402 and when finished.
1403Example:
1404
1405 $ ping localhost
1406 PING slag (127.0.0.1): 56 data bytes
1407 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1408
1409 --- debian ping statistics ---
1410 1 packets transmitted, 1 packets received, 0% packet loss
1411 round-trip min/avg/max = 20.1/20.1/20.1 ms
1412
1413-------------------------------
1414
Erik Andersen5e1189e2000-04-15 16:34:54 +00001415=item poweroff
1416
1417Shuts down the system, and requests that the kernel turn off power upon halting.
1418
1419-------------------------------
1420
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001421=item printf
1422
Erik Andersen5e1189e2000-04-15 16:34:54 +00001423Usage: printf format [argument...]
1424
1425Formats and prints the given data in a manner similar to the C printf command.
1426
1427Example:
1428
1429 $ printf "Val=%d\n" 5
1430 Val=5
1431
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001432-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001433
John Beppu46a4e762000-01-18 22:33:11 +00001434=item ps
1435
Erik Andersen5e1189e2000-04-15 16:34:54 +00001436Usage: ps
1437
1438Report process status
1439
1440This version of ps accepts no options.
1441
1442Example:
1443
1444 $ ps
1445 PID Uid Gid State Command
1446 1 root root S init
1447 2 root root S [kflushd]
1448 3 root root S [kupdate]
1449 4 root root S [kpiod]
1450 5 root root S [kswapd]
1451 742 andersen andersen S [bash]
1452 743 andersen andersen S -bash
1453 745 root root S [getty]
1454 2990 andersen andersen R ps
1455
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001456-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001457
John Beppu46a4e762000-01-18 22:33:11 +00001458=item pwd
1459
Erik Andersen5e1189e2000-04-15 16:34:54 +00001460Prints the full filename of the current working directory.
1461
1462Example:
1463
1464 $ pwd
1465 /root
1466
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001467-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001468
Eric Andersen918507e2000-08-21 22:46:33 +00001469=item rdate
1470
1471Usage: rdate [OPTION] HOST
1472
1473Get and possibly set the system date and time from a remote HOST.
1474
1475Options:
1476
1477 -s Set the system date and time (default).
1478 -p Print the date and time.
1479
1480-------------------------------
1481
John Beppu46a4e762000-01-18 22:33:11 +00001482=item reboot
1483
Erik Andersen5e1189e2000-04-15 16:34:54 +00001484Instructs the kernel to reboot the system.
1485
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001486-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001487
Eric Andersenbf960f52000-07-21 21:32:12 +00001488=item renice
1489
1490Usage: renice priority pid [pid ...]
1491
1492Changes priority of running processes. Allowed priorities range
1493from 20 (the process runs only when nothing else is running) to 0
1494(default priority) to -20 (almost nothing else ever gets to run).
1495
1496-------------------------------
1497
Eric Andersenfa405d02000-08-21 21:18:52 +00001498=item reset
1499
1500Usage: reset
1501
1502Resets the screen.
1503
1504-------------------------------
1505
John Beppu46a4e762000-01-18 22:33:11 +00001506=item rm
1507
Erik Andersen5e1189e2000-04-15 16:34:54 +00001508Usage: rm [OPTION]... FILE...
1509
Eric Andersen815e9042000-06-06 16:15:23 +00001510Remove (unlink) the FILE(s). You may use '--' to
1511indicate that all following arguments are non-options.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001512
1513Options:
1514
1515 -f remove existing destinations, never prompt
1516 -r or -R remove the contents of directories recursively
1517
1518Example:
1519
1520 $ rm -rf /tmp/foo
1521
1522-------------------------------
1523
1524=item rmdir
1525
1526Usage: rmdir [OPTION]... DIRECTORY...
1527
1528Remove the DIRECTORY(ies), if they are empty.
1529
1530Example:
1531
1532 # rmdir /tmp/foo
1533
1534-------------------------------
1535
1536=item rmmod
1537
1538Usage: rmmod [OPTION]... [MODULE]...
1539
1540Unloads the specified kernel modules from the kernel.
1541
1542Options:
1543
1544 -a Try to remove all unused kernel modules.
1545
1546Example:
1547
1548 $ rmmod tulip
1549
1550-------------------------------
1551
1552=item sed
1553
John Beppu9057b6a2000-04-16 10:22:28 +00001554Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001555
1556Allowed sed scripts come in the following form:
1557
1558 'ADDR [!] COMMAND'
1559
1560 where address ADDR can be:
1561 NUMBER Match specified line number
1562 $ Match last line
1563 /REGEXP/ Match specified regexp
1564 (! inverts the meaning of the match)
1565
1566 and COMMAND can be:
1567 s/regexp/replacement/[igp]
1568 which attempt to match regexp against the pattern space
1569 and if successful replaces the matched portion with replacement.
1570
1571 aTEXT
1572 which appends TEXT after the pattern space
1573
1574Options:
1575
1576 -e add the script to the commands to be executed
1577 -n suppress automatic printing of pattern space
1578
Eric Andersen98cd53e2000-06-16 19:56:44 +00001579This version of sed matches full regular expressions.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001580
1581Example:
1582
1583 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1584 bar
1585
1586-------------------------------
1587
Erik Andersen4f3f7572000-04-28 00:18:56 +00001588=item setkeycodes
1589
1590Usage: setkeycodes SCANCODE KEYCODE ...
1591
1592Set entries into the kernel's scancode-to-keycode map,
1593allowing unusual keyboards to generate usable keycodes.
1594
1595SCANCODE may be either xx or e0xx (hexadecimal),
1596and KEYCODE is given in decimal
1597
1598Example:
1599
1600 # setkeycodes e030 127
1601
1602-------------------------------
1603
Eric Andersen028fb622000-07-04 20:07:13 +00001604=item sh
1605
1606Usage: sh
1607
1608lash -- the BusyBox LAme SHell (command interpreter)
1609
1610This command does not yet have proper documentation.
1611
1612Use lash just as you would use any other shell. It properly handles pipes,
1613redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1614has a sufficient set of builtins to do what is needed. It does not (yet)
1615support Bourne Shell syntax. If you need things like "if-then-else", "while",
1616and such, use ash or bash. If you just need a very simple and extremely small
1617shell, this will do the job.
1618
1619-------------------------------
1620
Erik Andersen5e1189e2000-04-15 16:34:54 +00001621=item sleep
1622
1623Usage: sleep N
1624
1625Pause for N seconds.
1626
1627Example:
1628
1629 $ sleep 2
1630 [2 second delay results]
1631
1632-------------------------------
1633
1634=item sort
1635
John Beppu9057b6a2000-04-16 10:22:28 +00001636Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001637
1638Sorts lines of text in the specified files
1639
1640Example:
1641
1642 $ echo -e "e\nf\nb\nd\nc\na" | sort
1643 a
1644 b
1645 c
1646 d
1647 e
1648 f
1649
1650-------------------------------
1651
Eric Andersen028fb622000-07-04 20:07:13 +00001652=item swapoff
1653
1654Usage: swapoff [OPTION] [device]
1655
1656Stop swapping virtual memory pages on the given device.
1657
1658Options:
1659
1660 -a Stop swapping on all swap devices
1661
1662-------------------------------
1663
1664=item swapon
1665
1666Usage: swapon [OPTION] [device]
1667
1668Start swapping virtual memory pages on the given device.
1669
1670Options:
1671
1672 -a Start swapping on all swap devices
1673
1674-------------------------------
1675
Erik Andersen5e1189e2000-04-15 16:34:54 +00001676=item sync
1677
1678Usage: sync
1679
1680Write all buffered filesystem blocks to disk.
1681
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001682-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001683
John Beppu46a4e762000-01-18 22:33:11 +00001684=item syslogd
1685
Erik Andersen5e1189e2000-04-15 16:34:54 +00001686Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001687
Erik Andersen5e1189e2000-04-15 16:34:54 +00001688Linux system and kernel (provides klogd) logging utility.
1689Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001690
Erik Andersen5e1189e2000-04-15 16:34:54 +00001691Options:
Pavel Roskin049b7062000-06-07 21:19:49 +00001692
Pavel Roskinda10ec02000-06-07 21:08:25 +00001693 -m NUM Interval between MARK lines (default=20min, 0=off)
1694 -n Run as a foreground process
1695 -K Do not start up the klogd process
1696 -O FILE Use an alternate log file (default=/var/log/messages)
Eric Andersenced2cef2000-07-20 23:41:24 +00001697 -R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
1698
1699Example:
1700
1701 $ syslogd -R masterlog:514
1702 $ syslogd -R 192.168.1.1:601
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001703
1704-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001705
John Beppu46a4e762000-01-18 22:33:11 +00001706=item tail
1707
Erik Andersen5e1189e2000-04-15 16:34:54 +00001708Usage: tail [OPTION] [FILE]...
1709
1710Print last 10 lines of each FILE to standard output.
1711With more than one FILE, precede each with a header giving the
1712file name. With no FILE, or when FILE is -, read standard input.
1713
1714Options:
1715
1716 -n NUM Print last NUM lines instead of first 10
1717 -f Output data as the file grows. This version
1718 of 'tail -f' supports only one file at a time.
1719
1720Example:
1721
1722 $ tail -n 1 /etc/resolv.conf
1723 nameserver 10.0.0.1
1724
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001725-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001726
John Beppu46a4e762000-01-18 22:33:11 +00001727=item tar
1728
John Beppu9057b6a2000-04-16 10:22:28 +00001729Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001730
1731Create, extract, or list files from a tar file. Note that
1732this version of tar treats hard links as separate files.
1733
1734Main operation mode:
1735
1736 c create
1737 x extract
1738 t list
1739
1740File selection:
1741
1742 f name of tarfile or "-" for stdin
1743 O extract to stdout
Eric Andersenfdd51032000-08-02 18:48:26 +00001744 exclude file to exclude
Erik Andersen5e1189e2000-04-15 16:34:54 +00001745
1746Informative output:
1747
1748 v verbosely list files processed
1749
1750Example:
1751
1752 $ zcat /tmp/tarball.tar.gz | tar -xf -
1753 $ tar -cf /tmp/tarball.tar /usr/local
1754
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001755-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001756
Eric Andersen028fb622000-07-04 20:07:13 +00001757=item tee
1758
1759Usage: tee [OPTION]... [FILE]...
1760
1761Copy standard input to each FILE, and also to standard output.
1762
1763Options:
1764
1765 -a append to the given FILEs, do not overwrite
1766
1767Example:
1768
1769 $ echo "Hello" | tee /tmp/foo
1770 $ cat /tmp/foo
1771 Hello
1772
1773-------------------------------
1774
1775=item telnet
1776
1777Usage: telnet host [port]
1778
1779Telnet is used to establish interactive communication with another
1780computer over a network using the TELNET protocol.
1781
1782-------------------------------
1783
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001784=item test, [
1785
Erik Andersen5e1189e2000-04-15 16:34:54 +00001786Usage: test EXPRESSION
1787or [ EXPRESSION ]
1788
1789Checks file types and compares values returning an exit
1790code determined by the value of EXPRESSION.
1791
1792Example:
1793
1794 $ test 1 -eq 2
1795 $ echo $?
1796 1
1797 $ test 1 -eq 1
1798 $ echo $?
1799 0
1800 $ [ -d /etc ]
1801 $ echo $?
1802 0
1803 $ [ -d /junk ]
1804 $ echo $?
1805 1
1806
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001807-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001808
John Beppu46a4e762000-01-18 22:33:11 +00001809=item touch
1810
John Beppu9057b6a2000-04-16 10:22:28 +00001811Usage: touch [B<-c>] file [file ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001812
1813Update the last-modified date on (or create) the selected file[s].
1814
1815Example:
1816
1817 $ ls -l /tmp/foo
1818 /bin/ls: /tmp/foo: No such file or directory
1819 $ touch /tmp/foo
1820 $ ls -l /tmp/foo
1821 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1822
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001823-------------------------------
1824
1825=item tr
Erik Andersena19bc642000-05-02 06:40:02 +00001826
Erik Andersen3c1217c2000-05-01 22:34:24 +00001827Usage: tr [-cds] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001828
Erik Andersen3c1217c2000-05-01 22:34:24 +00001829Translate, squeeze, and/or delete characters from
1830standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001831
Erik Andersen3c1217c2000-05-01 22:34:24 +00001832Options:
1833
1834 -c take complement of STRING1
1835 -d delete input characters coded STRING1
1836 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00001837
1838Example:
1839
1840 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1841 hello world
1842
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001843-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001844
John Beppu46a4e762000-01-18 22:33:11 +00001845=item true
1846
Erik Andersen5e1189e2000-04-15 16:34:54 +00001847Returns an exit code of TRUE (0)
1848
1849Example:
1850
1851 $ true
1852 $ echo $?
1853 0
1854
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001855-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001856
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001857=item tty
John Beppu4581b4c2000-01-19 15:04:41 +00001858
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001859Usage: tty
1860
1861Print the file name of the terminal connected to standard input.
1862
1863Options:
1864
1865 -s print nothing, only return an exit status
1866
1867Example:
1868
1869 $ tty
1870 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00001871
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001872-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001873
John Beppu46a4e762000-01-18 22:33:11 +00001874=item umount
1875
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001876Usage: umount [flags] filesystem|directory
1877
1878Flags:
1879
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001880 -a: Unmount all file systems
1881 -r: Try to remount devices as read-only if mount is busy
1882 -f: Force filesystem umount (i.e. unreachable NFS server)
1883 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001884
1885Example:
1886
1887 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001888
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001889-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001890
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001891=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001892
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001893Usage: uname [OPTION]...
1894
Erik Andersen26702fe2000-04-17 16:44:46 +00001895Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001896
1897Options:
1898
1899 -a print all information
1900 -m the machine (hardware) type
1901 -n print the machine's network node hostname
1902 -r print the operating system release
1903 -s print the operating system name
1904 -p print the host processor type
1905 -v print the operating system version
1906
1907Example:
1908
1909 $ uname -a
1910 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001911
1912-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001913
John Beppu46a4e762000-01-18 22:33:11 +00001914=item uniq
1915
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001916Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1917
1918Discard all but one of successive identical lines from INPUT
1919(or standard input), writing to OUTPUT (or standard output).
1920
1921Example:
1922
1923 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1924 a
1925 b
1926 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001927
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001928-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001929
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001930=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001931
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001932Usage: update [options]
1933
1934Periodically flushes filesystem buffers.
1935
1936Options:
1937
1938 -S force use of sync(2) instead of flushing
1939 -s SECS call sync this often (default 30)
1940 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001941
1942-------------------------------
1943
1944=item uptime
1945
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001946Usage: uptime
1947
1948Tells how long the system has been running since boot.
1949
1950Example:
1951
1952 $ uptime
1953 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001954
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001955-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001956
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001957=item usleep
1958
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001959Usage: usleep N
1960
1961Pauses for N microseconds.
1962
1963Example:
1964
1965 $ usleep 1000000
1966 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001967
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001968-------------------------------
1969
Eric Andersen028fb622000-07-04 20:07:13 +00001970=item uuencode
1971
1972Usage: uuencode [OPTION] [INFILE] REMOTEFILE
1973
1974Uuencode a file.
1975
1976Options:
1977
1978 -m use base64 encoding as of RFC1521
1979
1980Example:
1981
1982 $ uuencode busybox busybox
1983 begin 755 busybox
1984 M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&
1985 .....
1986 $ uudecode busybox busybox > busybox.uu
1987 $
1988
1989-------------------------------
1990
1991=item uudecode
1992
1993Usage: uudecode [OPTION] [FILE]
1994
1995Uudecode a uuencoded file
1996
1997Options:
1998
1999 -o FILE direct output to FILE
2000
2001Example:
2002
2003 $ uudecode -o busybox busybox.uu
2004 $ ls -l busybox
2005 -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
2006
2007-------------------------------
2008
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002009=item wc
2010
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002011Usage: wc [OPTION]... [FILE]...
2012
2013Print line, word, and byte counts for each FILE, and a total line if
2014more than one FILE is specified. With no FILE, read standard input.
2015
2016Options:
2017
2018 -c print the byte counts
2019 -l print the newline counts
2020 -L print the length of the longest line
2021 -w print the word counts
2022
2023Example:
2024
2025 $ wc /etc/passwd
2026 31 46 1365 /etc/passwd
Erik Andersen5e1189e2000-04-15 16:34:54 +00002027
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002028-------------------------------
2029
Pavel Roskinafa06622000-06-21 21:43:24 +00002030=item which
2031
2032Usage: which [COMMAND ...]
2033
2034Locates a COMMAND.
2035
2036Example:
2037
2038 $ which login
2039 /bin/login
2040
2041-------------------------------
2042
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002043=item whoami
2044
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002045Usage: whoami
2046
2047Prints the user name associated with the current effective user id.
2048
2049Example:
2050
2051 $ whoami
2052 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00002053
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002054-------------------------------
2055
2056=item yes
2057
Erik Andersene5b6c7d2000-04-17 16:16:10 +00002058Usage: yes [OPTION]... [STRING]...
2059
2060Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00002061
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002062-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00002063
2064=item zcat
2065
Erik Andersen26702fe2000-04-17 16:44:46 +00002066This is essentially an alias for invoking "gunzip B<-c>", where
Eric Andersen98cd53e2000-06-16 19:56:44 +00002067it decompresses the file in question and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00002068
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00002069-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00002070
John Beppu46a4e762000-01-18 22:33:11 +00002071=back
John Beppu3a1b6be2000-01-18 15:45:59 +00002072
Erik Andersena19bc642000-05-02 06:40:02 +00002073=head1 LIBC NSS
2074
2075GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
2076library for the local environment, and to configure how it reads system data,
2077such as passwords and group information. BusyBox has made it Policy that it
2078will never use NSS, and will never use and libc calls that make use of NSS.
2079This allows you to run an embedded system without the need for installing an
2080/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
2081
2082If you are using a system that is using a remote LDAP server for authentication
2083via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
2084BusyBox source. Chances are though, that if you have enough space to install
2085of that stuff on your system, then you probably want the full GNU utilities.
2086
John Beppu3a1b6be2000-01-18 15:45:59 +00002087=head1 SEE ALSO
2088
2089textutils(1), shellutils(1), etc...
2090
2091=head1 MAINTAINER
2092
Erik Andersen1101d232000-04-19 05:15:12 +00002093Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002094
2095=head1 AUTHORS
2096
John Beppu08fe43d2000-01-19 12:39:16 +00002097The following people have contributed code to BusyBox whether
2098they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00002099
Erik Andersen1101d232000-04-19 05:15:12 +00002100Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00002101
John Beppu08fe43d2000-01-19 12:39:16 +00002102=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002103
John Beppu08fe43d2000-01-19 12:39:16 +00002104John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002105
John Beppu08fe43d2000-01-19 12:39:16 +00002106=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002107
John Beppu08fe43d2000-01-19 12:39:16 +00002108Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002109
John Beppu08fe43d2000-01-19 12:39:16 +00002110=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002111
John Beppu08fe43d2000-01-19 12:39:16 +00002112Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00002113
John Beppu08fe43d2000-01-19 12:39:16 +00002114=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002115
John Beppu08fe43d2000-01-19 12:39:16 +00002116Dave Cinege <dcinege@psychosis.com>
2117
2118=for html <br>
2119
John Beppu50ed0672000-04-13 23:44:04 +00002120Karl M. Hegbloom <karlheg@debian.org>
2121
2122=for html <br>
2123
John Beppu4fd10fc2000-04-17 05:13:59 +00002124John Lombardo <john@deltanet.com>
2125
2126=for html <br>
2127
Eric Andersen86ab8a32000-06-02 03:21:42 +00002128Glenn McGrath <bug1@netconnect.com.au>
2129
2130=for html <br>
2131
John Beppu08fe43d2000-01-19 12:39:16 +00002132Bruce Perens <bruce@perens.com>
2133
2134=for html <br>
2135
Pavel Roskin339b8922000-06-20 00:11:07 +00002136Pavel Roskin <proski@gnu.org>
Eric Andersen08e92892000-06-02 03:21:36 +00002137
2138=for html <br>
2139
John Beppu08fe43d2000-01-19 12:39:16 +00002140Linus Torvalds <torvalds@transmeta.com>
2141
2142=for html <br>
2143
2144Charles P. Wright <cpwright@villagenet.com>
2145
2146=for html <br>
2147
2148Enrique Zanardi <ezanardi@ull.es>
2149
2150=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00002151
2152=cut
John Beppu08fe43d2000-01-19 12:39:16 +00002153
Eric Andersen1b355eb2000-09-05 17:37:48 +00002154# $Id: busybox.pod,v 1.66 2000/09/05 17:37:48 andersen Exp $