blob: d4298530684ed311641798540690e416464aed51 [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,
Eric Andersenbf960f52000-07-21 21:32:12 +000064nslookup, ping, poweroff, printf, ps, pwd, reboot, renice, 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
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
Eric Andersenbf960f52000-07-21 21:32:12 +00001389=item renice
1390
1391Usage: renice priority pid [pid ...]
1392
1393Changes priority of running processes. Allowed priorities range
1394from 20 (the process runs only when nothing else is running) to 0
1395(default priority) to -20 (almost nothing else ever gets to run).
1396
1397-------------------------------
1398
John Beppu46a4e762000-01-18 22:33:11 +00001399=item rm
1400
Erik Andersen5e1189e2000-04-15 16:34:54 +00001401Usage: rm [OPTION]... FILE...
1402
Eric Andersen815e9042000-06-06 16:15:23 +00001403Remove (unlink) the FILE(s). You may use '--' to
1404indicate that all following arguments are non-options.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001405
1406Options:
1407
1408 -f remove existing destinations, never prompt
1409 -r or -R remove the contents of directories recursively
1410
1411Example:
1412
1413 $ rm -rf /tmp/foo
1414
1415-------------------------------
1416
1417=item rmdir
1418
1419Usage: rmdir [OPTION]... DIRECTORY...
1420
1421Remove the DIRECTORY(ies), if they are empty.
1422
1423Example:
1424
1425 # rmdir /tmp/foo
1426
1427-------------------------------
1428
1429=item rmmod
1430
1431Usage: rmmod [OPTION]... [MODULE]...
1432
1433Unloads the specified kernel modules from the kernel.
1434
1435Options:
1436
1437 -a Try to remove all unused kernel modules.
1438
1439Example:
1440
1441 $ rmmod tulip
1442
1443-------------------------------
1444
1445=item sed
1446
John Beppu9057b6a2000-04-16 10:22:28 +00001447Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001448
1449Allowed sed scripts come in the following form:
1450
1451 'ADDR [!] COMMAND'
1452
1453 where address ADDR can be:
1454 NUMBER Match specified line number
1455 $ Match last line
1456 /REGEXP/ Match specified regexp
1457 (! inverts the meaning of the match)
1458
1459 and COMMAND can be:
1460 s/regexp/replacement/[igp]
1461 which attempt to match regexp against the pattern space
1462 and if successful replaces the matched portion with replacement.
1463
1464 aTEXT
1465 which appends TEXT after the pattern space
1466
1467Options:
1468
1469 -e add the script to the commands to be executed
1470 -n suppress automatic printing of pattern space
1471
Eric Andersen98cd53e2000-06-16 19:56:44 +00001472This version of sed matches full regular expressions.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001473
1474Example:
1475
1476 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1477 bar
1478
1479-------------------------------
1480
Erik Andersen4f3f7572000-04-28 00:18:56 +00001481=item setkeycodes
1482
1483Usage: setkeycodes SCANCODE KEYCODE ...
1484
1485Set entries into the kernel's scancode-to-keycode map,
1486allowing unusual keyboards to generate usable keycodes.
1487
1488SCANCODE may be either xx or e0xx (hexadecimal),
1489and KEYCODE is given in decimal
1490
1491Example:
1492
1493 # setkeycodes e030 127
1494
1495-------------------------------
1496
Eric Andersen028fb622000-07-04 20:07:13 +00001497=item sh
1498
1499Usage: sh
1500
1501lash -- the BusyBox LAme SHell (command interpreter)
1502
1503This command does not yet have proper documentation.
1504
1505Use lash just as you would use any other shell. It properly handles pipes,
1506redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1507has a sufficient set of builtins to do what is needed. It does not (yet)
1508support Bourne Shell syntax. If you need things like "if-then-else", "while",
1509and such, use ash or bash. If you just need a very simple and extremely small
1510shell, this will do the job.
1511
1512-------------------------------
1513
Erik Andersen5e1189e2000-04-15 16:34:54 +00001514=item sleep
1515
1516Usage: sleep N
1517
1518Pause for N seconds.
1519
1520Example:
1521
1522 $ sleep 2
1523 [2 second delay results]
1524
1525-------------------------------
1526
1527=item sort
1528
John Beppu9057b6a2000-04-16 10:22:28 +00001529Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001530
1531Sorts lines of text in the specified files
1532
1533Example:
1534
1535 $ echo -e "e\nf\nb\nd\nc\na" | sort
1536 a
1537 b
1538 c
1539 d
1540 e
1541 f
1542
1543-------------------------------
1544
Eric Andersen028fb622000-07-04 20:07:13 +00001545=item swapoff
1546
1547Usage: swapoff [OPTION] [device]
1548
1549Stop swapping virtual memory pages on the given device.
1550
1551Options:
1552
1553 -a Stop swapping on all swap devices
1554
1555-------------------------------
1556
1557=item swapon
1558
1559Usage: swapon [OPTION] [device]
1560
1561Start swapping virtual memory pages on the given device.
1562
1563Options:
1564
1565 -a Start swapping on all swap devices
1566
1567-------------------------------
1568
Erik Andersen5e1189e2000-04-15 16:34:54 +00001569=item sync
1570
1571Usage: sync
1572
1573Write all buffered filesystem blocks to disk.
1574
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001575-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001576
John Beppu46a4e762000-01-18 22:33:11 +00001577=item syslogd
1578
Erik Andersen5e1189e2000-04-15 16:34:54 +00001579Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001580
Erik Andersen5e1189e2000-04-15 16:34:54 +00001581Linux system and kernel (provides klogd) logging utility.
1582Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001583
Erik Andersen5e1189e2000-04-15 16:34:54 +00001584Options:
Pavel Roskin049b7062000-06-07 21:19:49 +00001585
Pavel Roskinda10ec02000-06-07 21:08:25 +00001586 -m NUM Interval between MARK lines (default=20min, 0=off)
1587 -n Run as a foreground process
1588 -K Do not start up the klogd process
1589 -O FILE Use an alternate log file (default=/var/log/messages)
Eric Andersenced2cef2000-07-20 23:41:24 +00001590 -R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP.
1591
1592Example:
1593
1594 $ syslogd -R masterlog:514
1595 $ syslogd -R 192.168.1.1:601
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001596
1597-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001598
John Beppu46a4e762000-01-18 22:33:11 +00001599=item tail
1600
Erik Andersen5e1189e2000-04-15 16:34:54 +00001601Usage: tail [OPTION] [FILE]...
1602
1603Print last 10 lines of each FILE to standard output.
1604With more than one FILE, precede each with a header giving the
1605file name. With no FILE, or when FILE is -, read standard input.
1606
1607Options:
1608
1609 -n NUM Print last NUM lines instead of first 10
1610 -f Output data as the file grows. This version
1611 of 'tail -f' supports only one file at a time.
1612
1613Example:
1614
1615 $ tail -n 1 /etc/resolv.conf
1616 nameserver 10.0.0.1
1617
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001618-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001619
John Beppu46a4e762000-01-18 22:33:11 +00001620=item tar
1621
John Beppu9057b6a2000-04-16 10:22:28 +00001622Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001623
1624Create, extract, or list files from a tar file. Note that
1625this version of tar treats hard links as separate files.
1626
1627Main operation mode:
1628
1629 c create
1630 x extract
1631 t list
1632
1633File selection:
1634
1635 f name of tarfile or "-" for stdin
1636 O extract to stdout
1637 --exclude file to exclude
1638
1639Informative output:
1640
1641 v verbosely list files processed
1642
1643Example:
1644
1645 $ zcat /tmp/tarball.tar.gz | tar -xf -
1646 $ tar -cf /tmp/tarball.tar /usr/local
1647
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001648-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001649
Eric Andersen028fb622000-07-04 20:07:13 +00001650=item tee
1651
1652Usage: tee [OPTION]... [FILE]...
1653
1654Copy standard input to each FILE, and also to standard output.
1655
1656Options:
1657
1658 -a append to the given FILEs, do not overwrite
1659
1660Example:
1661
1662 $ echo "Hello" | tee /tmp/foo
1663 $ cat /tmp/foo
1664 Hello
1665
1666-------------------------------
1667
1668=item telnet
1669
1670Usage: telnet host [port]
1671
1672Telnet is used to establish interactive communication with another
1673computer over a network using the TELNET protocol.
1674
1675-------------------------------
1676
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001677=item test, [
1678
Erik Andersen5e1189e2000-04-15 16:34:54 +00001679Usage: test EXPRESSION
1680or [ EXPRESSION ]
1681
1682Checks file types and compares values returning an exit
1683code determined by the value of EXPRESSION.
1684
1685Example:
1686
1687 $ test 1 -eq 2
1688 $ echo $?
1689 1
1690 $ test 1 -eq 1
1691 $ echo $?
1692 0
1693 $ [ -d /etc ]
1694 $ echo $?
1695 0
1696 $ [ -d /junk ]
1697 $ echo $?
1698 1
1699
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001700-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001701
John Beppu46a4e762000-01-18 22:33:11 +00001702=item touch
1703
John Beppu9057b6a2000-04-16 10:22:28 +00001704Usage: touch [B<-c>] file [file ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001705
1706Update the last-modified date on (or create) the selected file[s].
1707
1708Example:
1709
1710 $ ls -l /tmp/foo
1711 /bin/ls: /tmp/foo: No such file or directory
1712 $ touch /tmp/foo
1713 $ ls -l /tmp/foo
1714 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1715
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001716-------------------------------
1717
1718=item tr
Erik Andersena19bc642000-05-02 06:40:02 +00001719
Erik Andersen3c1217c2000-05-01 22:34:24 +00001720Usage: tr [-cds] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001721
Erik Andersen3c1217c2000-05-01 22:34:24 +00001722Translate, squeeze, and/or delete characters from
1723standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001724
Erik Andersen3c1217c2000-05-01 22:34:24 +00001725Options:
1726
1727 -c take complement of STRING1
1728 -d delete input characters coded STRING1
1729 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00001730
1731Example:
1732
1733 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1734 hello world
1735
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001736-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001737
John Beppu46a4e762000-01-18 22:33:11 +00001738=item true
1739
Erik Andersen5e1189e2000-04-15 16:34:54 +00001740Returns an exit code of TRUE (0)
1741
1742Example:
1743
1744 $ true
1745 $ echo $?
1746 0
1747
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001748-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001749
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001750=item tty
John Beppu4581b4c2000-01-19 15:04:41 +00001751
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001752Usage: tty
1753
1754Print the file name of the terminal connected to standard input.
1755
1756Options:
1757
1758 -s print nothing, only return an exit status
1759
1760Example:
1761
1762 $ tty
1763 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00001764
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001765-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001766
John Beppu46a4e762000-01-18 22:33:11 +00001767=item umount
1768
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001769Usage: umount [flags] filesystem|directory
1770
1771Flags:
1772
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001773 -a: Unmount all file systems
1774 -r: Try to remount devices as read-only if mount is busy
1775 -f: Force filesystem umount (i.e. unreachable NFS server)
1776 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001777
1778Example:
1779
1780 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001781
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001782-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001783
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001784=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001785
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001786Usage: uname [OPTION]...
1787
Erik Andersen26702fe2000-04-17 16:44:46 +00001788Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001789
1790Options:
1791
1792 -a print all information
1793 -m the machine (hardware) type
1794 -n print the machine's network node hostname
1795 -r print the operating system release
1796 -s print the operating system name
1797 -p print the host processor type
1798 -v print the operating system version
1799
1800Example:
1801
1802 $ uname -a
1803 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001804
1805-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001806
John Beppu46a4e762000-01-18 22:33:11 +00001807=item uniq
1808
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001809Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1810
1811Discard all but one of successive identical lines from INPUT
1812(or standard input), writing to OUTPUT (or standard output).
1813
1814Example:
1815
1816 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1817 a
1818 b
1819 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001820
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001821-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001822
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001823=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001824
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001825Usage: update [options]
1826
1827Periodically flushes filesystem buffers.
1828
1829Options:
1830
1831 -S force use of sync(2) instead of flushing
1832 -s SECS call sync this often (default 30)
1833 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001834
1835-------------------------------
1836
1837=item uptime
1838
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001839Usage: uptime
1840
1841Tells how long the system has been running since boot.
1842
1843Example:
1844
1845 $ uptime
1846 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001847
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001848-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001849
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001850=item usleep
1851
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001852Usage: usleep N
1853
1854Pauses for N microseconds.
1855
1856Example:
1857
1858 $ usleep 1000000
1859 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001860
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001861-------------------------------
1862
Eric Andersen028fb622000-07-04 20:07:13 +00001863=item uuencode
1864
1865Usage: uuencode [OPTION] [INFILE] REMOTEFILE
1866
1867Uuencode a file.
1868
1869Options:
1870
1871 -m use base64 encoding as of RFC1521
1872
1873Example:
1874
1875 $ uuencode busybox busybox
1876 begin 755 busybox
1877 M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&
1878 .....
1879 $ uudecode busybox busybox > busybox.uu
1880 $
1881
1882-------------------------------
1883
1884=item uudecode
1885
1886Usage: uudecode [OPTION] [FILE]
1887
1888Uudecode a uuencoded file
1889
1890Options:
1891
1892 -o FILE direct output to FILE
1893
1894Example:
1895
1896 $ uudecode -o busybox busybox.uu
1897 $ ls -l busybox
1898 -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
1899
1900-------------------------------
1901
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001902=item wc
1903
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001904Usage: wc [OPTION]... [FILE]...
1905
1906Print line, word, and byte counts for each FILE, and a total line if
1907more than one FILE is specified. With no FILE, read standard input.
1908
1909Options:
1910
1911 -c print the byte counts
1912 -l print the newline counts
1913 -L print the length of the longest line
1914 -w print the word counts
1915
1916Example:
1917
1918 $ wc /etc/passwd
1919 31 46 1365 /etc/passwd
Erik Andersen5e1189e2000-04-15 16:34:54 +00001920
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001921-------------------------------
1922
Pavel Roskinafa06622000-06-21 21:43:24 +00001923=item which
1924
1925Usage: which [COMMAND ...]
1926
1927Locates a COMMAND.
1928
1929Example:
1930
1931 $ which login
1932 /bin/login
1933
1934-------------------------------
1935
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001936=item whoami
1937
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001938Usage: whoami
1939
1940Prints the user name associated with the current effective user id.
1941
1942Example:
1943
1944 $ whoami
1945 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00001946
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001947-------------------------------
1948
1949=item yes
1950
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001951Usage: yes [OPTION]... [STRING]...
1952
1953Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001954
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001955-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00001956
1957=item zcat
1958
Erik Andersen26702fe2000-04-17 16:44:46 +00001959This is essentially an alias for invoking "gunzip B<-c>", where
Eric Andersen98cd53e2000-06-16 19:56:44 +00001960it decompresses the file in question and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001961
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001962-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001963
John Beppu46a4e762000-01-18 22:33:11 +00001964=back
John Beppu3a1b6be2000-01-18 15:45:59 +00001965
Erik Andersena19bc642000-05-02 06:40:02 +00001966=head1 LIBC NSS
1967
1968GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
1969library for the local environment, and to configure how it reads system data,
1970such as passwords and group information. BusyBox has made it Policy that it
1971will never use NSS, and will never use and libc calls that make use of NSS.
1972This allows you to run an embedded system without the need for installing an
1973/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
1974
1975If you are using a system that is using a remote LDAP server for authentication
1976via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
1977BusyBox source. Chances are though, that if you have enough space to install
1978of that stuff on your system, then you probably want the full GNU utilities.
1979
John Beppu3a1b6be2000-01-18 15:45:59 +00001980=head1 SEE ALSO
1981
1982textutils(1), shellutils(1), etc...
1983
1984=head1 MAINTAINER
1985
Erik Andersen1101d232000-04-19 05:15:12 +00001986Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001987
1988=head1 AUTHORS
1989
John Beppu08fe43d2000-01-19 12:39:16 +00001990The following people have contributed code to BusyBox whether
1991they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00001992
Erik Andersen1101d232000-04-19 05:15:12 +00001993Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001994
John Beppu08fe43d2000-01-19 12:39:16 +00001995=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001996
John Beppu08fe43d2000-01-19 12:39:16 +00001997John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001998
John Beppu08fe43d2000-01-19 12:39:16 +00001999=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002000
John Beppu08fe43d2000-01-19 12:39:16 +00002001Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00002002
John Beppu08fe43d2000-01-19 12:39:16 +00002003=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002004
John Beppu08fe43d2000-01-19 12:39:16 +00002005Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00002006
John Beppu08fe43d2000-01-19 12:39:16 +00002007=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00002008
John Beppu08fe43d2000-01-19 12:39:16 +00002009Dave Cinege <dcinege@psychosis.com>
2010
2011=for html <br>
2012
John Beppu50ed0672000-04-13 23:44:04 +00002013Karl M. Hegbloom <karlheg@debian.org>
2014
2015=for html <br>
2016
John Beppu4fd10fc2000-04-17 05:13:59 +00002017John Lombardo <john@deltanet.com>
2018
2019=for html <br>
2020
Eric Andersen86ab8a32000-06-02 03:21:42 +00002021Glenn McGrath <bug1@netconnect.com.au>
2022
2023=for html <br>
2024
John Beppu08fe43d2000-01-19 12:39:16 +00002025Bruce Perens <bruce@perens.com>
2026
2027=for html <br>
2028
Pavel Roskin339b8922000-06-20 00:11:07 +00002029Pavel Roskin <proski@gnu.org>
Eric Andersen08e92892000-06-02 03:21:36 +00002030
2031=for html <br>
2032
John Beppu08fe43d2000-01-19 12:39:16 +00002033Linus Torvalds <torvalds@transmeta.com>
2034
2035=for html <br>
2036
2037Charles P. Wright <cpwright@villagenet.com>
2038
2039=for html <br>
2040
2041Enrique Zanardi <ezanardi@ull.es>
2042
2043=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00002044
2045=cut
John Beppu08fe43d2000-01-19 12:39:16 +00002046
Eric Andersenbf960f52000-07-21 21:32:12 +00002047# $Id: busybox.pod,v 1.59 2000/07/21 21:32:12 andersen Exp $