blob: ca241433fb2ea4ba93e8694019bbc99b15a07d4f [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,
Pavel Roskinf7a01952000-06-21 20:25:07 +000060fdflush, find, free, freeramdisk, fsck.minix, grep, gunzip, gzip, halt,
61head, 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,
64nslookup, ping, poweroff, printf, ps, pwd, reboot, 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
282 -s Only output Lines if the include DELIM
283 -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
449-------------------------------
450
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000451=item dutmp
452
453Usage: dutmp [FILE]
454
455Dump utmp file format (pipe delimited) from FILE
456or stdin to stdout.
457
458Example:
459
460 $ dutmp /var/run/utmp
461 8|7||si|||0|0|0|955637625|760097|0
462 2|0|~|~~|reboot||0|0|0|955637625|782235|0
463 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
464 8|125||l4|||0|0|0|955637629|998367|0
465 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
466 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
467 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
Pavel Roskin1a804e42000-06-21 21:38:00 +0000468
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000469-------------------------------
470
471=item echo
472
473Usage: echo [-neE] [ARG ...]
474
475Prints the specified ARGs to stdout
476
477Options:
478
479 -n suppress trailing newline
480 -e interpret backslash-escaped characters (i.e. \t=tab etc)
481 -E disable interpretation of backslash-escaped characters
482
483Example:
484
485 $ echo "Erik is cool"
486 Erik is cool
487 $ echo -e "Erik\nis\ncool"
488 Erik
489 is
490 cool
491 $ echo "Erik\nis\ncool"
492 Erik\nis\ncool
Pavel Roskin1a804e42000-06-21 21:38:00 +0000493
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000494-------------------------------
495
496=item false
497
Erik Andersen5e1189e2000-04-15 16:34:54 +0000498Returns an exit code of FALSE (1)
499
500Example:
501
502 $ false
503 $ echo $?
504 1
505
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000506-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000507
John Beppu46a4e762000-01-18 22:33:11 +0000508=item fbset
509
John Beppu4581b4c2000-01-19 15:04:41 +0000510Usage: fbset [options] [mode]
511
Erik Andersen62dc17a2000-04-13 01:18:23 +0000512Show and modify frame buffer device settings
513
John Beppu4581b4c2000-01-19 15:04:41 +0000514Options:
515
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000516 -h
517 -fb
518 -db
519 -a
520 -i
521 -g
522 -t
523 -accel
524 -hsync
525 -vsync
526 -laced
527 -double
John Beppu4581b4c2000-01-19 15:04:41 +0000528
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000529Example:
530
531 $ fbset
532 mode "1024x768-76"
533 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
534 geometry 1024 768 1024 768 16
535 timings 12714 128 32 16 4 128 4
536 accel false
537 rgba 5/11,6/5,5/0,0/0
538 endmode
539
540-------------------------------
541
542=item fdflush
543
544Usage: fdflush device
545
546Force floppy disk drive to detect disk change
547
548-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000549
John Beppu46a4e762000-01-18 22:33:11 +0000550=item find
551
John Beppu4581b4c2000-01-19 15:04:41 +0000552Usage: find [PATH...] [EXPRESSION]
553
554Search for files in a directory hierarchy. The default PATH is
555the current directory; default EXPRESSION is '-print'
556
John Beppu4581b4c2000-01-19 15:04:41 +0000557
Erik Andersen62dc17a2000-04-13 01:18:23 +0000558EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000559
560 -follow Dereference symbolic links.
561 -name PATTERN File name (leading directories removed) matches PATTERN.
562 -print print the full file name followed by a newline to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000563
564Example:
565
566 $ find / -name /etc/passwd
567 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000568
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000569-------------------------------
570
John Beppu46a4e762000-01-18 22:33:11 +0000571=item free
572
John Beppu4581b4c2000-01-19 15:04:41 +0000573Usage: free
574
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000575Displays the amount of free and used system memory.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000576
577Example:
578
579 $ free
Erik Andersen5e1189e2000-04-15 16:34:54 +0000580 total used free shared buffers
Erik Andersen62dc17a2000-04-13 01:18:23 +0000581 Mem: 257628 248724 8904 59644 93124
582 Swap: 128516 8404 120112
583 Total: 386144 257128 129016
584
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000585-------------------------------
586
587=item freeramdisk
588
589Usage: freeramdisk DEVICE
590
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000591Frees all memory used by the specified ramdisk.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000592
593Example:
594
595 $ freeramdisk /dev/ram2
596
597-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000598
John Beppu46a4e762000-01-18 22:33:11 +0000599=item fsck.minix
600
John Beppuf17792c2000-04-13 03:16:01 +0000601Usage: fsck.minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000602
603Performs a consistency check for MINIX filesystems.
604
Eric Andersen2086e3d2000-07-04 22:17:01 +0000605Options:
John Beppuf17792c2000-04-13 03:16:01 +0000606
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000607 -l Lists all filenames
608 -r Perform interactive repairs
609 -a Perform automatic repairs
610 -v verbose
611 -s Outputs super-block information
612 -m Activates MINIX-like "mode not cleared" warnings
613 -f Force file system check.
614
615-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000616
John Beppu46a4e762000-01-18 22:33:11 +0000617=item grep
618
Erik Andersen62dc17a2000-04-13 01:18:23 +0000619Usage: grep [OPTIONS]... PATTERN [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000620
Erik Andersen62dc17a2000-04-13 01:18:23 +0000621Search for PATTERN in each FILE or standard input.
622
Eric Andersen2086e3d2000-07-04 22:17:01 +0000623Options:
John Beppuf17792c2000-04-13 03:16:01 +0000624
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000625 -h suppress the prefixing filename on output
626 -i ignore case distinctions
627 -n print line number with output lines
628 -q be quiet. Returns 0 if result was found, 1 otherwise
Erik Andersena19bc642000-05-02 06:40:02 +0000629 -v select non-matching lines
Erik Andersen62dc17a2000-04-13 01:18:23 +0000630
Eric Andersen98cd53e2000-06-16 19:56:44 +0000631This version of grep matches full regular expressions.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000632
Erik Andersen62dc17a2000-04-13 01:18:23 +0000633Example:
634
635 $ grep root /etc/passwd
636 root:x:0:0:root:/root:/bin/bash
637 $ grep ^[rR]oo. /etc/passwd
638 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000639
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000640-------------------------------
641
642=item gunzip
643
Erik Andersen5e1189e2000-04-15 16:34:54 +0000644Usage: gunzip [OPTION]... FILE
645
646Uncompress FILE (or standard input if FILE is '-').
647
648Options:
649
650 -c Write output to standard output
651 -t Test compressed file integrity
652
653Example:
654
Erik Andersencf8d38a2000-04-21 01:23:36 +0000655 $ ls -la /tmp/BusyBox*
656 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
657 $ gunzip /tmp/BusyBox-0.43.tar.gz
658 $ ls -la /tmp/BusyBox*
659 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000660
661-------------------------------
662
663=item gzip
664
Erik Andersen5e1189e2000-04-15 16:34:54 +0000665Usage: gzip [OPTION]... FILE
666
667Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000668When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000669
670Options:
671
672 -c Write output to standard output instead of FILE.gz
673
674Example:
675
Erik Andersencf8d38a2000-04-21 01:23:36 +0000676 $ ls -la /tmp/BusyBox*
677 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
678 $ gzip /tmp/BusyBox-0.43.tar
679 $ ls -la /tmp/BusyBox*
680 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen5e1189e2000-04-15 16:34:54 +0000681
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000682
683-------------------------------
684
685=item halt
686
Erik Andersen5e1189e2000-04-15 16:34:54 +0000687Usage: halt
688
Eric Andersen98cd53e2000-06-16 19:56:44 +0000689This command halts the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000690
691-------------------------------
692
John Beppu46a4e762000-01-18 22:33:11 +0000693=item head
694
Erik Andersen62dc17a2000-04-13 01:18:23 +0000695Usage: head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000696
697Print first 10 lines of each FILE to standard output.
698With more than one FILE, precede each with a header giving the
699file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000700
701Options:
John Beppuf17792c2000-04-13 03:16:01 +0000702
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000703 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000704
705Example:
706
707 $ head -n 2 /etc/passwd
708 root:x:0:0:root:/root:/bin/bash
709 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000710
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000711-------------------------------
712
713=item hostid
714
Erik Andersen5e1189e2000-04-15 16:34:54 +0000715Usage: hostid
716
717Prints out a unique 32-bit identifier for the current
718machine. The 32-bit identifier is intended to be unique
719among all UNIX systems in existence.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000720
721-------------------------------
722
John Beppu46a4e762000-01-18 22:33:11 +0000723=item hostname
724
John Beppuf17792c2000-04-13 03:16:01 +0000725Usage: hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000726
John Beppu4581b4c2000-01-19 15:04:41 +0000727Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000728(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000729
Erik Andersen62dc17a2000-04-13 01:18:23 +0000730Options:
John Beppuf17792c2000-04-13 03:16:01 +0000731
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000732 -s Short
733 -i Addresses for the hostname
734 -d DNS domain name
735 -F FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000736
737Example:
738
739 $ hostname
740 slag
John Beppu46a4e762000-01-18 22:33:11 +0000741
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000742-------------------------------
743
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000744=item id
745
746Print information for USERNAME or the current user
747
748Options:
749
750 -g prints only the group ID
751 -u prints only the user ID
752 -r prints the real user ID instead of the effective ID (with -ug)
753
754Example:
755
756 $ id
757 uid=1000(andersen) gid=1000(andersen)
758
759-------------------------------
760
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000761=item init
762
Erik Andersen5e1189e2000-04-15 16:34:54 +0000763Usage: init
764
765Init is the parent of all processes.
766
767This version of init is designed to be run only by the kernel.
768
769BusyBox init doesn't support multiple runlevels. The runlevels field of
770the /etc/inittab file is completely ignored by BusyBox init. If you want
771runlevels, use sysvinit.
772
773BusyBox init works just fine without an inittab. If no inittab is found,
774it has the following default behavior:
775
776 ::sysinit:/etc/init.d/rcS
777 ::askfirst:/bin/sh
778
779if it detects that /dev/console is _not_ a serial console, it will also run:
780
781 tty2::askfirst:/bin/sh
782
783If you choose to use an /etc/inittab file, the inittab entry format is as follows:
784
785 <id>:<runlevels>:<action>:<process>
786
787 <id>:
788
789 WARNING: This field has a non-traditional meaning for BusyBox init!
790 The id field is used by BusyBox init to specify the controlling tty for
791 the specified process to run on. The contents of this field are
792 appended to "/dev/" and used as-is. There is no need for this field to
793 be unique, although if it isn't you may have strange results. If this
794 field is left blank, it is completely ignored. Also note that if
795 BusyBox detects that a serial console is in use, then all entries
796 containing non-empty id fields will _not_ be run. BusyBox init does
797 nothing with utmp. We don't need no stinkin' utmp.
798
799 <runlevels>:
800
801 The runlevels field is completely ignored.
802
803 <action>:
804
805 Valid actions include: sysinit, respawn, askfirst, wait,
806 once, and ctrlaltdel.
807
808 askfirst acts just like respawn, but before running the specified
809 process it displays the line "Please press Enter to activate this
810 console." and then waits for the user to press enter before starting
811 the specified process.
812
Eric Andersen98cd53e2000-06-16 19:56:44 +0000813 Unrecognized actions (like initdefault) will cause init to emit
Erik Andersen5e1189e2000-04-15 16:34:54 +0000814 an error message, and then go along with its business.
815
816 <process>:
817
818 Specifies the process to be executed and it's command line.
819
820
821Example /etc/inittab file:
822
823 # This is run first except when booting in single-user mode.
824 #
825 ::sysinit:/etc/init.d/rcS
826
827 # /bin/sh invocations on selected ttys
828 #
829 # Start an "askfirst" shell on the console (whatever that may be)
830 ::askfirst:/bin/sh
831 # Start an "askfirst" shell on /dev/tty2
832 tty2::askfirst:/bin/sh
833
834 # /sbin/getty invocations for selected ttys
835 #
836 tty4::respawn:/sbin/getty 38400 tty4
837 tty5::respawn:/sbin/getty 38400 tty5
838
839
840 # Example of how to put a getty on a serial line (for a terminal)
841 #
842 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
843 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
844 #
845 # Example how to put a getty on a modem line.
846 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
847
848 # Stuff to do before rebooting
849 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
850 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000851
852-------------------------------
853
Eric Andersenfeb47c02000-06-21 21:03:13 +0000854=item insmod
855
856Usage: insmod [OPTION]... MODULE [symbol=value]...
857
858Loads the specified kernel modules into the kernel.
859
860Options:
861
862 -f Force module to load into the wrong kernel version.
863 -k Make module autoclean-able.
864 -v verbose output
865 -x do not export externs
866
867-------------------------------
868
John Beppu46a4e762000-01-18 22:33:11 +0000869=item kill
870
John Beppuf17792c2000-04-13 03:16:01 +0000871Usage: kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000872
Erik Andersen62dc17a2000-04-13 01:18:23 +0000873Send a signal (default is SIGTERM) to the specified process(es).
874
875Options:
John Beppuf17792c2000-04-13 03:16:01 +0000876
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000877 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000878
879Example:
880
881 $ ps | grep apache
882 252 root root S [apache]
883 263 www-data www-data S [apache]
884 264 www-data www-data S [apache]
885 265 www-data www-data S [apache]
886 266 www-data www-data S [apache]
887 267 www-data www-data S [apache]
888 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +0000889
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000890-------------------------------
891
892=item killall
893
John Beppu9057b6a2000-04-16 10:22:28 +0000894Usage: killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +0000895
896Send a signal (default is SIGTERM) to the specified process(es).
897
898Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000899
Erik Andersen5e1189e2000-04-15 16:34:54 +0000900 -l List all signal names and numbers.
901
902Example:
903
904 $ killall apache
905
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000906-------------------------------
907
908=item length
909
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000910Usage: length STRING
Erik Andersen5e1189e2000-04-15 16:34:54 +0000911
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000912Prints out the length of the specified STRING.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000913
914Example:
Erik Andersena19bc642000-05-02 06:40:02 +0000915
Erik Andersen5e1189e2000-04-15 16:34:54 +0000916 $ length "Hello"
917 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000918
919-------------------------------
920
John Beppu46a4e762000-01-18 22:33:11 +0000921=item ln
922
John Beppu4581b4c2000-01-19 15:04:41 +0000923Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +0000924
John Beppu4581b4c2000-01-19 15:04:41 +0000925Create a link named LINK_NAME or DIRECTORY to the specified TARGET
Eric Andersenaddc9c22000-06-21 22:53:24 +0000926You may use '--' to indicate that all following arguments are non-options.
Pavel Roskin1a804e42000-06-21 21:38:00 +0000927
John Beppu4581b4c2000-01-19 15:04:41 +0000928Options:
929
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000930 -s make symbolic links instead of hard links
931 -f remove existing destination files
Pavel Roskin1a804e42000-06-21 21:38:00 +0000932
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000933Example:
934
Erik Andersencf8d38a2000-04-21 01:23:36 +0000935 $ ln -s BusyBox /tmp/ls
Erik Andersena19bc642000-05-02 06:40:02 +0000936 $ ls -l /tmp/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000937 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000938
939-------------------------------
940
941=item loadacm
942
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000943Usage: loadacm
944
945Loads an acm from standard input.
946
947Example:
948
949 $ loadacm < /etc/i18n/acmname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000950
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000951-------------------------------
952
953=item loadfont
954
Erik Andersena6c75222000-04-18 00:00:52 +0000955Usage: loadfont
956
957Loads a console font from standard input.
958
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000959Example:
960
961 $ loadfont < /etc/i18n/fontname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000962
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000963-------------------------------
964
965=item loadkmap
966
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000967Usage: loadkmap
968
969Loads a binary keyboard translation table from standard input.
970
971Example:
972
973 $ loadkmap < /etc/i18n/lang-keymap
Erik Andersen5e1189e2000-04-15 16:34:54 +0000974
975-------------------------------
976
977=item logger
978
979Usage: logger [OPTION]... [MESSAGE]
980
981Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
982
983Options:
984
985 -s Log to stderr as well as the system log.
986 -t Log using the specified tag (defaults to user name).
987 -p Enter the message with the specified priority.
988 This may be numerical or a ``facility.level'' pair.
989
990Example:
991
992 $ logger "hello"
993
994-------------------------------
995
996=item logname
997
998Usage: logname
999
1000Print the name of the current user.
1001
1002Example:
1003
1004 $ logname
1005 root
1006
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001007-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001008
John Beppu46a4e762000-01-18 22:33:11 +00001009=item ls
1010
Eric Andersena42982e2000-06-07 17:28:53 +00001011Usage: ls [B<-1acdelnpuxACFR>] [filenames...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001012
1013Options:
1014
1015 -a do not hide entries starting with .
1016 -c with -l: show ctime (the time of last
1017 modification of file status information)
1018 -d list directory entries instead of contents
1019 -e list both full date and full time
1020 -l use a long listing format
1021 -n list numeric UIDs and GIDs instead of names
1022 -p append indicator (one of /=@|) to entries
1023 -u with -l: show access time (the time of last
1024 access of the file)
1025 -x list entries by lines instead of by columns
1026 -A do not list implied . and ..
1027 -C list entries by columns
1028 -F append indicator (one of */=@|) to entries
Eric Andersena42982e2000-06-07 17:28:53 +00001029 -R list subdirectories recursively
John Beppu50ed0672000-04-13 23:44:04 +00001030
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001031-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001032
John Beppu46a4e762000-01-18 22:33:11 +00001033=item lsmod
1034
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001035Usage: lsmod
John Beppu4581b4c2000-01-19 15:04:41 +00001036
Erik Andersen5e1189e2000-04-15 16:34:54 +00001037Shows a list of all currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001038
1039-------------------------------
1040
1041=item makedevs
1042
Erik Andersen5e1189e2000-04-15 16:34:54 +00001043Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
1044
1045Creates a range of block or character special files
1046
1047TYPEs include:
1048
1049 b: Make a block (buffered) device.
1050 c or u: Make a character (un-buffered) device.
1051 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
1052
1053FIRST specifies the number appended to NAME to create the first device.
1054LAST specifies the number of the last item that should be created.
1055If 's' is the last argument, the base device is created as well.
1056
1057Example:
1058
1059 $ makedevs /dev/ttyS c 4 66 2 63
1060 [creates ttyS2-ttyS63]
1061 $ makedevs /dev/hda b 3 0 0 8 s
1062 [creates hda,hda1-hda8]
1063
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001064-------------------------------
1065
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001066=item md5sum
1067
1068Usage: md5sum [OPTION] [file ...]
1069
1070Print or check MD5 checksums.
1071
1072Options:
1073
1074 -b read files in binary mode
1075 -c check MD5 sums against given list
1076 -t read files in text mode (default)
1077 -g read a string
1078
1079The following two options are useful only when verifying checksums:
1080
1081 -s don't output anything, status code shows success
1082 -w warn about improperly formated MD5 checksum lines
1083
1084Example:
1085
1086 $ md5sum busybox
1087 6fd11e98b98a58f64ff3398d7b324003 busybox
1088 $ md5sum -c -
1089 6fd11e98b98a58f64ff3398d7b324003 busybox
1090 busybox: OK
1091 ^D
1092
1093-------------------------------
1094
John Beppu46a4e762000-01-18 22:33:11 +00001095=item mkdir
1096
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001097Usage: mkdir [OPTION] DIRECTORY...
1098
John Beppu4581b4c2000-01-19 15:04:41 +00001099Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001100
John Beppu4581b4c2000-01-19 15:04:41 +00001101Options:
1102
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001103 -m set permission mode (as in chmod), not rwxrwxrwx - umask
Eric Andersen98cd53e2000-06-16 19:56:44 +00001104 -p no error if directory exists, make parent directories as needed
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001105
1106Example:
1107
1108 $ mkdir /tmp/foo
1109 $ mkdir /tmp/foo
1110 /tmp/foo: File exists
1111 $ mkdir /tmp/foo/bar/baz
1112 /tmp/foo/bar/baz: No such file or directory
1113 $ mkdir -p /tmp/foo/bar/baz
1114
1115-------------------------------
1116
1117=item mkfifo
1118
Erik Andersen5e1189e2000-04-15 16:34:54 +00001119Usage: mkfifo [OPTIONS] name
1120
1121Creates a named pipe (identical to 'mknod name p')
1122
1123Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001124
Erik Andersen5e1189e2000-04-15 16:34:54 +00001125 -m create the pipe using the specified mode (default a=rw)
1126
1127-------------------------------
1128
1129=item mkfs.minix
1130
1131Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1132
1133Make a MINIX filesystem.
1134
Eric Andersen2086e3d2000-07-04 22:17:01 +00001135Options:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001136
1137 -c Check the device for bad blocks
1138 -n [14|30] Specify the maximum length of filenames
1139 -i Specify the number of inodes for the filesystem
1140 -l FILENAME Read the bad blocks list from FILENAME
1141 -v Make a Minix version 2 filesystem
1142
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001143-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001144
John Beppu46a4e762000-01-18 22:33:11 +00001145=item mknod
1146
Erik Andersen5e1189e2000-04-15 16:34:54 +00001147Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001148
Erik Andersen5e1189e2000-04-15 16:34:54 +00001149Create a special file (block, character, or pipe).
1150
1151Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001152
Erik Andersen5e1189e2000-04-15 16:34:54 +00001153 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001154
1155TYPEs include:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001156 b: Make a block (buffered) device.
1157 c or u: Make a character (un-buffered) device.
1158 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001159
1160Example:
1161
1162 $ mknod /dev/fd0 b 2 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00001163 $ mknod -m 644 /tmp/pipe p
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001164
1165-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001166
John Beppu46a4e762000-01-18 22:33:11 +00001167=item mkswap
1168
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001169Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1170
John Beppu4581b4c2000-01-19 15:04:41 +00001171Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001172
John Beppu4581b4c2000-01-19 15:04:41 +00001173Options:
1174
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001175 -c Check for read-ability.
1176 -v0 Make version 0 swap [max 128 Megs].
1177 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1178 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001179
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001180-------------------------------
1181
Erik Andersen227a59b2000-04-25 23:24:55 +00001182=item mktemp
1183
Erik Andersene31c0662000-05-02 05:32:07 +00001184Usage: mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001185
1186Creates a temporary file with its name based on TEMPLATE.
1187TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1188
1189Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001190
Erik Andersen227a59b2000-04-25 23:24:55 +00001191 $ mktemp /tmp/temp.XXXXXX
1192 /tmp/temp.mWiLjM
1193 $ ls -la /tmp/temp.mWiLjM
1194 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1195
1196-------------------------------
1197
John Beppu46a4e762000-01-18 22:33:11 +00001198=item more
1199
John Beppu4581b4c2000-01-19 15:04:41 +00001200Usage: more [file ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001201
1202More is a filter for paging through text one screenful at a time.
1203
1204Example:
1205
1206 $ dmesg | more
John Beppu50ed0672000-04-13 23:44:04 +00001207
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001208-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001209
John Beppu46a4e762000-01-18 22:33:11 +00001210=item mount
1211
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001212Usage: mount [flags]
1213 mount [flags] device directory [B<-o> options,more-options]
John Beppu4581b4c2000-01-19 15:04:41 +00001214
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001215Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001216
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001217 -a: Mount all file systems in fstab.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001218 -o option: One of many filesystem options, listed below.
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001219 -r: Mount the filesystem read-only.
1220 -t fs-type: Specify the filesystem type.
1221 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001222
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001223Options for use with the "B<-o>" flag:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001224
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001225 async/sync: Writes are asynchronous / synchronous.
1226 atime/noatime: Enable / disable updates to inode access times.
1227 dev/nodev: Allow use of special device files / disallow them.
1228 exec/noexec: Allow use of executable files / disallow them.
1229 loop: Mounts a file via loop device.
1230 suid/nosuid: Allow set-user-id-root programs / disallow them.
1231 remount: Re-mount a currently-mounted filesystem, changing its flags.
1232 ro/rw: Mount for read-only / read-write.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001233 There are EVEN MORE flags that are specific to each filesystem.
1234 You'll have to see the written documentation for those.
1235
1236Example:
1237
1238 $ mount
1239 /dev/hda3 on / type minix (rw)
1240 proc on /proc type proc (rw)
1241 devpts on /dev/pts type devpts (rw)
1242 $ mount /dev/fd0 /mnt -t msdos -o ro
1243 $ mount /tmp/diskimage /opt -t ext2 -o loop
John Beppu50ed0672000-04-13 23:44:04 +00001244
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001245-------------------------------
1246
1247=item mt
1248
John Beppu9057b6a2000-04-16 10:22:28 +00001249Usage: mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001250
1251Control magnetic tape drive operation
1252
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001253-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001254
John Beppu46a4e762000-01-18 22:33:11 +00001255=item mv
1256
John Beppu4581b4c2000-01-19 15:04:41 +00001257Usage: mv SOURCE DEST
1258
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001259 or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001260
1261Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001262
1263Example:
1264
1265 $ mv /tmp/foo /bin/bar
John Beppu50ed0672000-04-13 23:44:04 +00001266
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001267-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001268
Eric Andersen028fb622000-07-04 20:07:13 +00001269=item nc
1270
1271Usage: nc [IP] [port]
1272
1273Netcat opens a pipe to IP:port
1274
1275Example:
1276
1277 $ nc foobar.somedomain.com 25
1278 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1279 help
1280 214-Commands supported:
1281 214- HELO EHLO MAIL RCPT DATA AUTH
1282 214 NOOP QUIT RSET HELP
1283 quit
1284 221 foobar closing connection
1285
1286-------------------------------
1287
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001288=item nslookup
John Beppu46a4e762000-01-18 22:33:11 +00001289
Erik Andersen5e1189e2000-04-15 16:34:54 +00001290Usage: nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001291
Erik Andersen5e1189e2000-04-15 16:34:54 +00001292Queries the nameserver for the IP address of the given HOST
1293
1294Example:
1295
1296 $ nslookup localhost
1297 Server: default
1298 Address: default
1299
1300 Name: debian
1301 Address: 127.0.0.1
John Beppu46a4e762000-01-18 22:33:11 +00001302
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001303-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001304
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001305=item ping
1306
1307Usage: ping [OPTION]... host
1308
1309Send ICMP ECHO_REQUEST packets to network hosts.
1310
1311Options:
1312
1313 -c COUNT Send only COUNT pings.
Pavel Roskin0024abc2000-06-07 20:38:15 +00001314 -s SIZE Send SIZE data bytes in packets (default=56).
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001315 -q Quiet mode, only displays output at start
1316 and when finished.
1317Example:
1318
1319 $ ping localhost
1320 PING slag (127.0.0.1): 56 data bytes
1321 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1322
1323 --- debian ping statistics ---
1324 1 packets transmitted, 1 packets received, 0% packet loss
1325 round-trip min/avg/max = 20.1/20.1/20.1 ms
1326
1327-------------------------------
1328
Erik Andersen5e1189e2000-04-15 16:34:54 +00001329=item poweroff
1330
1331Shuts down the system, and requests that the kernel turn off power upon halting.
1332
1333-------------------------------
1334
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001335=item printf
1336
Erik Andersen5e1189e2000-04-15 16:34:54 +00001337Usage: printf format [argument...]
1338
1339Formats and prints the given data in a manner similar to the C printf command.
1340
1341Example:
1342
1343 $ printf "Val=%d\n" 5
1344 Val=5
1345
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001346-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001347
John Beppu46a4e762000-01-18 22:33:11 +00001348=item ps
1349
Erik Andersen5e1189e2000-04-15 16:34:54 +00001350Usage: ps
1351
1352Report process status
1353
1354This version of ps accepts no options.
1355
1356Example:
1357
1358 $ ps
1359 PID Uid Gid State Command
1360 1 root root S init
1361 2 root root S [kflushd]
1362 3 root root S [kupdate]
1363 4 root root S [kpiod]
1364 5 root root S [kswapd]
1365 742 andersen andersen S [bash]
1366 743 andersen andersen S -bash
1367 745 root root S [getty]
1368 2990 andersen andersen R ps
1369
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001370-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001371
John Beppu46a4e762000-01-18 22:33:11 +00001372=item pwd
1373
Erik Andersen5e1189e2000-04-15 16:34:54 +00001374Prints the full filename of the current working directory.
1375
1376Example:
1377
1378 $ pwd
1379 /root
1380
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001381-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001382
John Beppu46a4e762000-01-18 22:33:11 +00001383=item reboot
1384
Erik Andersen5e1189e2000-04-15 16:34:54 +00001385Instructs the kernel to reboot the system.
1386
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001387-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001388
John Beppu46a4e762000-01-18 22:33:11 +00001389=item rm
1390
Erik Andersen5e1189e2000-04-15 16:34:54 +00001391Usage: rm [OPTION]... FILE...
1392
Eric Andersen815e9042000-06-06 16:15:23 +00001393Remove (unlink) the FILE(s). You may use '--' to
1394indicate that all following arguments are non-options.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001395
1396Options:
1397
1398 -f remove existing destinations, never prompt
1399 -r or -R remove the contents of directories recursively
1400
1401Example:
1402
1403 $ rm -rf /tmp/foo
1404
1405-------------------------------
1406
1407=item rmdir
1408
1409Usage: rmdir [OPTION]... DIRECTORY...
1410
1411Remove the DIRECTORY(ies), if they are empty.
1412
1413Example:
1414
1415 # rmdir /tmp/foo
1416
1417-------------------------------
1418
1419=item rmmod
1420
1421Usage: rmmod [OPTION]... [MODULE]...
1422
1423Unloads the specified kernel modules from the kernel.
1424
1425Options:
1426
1427 -a Try to remove all unused kernel modules.
1428
1429Example:
1430
1431 $ rmmod tulip
1432
1433-------------------------------
1434
1435=item sed
1436
John Beppu9057b6a2000-04-16 10:22:28 +00001437Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001438
1439Allowed sed scripts come in the following form:
1440
1441 'ADDR [!] COMMAND'
1442
1443 where address ADDR can be:
1444 NUMBER Match specified line number
1445 $ Match last line
1446 /REGEXP/ Match specified regexp
1447 (! inverts the meaning of the match)
1448
1449 and COMMAND can be:
1450 s/regexp/replacement/[igp]
1451 which attempt to match regexp against the pattern space
1452 and if successful replaces the matched portion with replacement.
1453
1454 aTEXT
1455 which appends TEXT after the pattern space
1456
1457Options:
1458
1459 -e add the script to the commands to be executed
1460 -n suppress automatic printing of pattern space
1461
Eric Andersen98cd53e2000-06-16 19:56:44 +00001462This version of sed matches full regular expressions.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001463
1464Example:
1465
1466 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1467 bar
1468
1469-------------------------------
1470
Erik Andersen4f3f7572000-04-28 00:18:56 +00001471=item setkeycodes
1472
1473Usage: setkeycodes SCANCODE KEYCODE ...
1474
1475Set entries into the kernel's scancode-to-keycode map,
1476allowing unusual keyboards to generate usable keycodes.
1477
1478SCANCODE may be either xx or e0xx (hexadecimal),
1479and KEYCODE is given in decimal
1480
1481Example:
1482
1483 # setkeycodes e030 127
1484
1485-------------------------------
1486
Eric Andersen028fb622000-07-04 20:07:13 +00001487=item sh
1488
1489Usage: sh
1490
1491lash -- the BusyBox LAme SHell (command interpreter)
1492
1493This command does not yet have proper documentation.
1494
1495Use lash just as you would use any other shell. It properly handles pipes,
1496redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1497has a sufficient set of builtins to do what is needed. It does not (yet)
1498support Bourne Shell syntax. If you need things like "if-then-else", "while",
1499and such, use ash or bash. If you just need a very simple and extremely small
1500shell, this will do the job.
1501
1502-------------------------------
1503
Erik Andersen5e1189e2000-04-15 16:34:54 +00001504=item sleep
1505
1506Usage: sleep N
1507
1508Pause for N seconds.
1509
1510Example:
1511
1512 $ sleep 2
1513 [2 second delay results]
1514
1515-------------------------------
1516
1517=item sort
1518
John Beppu9057b6a2000-04-16 10:22:28 +00001519Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001520
1521Sorts lines of text in the specified files
1522
1523Example:
1524
1525 $ echo -e "e\nf\nb\nd\nc\na" | sort
1526 a
1527 b
1528 c
1529 d
1530 e
1531 f
1532
1533-------------------------------
1534
Eric Andersen028fb622000-07-04 20:07:13 +00001535=item swapoff
1536
1537Usage: swapoff [OPTION] [device]
1538
1539Stop swapping virtual memory pages on the given device.
1540
1541Options:
1542
1543 -a Stop swapping on all swap devices
1544
1545-------------------------------
1546
1547=item swapon
1548
1549Usage: swapon [OPTION] [device]
1550
1551Start swapping virtual memory pages on the given device.
1552
1553Options:
1554
1555 -a Start swapping on all swap devices
1556
1557-------------------------------
1558
Erik Andersen5e1189e2000-04-15 16:34:54 +00001559=item sync
1560
1561Usage: sync
1562
1563Write all buffered filesystem blocks to disk.
1564
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001565-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001566
John Beppu46a4e762000-01-18 22:33:11 +00001567=item syslogd
1568
Erik Andersen5e1189e2000-04-15 16:34:54 +00001569Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001570
Erik Andersen5e1189e2000-04-15 16:34:54 +00001571Linux system and kernel (provides klogd) logging utility.
1572Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001573
Erik Andersen5e1189e2000-04-15 16:34:54 +00001574Options:
Pavel Roskin049b7062000-06-07 21:19:49 +00001575
Pavel Roskinda10ec02000-06-07 21:08:25 +00001576 -m NUM Interval between MARK lines (default=20min, 0=off)
1577 -n Run as a foreground process
1578 -K Do not start up the klogd process
1579 -O FILE Use an alternate log file (default=/var/log/messages)
Eric Andersenced2cef2000-07-20 23:41:24 +00001580 -R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
1581
1582Example:
1583
1584 $ syslogd -R masterlog:514
1585 $ syslogd -R 192.168.1.1:601
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001586
1587-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001588
John Beppu46a4e762000-01-18 22:33:11 +00001589=item tail
1590
Erik Andersen5e1189e2000-04-15 16:34:54 +00001591Usage: tail [OPTION] [FILE]...
1592
1593Print last 10 lines of each FILE to standard output.
1594With more than one FILE, precede each with a header giving the
1595file name. With no FILE, or when FILE is -, read standard input.
1596
1597Options:
1598
1599 -n NUM Print last NUM lines instead of first 10
1600 -f Output data as the file grows. This version
1601 of 'tail -f' supports only one file at a time.
1602
1603Example:
1604
1605 $ tail -n 1 /etc/resolv.conf
1606 nameserver 10.0.0.1
1607
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001608-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001609
John Beppu46a4e762000-01-18 22:33:11 +00001610=item tar
1611
John Beppu9057b6a2000-04-16 10:22:28 +00001612Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001613
1614Create, extract, or list files from a tar file. Note that
1615this version of tar treats hard links as separate files.
1616
1617Main operation mode:
1618
1619 c create
1620 x extract
1621 t list
1622
1623File selection:
1624
1625 f name of tarfile or "-" for stdin
1626 O extract to stdout
1627 --exclude file to exclude
1628
1629Informative output:
1630
1631 v verbosely list files processed
1632
1633Example:
1634
1635 $ zcat /tmp/tarball.tar.gz | tar -xf -
1636 $ tar -cf /tmp/tarball.tar /usr/local
1637
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001638-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001639
Eric Andersen028fb622000-07-04 20:07:13 +00001640=item tee
1641
1642Usage: tee [OPTION]... [FILE]...
1643
1644Copy standard input to each FILE, and also to standard output.
1645
1646Options:
1647
1648 -a append to the given FILEs, do not overwrite
1649
1650Example:
1651
1652 $ echo "Hello" | tee /tmp/foo
1653 $ cat /tmp/foo
1654 Hello
1655
1656-------------------------------
1657
1658=item telnet
1659
1660Usage: telnet host [port]
1661
1662Telnet is used to establish interactive communication with another
1663computer over a network using the TELNET protocol.
1664
1665-------------------------------
1666
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001667=item test, [
1668
Erik Andersen5e1189e2000-04-15 16:34:54 +00001669Usage: test EXPRESSION
1670or [ EXPRESSION ]
1671
1672Checks file types and compares values returning an exit
1673code determined by the value of EXPRESSION.
1674
1675Example:
1676
1677 $ test 1 -eq 2
1678 $ echo $?
1679 1
1680 $ test 1 -eq 1
1681 $ echo $?
1682 0
1683 $ [ -d /etc ]
1684 $ echo $?
1685 0
1686 $ [ -d /junk ]
1687 $ echo $?
1688 1
1689
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001690-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001691
John Beppu46a4e762000-01-18 22:33:11 +00001692=item touch
1693
John Beppu9057b6a2000-04-16 10:22:28 +00001694Usage: touch [B<-c>] file [file ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001695
1696Update the last-modified date on (or create) the selected file[s].
1697
1698Example:
1699
1700 $ ls -l /tmp/foo
1701 /bin/ls: /tmp/foo: No such file or directory
1702 $ touch /tmp/foo
1703 $ ls -l /tmp/foo
1704 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1705
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001706-------------------------------
1707
1708=item tr
Erik Andersena19bc642000-05-02 06:40:02 +00001709
Erik Andersen3c1217c2000-05-01 22:34:24 +00001710Usage: tr [-cds] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001711
Erik Andersen3c1217c2000-05-01 22:34:24 +00001712Translate, squeeze, and/or delete characters from
1713standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001714
Erik Andersen3c1217c2000-05-01 22:34:24 +00001715Options:
1716
1717 -c take complement of STRING1
1718 -d delete input characters coded STRING1
1719 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00001720
1721Example:
1722
1723 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1724 hello world
1725
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001726-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001727
John Beppu46a4e762000-01-18 22:33:11 +00001728=item true
1729
Erik Andersen5e1189e2000-04-15 16:34:54 +00001730Returns an exit code of TRUE (0)
1731
1732Example:
1733
1734 $ true
1735 $ echo $?
1736 0
1737
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001738-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001739
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001740=item tty
John Beppu4581b4c2000-01-19 15:04:41 +00001741
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001742Usage: tty
1743
1744Print the file name of the terminal connected to standard input.
1745
1746Options:
1747
1748 -s print nothing, only return an exit status
1749
1750Example:
1751
1752 $ tty
1753 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00001754
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001755-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001756
John Beppu46a4e762000-01-18 22:33:11 +00001757=item umount
1758
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001759Usage: umount [flags] filesystem|directory
1760
1761Flags:
1762
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001763 -a: Unmount all file systems
1764 -r: Try to remount devices as read-only if mount is busy
1765 -f: Force filesystem umount (i.e. unreachable NFS server)
1766 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001767
1768Example:
1769
1770 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001771
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001772-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001773
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001774=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001775
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001776Usage: uname [OPTION]...
1777
Erik Andersen26702fe2000-04-17 16:44:46 +00001778Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001779
1780Options:
1781
1782 -a print all information
1783 -m the machine (hardware) type
1784 -n print the machine's network node hostname
1785 -r print the operating system release
1786 -s print the operating system name
1787 -p print the host processor type
1788 -v print the operating system version
1789
1790Example:
1791
1792 $ uname -a
1793 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001794
1795-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001796
John Beppu46a4e762000-01-18 22:33:11 +00001797=item uniq
1798
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001799Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1800
1801Discard all but one of successive identical lines from INPUT
1802(or standard input), writing to OUTPUT (or standard output).
1803
1804Example:
1805
1806 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1807 a
1808 b
1809 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001810
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001811-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001812
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001813=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001814
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001815Usage: update [options]
1816
1817Periodically flushes filesystem buffers.
1818
1819Options:
1820
1821 -S force use of sync(2) instead of flushing
1822 -s SECS call sync this often (default 30)
1823 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001824
1825-------------------------------
1826
1827=item uptime
1828
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001829Usage: uptime
1830
1831Tells how long the system has been running since boot.
1832
1833Example:
1834
1835 $ uptime
1836 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001837
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001838-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001839
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001840=item usleep
1841
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001842Usage: usleep N
1843
1844Pauses for N microseconds.
1845
1846Example:
1847
1848 $ usleep 1000000
1849 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001850
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001851-------------------------------
1852
Eric Andersen028fb622000-07-04 20:07:13 +00001853=item uuencode
1854
1855Usage: uuencode [OPTION] [INFILE] REMOTEFILE
1856
1857Uuencode a file.
1858
1859Options:
1860
1861 -m use base64 encoding as of RFC1521
1862
1863Example:
1864
1865 $ uuencode busybox busybox
1866 begin 755 busybox
1867 M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&
1868 .....
1869 $ uudecode busybox busybox > busybox.uu
1870 $
1871
1872-------------------------------
1873
1874=item uudecode
1875
1876Usage: uudecode [OPTION] [FILE]
1877
1878Uudecode a uuencoded file
1879
1880Options:
1881
1882 -o FILE direct output to FILE
1883
1884Example:
1885
1886 $ uudecode -o busybox busybox.uu
1887 $ ls -l busybox
1888 -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
1889
1890-------------------------------
1891
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001892=item wc
1893
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001894Usage: wc [OPTION]... [FILE]...
1895
1896Print line, word, and byte counts for each FILE, and a total line if
1897more than one FILE is specified. With no FILE, read standard input.
1898
1899Options:
1900
1901 -c print the byte counts
1902 -l print the newline counts
1903 -L print the length of the longest line
1904 -w print the word counts
1905
1906Example:
1907
1908 $ wc /etc/passwd
1909 31 46 1365 /etc/passwd
Erik Andersen5e1189e2000-04-15 16:34:54 +00001910
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001911-------------------------------
1912
Pavel Roskinafa06622000-06-21 21:43:24 +00001913=item which
1914
1915Usage: which [COMMAND ...]
1916
1917Locates a COMMAND.
1918
1919Example:
1920
1921 $ which login
1922 /bin/login
1923
1924-------------------------------
1925
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001926=item whoami
1927
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001928Usage: whoami
1929
1930Prints the user name associated with the current effective user id.
1931
1932Example:
1933
1934 $ whoami
1935 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00001936
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001937-------------------------------
1938
1939=item yes
1940
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001941Usage: yes [OPTION]... [STRING]...
1942
1943Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001944
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001945-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00001946
1947=item zcat
1948
Erik Andersen26702fe2000-04-17 16:44:46 +00001949This is essentially an alias for invoking "gunzip B<-c>", where
Eric Andersen98cd53e2000-06-16 19:56:44 +00001950it decompresses the file in question and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001951
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001952-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001953
John Beppu46a4e762000-01-18 22:33:11 +00001954=back
John Beppu3a1b6be2000-01-18 15:45:59 +00001955
Erik Andersena19bc642000-05-02 06:40:02 +00001956=head1 LIBC NSS
1957
1958GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
1959library for the local environment, and to configure how it reads system data,
1960such as passwords and group information. BusyBox has made it Policy that it
1961will never use NSS, and will never use and libc calls that make use of NSS.
1962This allows you to run an embedded system without the need for installing an
1963/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
1964
1965If you are using a system that is using a remote LDAP server for authentication
1966via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
1967BusyBox source. Chances are though, that if you have enough space to install
1968of that stuff on your system, then you probably want the full GNU utilities.
1969
John Beppu3a1b6be2000-01-18 15:45:59 +00001970=head1 SEE ALSO
1971
1972textutils(1), shellutils(1), etc...
1973
1974=head1 MAINTAINER
1975
Erik Andersen1101d232000-04-19 05:15:12 +00001976Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001977
1978=head1 AUTHORS
1979
John Beppu08fe43d2000-01-19 12:39:16 +00001980The following people have contributed code to BusyBox whether
1981they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00001982
Erik Andersen1101d232000-04-19 05:15:12 +00001983Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001984
John Beppu08fe43d2000-01-19 12:39:16 +00001985=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001986
John Beppu08fe43d2000-01-19 12:39:16 +00001987John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001988
John Beppu08fe43d2000-01-19 12:39:16 +00001989=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001990
John Beppu08fe43d2000-01-19 12:39:16 +00001991Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001992
John Beppu08fe43d2000-01-19 12:39:16 +00001993=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001994
John Beppu08fe43d2000-01-19 12:39:16 +00001995Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001996
John Beppu08fe43d2000-01-19 12:39:16 +00001997=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001998
John Beppu08fe43d2000-01-19 12:39:16 +00001999Dave Cinege <dcinege@psychosis.com>
2000
2001=for html <br>
2002
John Beppu50ed0672000-04-13 23:44:04 +00002003Karl M. Hegbloom <karlheg@debian.org>
2004
2005=for html <br>
2006
John Beppu4fd10fc2000-04-17 05:13:59 +00002007John Lombardo <john@deltanet.com>
2008
2009=for html <br>
2010
Eric Andersen86ab8a32000-06-02 03:21:42 +00002011Glenn McGrath <bug1@netconnect.com.au>
2012
2013=for html <br>
2014
John Beppu08fe43d2000-01-19 12:39:16 +00002015Bruce Perens <bruce@perens.com>
2016
2017=for html <br>
2018
Pavel Roskin339b8922000-06-20 00:11:07 +00002019Pavel Roskin <proski@gnu.org>
Eric Andersen08e92892000-06-02 03:21:36 +00002020
2021=for html <br>
2022
John Beppu08fe43d2000-01-19 12:39:16 +00002023Linus Torvalds <torvalds@transmeta.com>
2024
2025=for html <br>
2026
2027Charles P. Wright <cpwright@villagenet.com>
2028
2029=for html <br>
2030
2031Enrique Zanardi <ezanardi@ull.es>
2032
2033=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00002034
2035=cut
John Beppu08fe43d2000-01-19 12:39:16 +00002036
Eric Andersenced2cef2000-07-20 23:41:24 +00002037# $Id: busybox.pod,v 1.57 2000/07/20 23:41:24 andersen Exp $