blob: 58576bb56bad48025c3729777ca9c404e8350aad [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 Andersenf2fffef2000-06-05 17:23:06 +000019or emdedded system. The utilities in BusyBox generally have fewer options than
20their full-featured GNU cousins; however, the options that are included provide
Erik Andersene90f4042000-04-21 21:53:58 +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
Erik Andersencf8d38a2000-04-21 01:23:36 +000040into BusyBox).
Erik Andersen62dc17a2000-04-13 01:18:23 +000041
Erik Andersencf8d38a2000-04-21 01:23:36 +000042You can also invoke BusyBox by issuing the command as an argument on the
43command line. For example, entering
44
45 ./BusyBox ls
Erik Andersen62dc17a2000-04-13 01:18:23 +000046
47will also cause BusyBox to behave as 'ls'.
John Beppu08fe43d2000-01-19 12:39:16 +000048
Erik Anderseneef65802000-04-19 05:12:02 +000049=head1 COMMON OPTIONS
50
51Most BusyBox commands support the B<--help> option to provide a
52terse runtime description of their behavior.
53
John Beppu46a4e762000-01-18 22:33:11 +000054=head1 COMMANDS
55
Erik Andersen62dc17a2000-04-13 01:18:23 +000056Currently defined functions include:
57
Eric Andersen86ab8a32000-06-02 03:21:42 +000058ar, basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, cut, date, dd,
59df, dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
Erik Andersen5e1189e2000-04-15 16:34:54 +000060freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
Erik Andersen73c8c9c2000-05-13 05:36:13 +000061hostname, id, init, kill, killall, length, ln, loadacm, loadfont, loadkmap,
Eric Andersen2b6ab3c2000-06-13 06:54:53 +000062logger, logname, ls, lsmod, makedevs, math, md5sum, mkdir, mkfifo, mkfs.minix,
63mknod, mkswap, mktemp, nc, more, mount, mt, mv, nslookup, ping, poweroff,
64printf, ps, pwd, reboot, rm, rmdir, rmmod, sed, setkeycodes, sh, sfdisk, sleep,
65sort, sync, syslogd, swapon, swapoff, tail, tar, test, tee, touch, tr, true,
66tty, umount, uname, uniq, update, uptime, usleep, uudecode, uuencode, wc,
67whoami, 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
96Example:
97
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
Erik Andersencf8d38a2000-04-21 01:23:36 +0000147PERISSION 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
Erik Andersen62dc17a2000-04-13 01:18:23 +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
Erik Andersencf8d38a2000-04-21 01:23:36 +0000168 t Stickey 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
Erik Andersencf8d38a2000-04-21 01:23:36 +0000181 1 Stickey 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.
John Beppu4581b4c2000-01-19 15:04:41 +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.
228
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 clear
241
Erik Andersen62dc17a2000-04-13 01:18:23 +0000242Clears the screen.
John Beppu4581b4c2000-01-19 15:04:41 +0000243
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000244-------------------------------
245
John Beppu46a4e762000-01-18 22:33:11 +0000246=item chvt
247
John Beppu4581b4c2000-01-19 15:04:41 +0000248Usage: chvt N
249
Erik Andersencf8d38a2000-04-21 01:23:36 +0000250Changes the foreground virtual terminal to /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000251
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000252-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000253
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
266 -p Preserves file attributes if possable
267 -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
279 -b LIST Output only bytes from LIST
280 -c LIST Output only characters from LIST
281 -d DELIM Use DELIM instead of tab as the field delimiter
282 -f N Print only these fields
283 -n Ignored
284
285Example:
286
287 $ echo "Hello world" | cut -f 1 -d ' '
288 Hello
289 $ echo "Hello world" | cut -f 2 -d ' '
290 world
291
292
293-------------------------------
294
John Beppu46a4e762000-01-18 22:33:11 +0000295=item date
296
Erik Andersen62dc17a2000-04-13 01:18:23 +0000297Usage: date [OPTION]... [+FORMAT]
John Beppu4581b4c2000-01-19 15:04:41 +0000298
Erik Andersen62dc17a2000-04-13 01:18:23 +0000299 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
300
Erik Andersencf8d38a2000-04-21 01:23:36 +0000301Displays the current time in the given FORMAT, or sets the system date.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000302
303Options:
Erik Andersene31c0662000-05-02 05:32:07 +0000304
Erik Andersencf8d38a2000-04-21 01:23:36 +0000305 -R Outputs RFC-822 compliant date string
306 -s Sets time described by STRING
307 -u Prints or sets Coordinated Universal Time
Erik Andersen62dc17a2000-04-13 01:18:23 +0000308
309Example:
John Beppuf17792c2000-04-13 03:16:01 +0000310
Erik Andersen62dc17a2000-04-13 01:18:23 +0000311 $ date
312 Wed Apr 12 18:52:41 MDT 2000
John Beppu4581b4c2000-01-19 15:04:41 +0000313
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000314-------------------------------
315
John Beppu46a4e762000-01-18 22:33:11 +0000316=item dd
317
Erik Andersen62dc17a2000-04-13 01:18:23 +0000318Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
John Beppu4581b4c2000-01-19 15:04:41 +0000319
320Copy a file, converting and formatting according to options
321
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000322 if=FILE read from FILE instead of stdin
323 of=FILE write to FILE instead of stdout
324 bs=n read and write n bytes at a time
325 count=n copy only n input blocks
326 skip=n skip n input blocks
327 seek=n skip n output blocks
Erik Andersen62dc17a2000-04-13 01:18:23 +0000328
329Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
John Beppu4581b4c2000-01-19 15:04:41 +0000330
Erik Andersen62dc17a2000-04-13 01:18:23 +0000331Example:
332
333 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
334 4+0 records in
335 4+0 records out
336
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000337-------------------------------
338
John Beppu46a4e762000-01-18 22:33:11 +0000339=item df
340
Erik Andersen62dc17a2000-04-13 01:18:23 +0000341Usage: df [filesystem ...]
342
343Prints the filesystem space used and space available.
344
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000345Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000346
347 $ df
348 Filesystem 1k-blocks Used Available Use% Mounted on
349 /dev/sda3 8690864 8553540 137324 98% /
350 /dev/sda1 64216 36364 27852 57% /boot
351 $ df /dev/sda3
352 Filesystem 1k-blocks Used Available Use% Mounted on
353 /dev/sda3 8690864 8553540 137324 98% /
John Beppu4581b4c2000-01-19 15:04:41 +0000354
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000355-------------------------------
356
357=item dirname
358
359Usage: dirname NAME
360
361Strip non-directory suffix from file name
362
363Example:
364
365 $ dirname /tmp/foo
366 /tmp
367 $ dirname /tmp/foo/
368 /tmp
369
370-------------------------------
371
John Beppu46a4e762000-01-18 22:33:11 +0000372=item dmesg
373
John Beppuf17792c2000-04-13 03:16:01 +0000374Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
John Beppu4581b4c2000-01-19 15:04:41 +0000375
Erik Andersen62dc17a2000-04-13 01:18:23 +0000376Print or controls the kernel ring buffer.
John Beppu4581b4c2000-01-19 15:04:41 +0000377
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000378-------------------------------
379
John Beppu46a4e762000-01-18 22:33:11 +0000380=item du
381
Erik Andersen62dc17a2000-04-13 01:18:23 +0000382Usage: du [OPTION]... [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000383
Erik Andersen62dc17a2000-04-13 01:18:23 +0000384Summarize disk space used for each FILE and/or directory.
385Disk space is printed in units of 1k (i.e. 1024 bytes).
386
387Options:
John Beppuf17792c2000-04-13 03:16:01 +0000388
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000389 -l count sizes many times if hard linked
390 -s display only a total for each argument
Erik Andersen62dc17a2000-04-13 01:18:23 +0000391
392Example:
393
Erik Andersencf8d38a2000-04-21 01:23:36 +0000394 $ ./BusyBox du
Erik Andersen62dc17a2000-04-13 01:18:23 +0000395 16 ./CVS
396 12 ./kernel-patches/CVS
397 80 ./kernel-patches
398 12 ./tests/CVS
399 36 ./tests
400 12 ./scripts/CVS
401 16 ./scripts
402 12 ./docs/CVS
403 104 ./docs
404 2417 .
405
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000406-------------------------------
407
408=item dutmp
409
410Usage: dutmp [FILE]
411
412Dump utmp file format (pipe delimited) from FILE
413or stdin to stdout.
414
415Example:
416
417 $ dutmp /var/run/utmp
418 8|7||si|||0|0|0|955637625|760097|0
419 2|0|~|~~|reboot||0|0|0|955637625|782235|0
420 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
421 8|125||l4|||0|0|0|955637629|998367|0
422 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
423 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
424 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
425
426-------------------------------
427
428=item echo
429
430Usage: echo [-neE] [ARG ...]
431
432Prints the specified ARGs to stdout
433
434Options:
435
436 -n suppress trailing newline
437 -e interpret backslash-escaped characters (i.e. \t=tab etc)
438 -E disable interpretation of backslash-escaped characters
439
440Example:
441
442 $ echo "Erik is cool"
443 Erik is cool
444 $ echo -e "Erik\nis\ncool"
445 Erik
446 is
447 cool
448 $ echo "Erik\nis\ncool"
449 Erik\nis\ncool
450
451-------------------------------
452
453=item false
454
Erik Andersen5e1189e2000-04-15 16:34:54 +0000455Returns an exit code of FALSE (1)
456
457Example:
458
459 $ false
460 $ echo $?
461 1
462
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000463-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000464
John Beppu46a4e762000-01-18 22:33:11 +0000465=item fbset
466
John Beppu4581b4c2000-01-19 15:04:41 +0000467Usage: fbset [options] [mode]
468
Erik Andersen62dc17a2000-04-13 01:18:23 +0000469Show and modify frame buffer device settings
470
John Beppu4581b4c2000-01-19 15:04:41 +0000471Options:
472
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000473 -h
474 -fb
475 -db
476 -a
477 -i
478 -g
479 -t
480 -accel
481 -hsync
482 -vsync
483 -laced
484 -double
John Beppu4581b4c2000-01-19 15:04:41 +0000485
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000486Example:
487
488 $ fbset
489 mode "1024x768-76"
490 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
491 geometry 1024 768 1024 768 16
492 timings 12714 128 32 16 4 128 4
493 accel false
494 rgba 5/11,6/5,5/0,0/0
495 endmode
496
497-------------------------------
498
499=item fdflush
500
501Usage: fdflush device
502
503Force floppy disk drive to detect disk change
504
505-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000506
John Beppu46a4e762000-01-18 22:33:11 +0000507=item find
508
John Beppu4581b4c2000-01-19 15:04:41 +0000509Usage: find [PATH...] [EXPRESSION]
510
511Search for files in a directory hierarchy. The default PATH is
512the current directory; default EXPRESSION is '-print'
513
John Beppu4581b4c2000-01-19 15:04:41 +0000514
Erik Andersen62dc17a2000-04-13 01:18:23 +0000515EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000516
517 -follow Dereference symbolic links.
518 -name PATTERN File name (leading directories removed) matches PATTERN.
519 -print print the full file name followed by a newline to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000520
521Example:
522
523 $ find / -name /etc/passwd
524 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000525
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000526-------------------------------
527
John Beppu46a4e762000-01-18 22:33:11 +0000528=item free
529
John Beppu4581b4c2000-01-19 15:04:41 +0000530Usage: free
531
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000532Displays the amount of free and used system memory.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000533
534Example:
535
536 $ free
Erik Andersen5e1189e2000-04-15 16:34:54 +0000537 total used free shared buffers
Erik Andersen62dc17a2000-04-13 01:18:23 +0000538 Mem: 257628 248724 8904 59644 93124
539 Swap: 128516 8404 120112
540 Total: 386144 257128 129016
541
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000542-------------------------------
543
544=item freeramdisk
545
546Usage: freeramdisk DEVICE
547
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000548Frees all memory used by the specified ramdisk.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000549
550Example:
551
552 $ freeramdisk /dev/ram2
553
554-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000555
John Beppu46a4e762000-01-18 22:33:11 +0000556=item deallocvt
557
John Beppu4581b4c2000-01-19 15:04:41 +0000558Usage: deallocvt N
559
Erik Andersen62dc17a2000-04-13 01:18:23 +0000560Deallocates unused virtual terminal /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000561
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000562-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000563
John Beppu46a4e762000-01-18 22:33:11 +0000564=item fsck.minix
565
John Beppuf17792c2000-04-13 03:16:01 +0000566Usage: fsck.minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000567
568Performs a consistency check for MINIX filesystems.
569
Erik Andersen62dc17a2000-04-13 01:18:23 +0000570OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000571
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000572 -l Lists all filenames
573 -r Perform interactive repairs
574 -a Perform automatic repairs
575 -v verbose
576 -s Outputs super-block information
577 -m Activates MINIX-like "mode not cleared" warnings
578 -f Force file system check.
579
580-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000581
John Beppu46a4e762000-01-18 22:33:11 +0000582=item grep
583
Erik Andersen62dc17a2000-04-13 01:18:23 +0000584Usage: grep [OPTIONS]... PATTERN [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000585
Erik Andersen62dc17a2000-04-13 01:18:23 +0000586Search for PATTERN in each FILE or standard input.
587
588OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000589
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000590 -h suppress the prefixing filename on output
591 -i ignore case distinctions
592 -n print line number with output lines
593 -q be quiet. Returns 0 if result was found, 1 otherwise
Erik Andersena19bc642000-05-02 06:40:02 +0000594 -v select non-matching lines
Erik Andersen62dc17a2000-04-13 01:18:23 +0000595
596This version of grep matches full regular expresions.
597
Erik Andersen62dc17a2000-04-13 01:18:23 +0000598Example:
599
600 $ grep root /etc/passwd
601 root:x:0:0:root:/root:/bin/bash
602 $ grep ^[rR]oo. /etc/passwd
603 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000604
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000605-------------------------------
606
607=item gunzip
608
Erik Andersen5e1189e2000-04-15 16:34:54 +0000609Usage: gunzip [OPTION]... FILE
610
611Uncompress FILE (or standard input if FILE is '-').
612
613Options:
614
615 -c Write output to standard output
616 -t Test compressed file integrity
617
618Example:
619
Erik Andersencf8d38a2000-04-21 01:23:36 +0000620 $ ls -la /tmp/BusyBox*
621 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
622 $ gunzip /tmp/BusyBox-0.43.tar.gz
623 $ ls -la /tmp/BusyBox*
624 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000625
626-------------------------------
627
628=item gzip
629
Erik Andersen5e1189e2000-04-15 16:34:54 +0000630Usage: gzip [OPTION]... FILE
631
632Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000633When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000634
635Options:
636
637 -c Write output to standard output instead of FILE.gz
638
639Example:
640
Erik Andersencf8d38a2000-04-21 01:23:36 +0000641 $ ls -la /tmp/BusyBox*
642 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
643 $ gzip /tmp/BusyBox-0.43.tar
644 $ ls -la /tmp/BusyBox*
645 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen5e1189e2000-04-15 16:34:54 +0000646
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000647
648-------------------------------
649
650=item halt
651
Erik Andersen5e1189e2000-04-15 16:34:54 +0000652Usage: halt
653
654This comand halts the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000655
656-------------------------------
657
John Beppu46a4e762000-01-18 22:33:11 +0000658=item head
659
Erik Andersen62dc17a2000-04-13 01:18:23 +0000660Usage: head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000661
662Print first 10 lines of each FILE to standard output.
663With more than one FILE, precede each with a header giving the
664file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000665
666Options:
John Beppuf17792c2000-04-13 03:16:01 +0000667
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000668 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000669
670Example:
671
672 $ head -n 2 /etc/passwd
673 root:x:0:0:root:/root:/bin/bash
674 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000675
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000676-------------------------------
677
678=item hostid
679
Erik Andersen5e1189e2000-04-15 16:34:54 +0000680Usage: hostid
681
682Prints out a unique 32-bit identifier for the current
683machine. The 32-bit identifier is intended to be unique
684among all UNIX systems in existence.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000685
686-------------------------------
687
John Beppu46a4e762000-01-18 22:33:11 +0000688=item hostname
689
John Beppuf17792c2000-04-13 03:16:01 +0000690Usage: hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000691
John Beppu4581b4c2000-01-19 15:04:41 +0000692Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000693(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000694
Erik Andersen62dc17a2000-04-13 01:18:23 +0000695Options:
John Beppuf17792c2000-04-13 03:16:01 +0000696
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000697 -s Short
698 -i Addresses for the hostname
699 -d DNS domain name
700 -F FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000701
702Example:
703
704 $ hostname
705 slag
John Beppu46a4e762000-01-18 22:33:11 +0000706
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000707-------------------------------
708
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000709=item id
710
711Print information for USERNAME or the current user
712
713Options:
714
715 -g prints only the group ID
716 -u prints only the user ID
717 -r prints the real user ID instead of the effective ID (with -ug)
718
719Example:
720
721 $ id
722 uid=1000(andersen) gid=1000(andersen)
723
724-------------------------------
725
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000726=item init
727
Erik Andersen5e1189e2000-04-15 16:34:54 +0000728Usage: init
729
730Init is the parent of all processes.
731
732This version of init is designed to be run only by the kernel.
733
734BusyBox init doesn't support multiple runlevels. The runlevels field of
735the /etc/inittab file is completely ignored by BusyBox init. If you want
736runlevels, use sysvinit.
737
738BusyBox init works just fine without an inittab. If no inittab is found,
739it has the following default behavior:
740
741 ::sysinit:/etc/init.d/rcS
742 ::askfirst:/bin/sh
743
744if it detects that /dev/console is _not_ a serial console, it will also run:
745
746 tty2::askfirst:/bin/sh
747
748If you choose to use an /etc/inittab file, the inittab entry format is as follows:
749
750 <id>:<runlevels>:<action>:<process>
751
752 <id>:
753
754 WARNING: This field has a non-traditional meaning for BusyBox init!
755 The id field is used by BusyBox init to specify the controlling tty for
756 the specified process to run on. The contents of this field are
757 appended to "/dev/" and used as-is. There is no need for this field to
758 be unique, although if it isn't you may have strange results. If this
759 field is left blank, it is completely ignored. Also note that if
760 BusyBox detects that a serial console is in use, then all entries
761 containing non-empty id fields will _not_ be run. BusyBox init does
762 nothing with utmp. We don't need no stinkin' utmp.
763
764 <runlevels>:
765
766 The runlevels field is completely ignored.
767
768 <action>:
769
770 Valid actions include: sysinit, respawn, askfirst, wait,
771 once, and ctrlaltdel.
772
773 askfirst acts just like respawn, but before running the specified
774 process it displays the line "Please press Enter to activate this
775 console." and then waits for the user to press enter before starting
776 the specified process.
777
778 Unrecognised actions (like initdefault) will cause init to emit
779 an error message, and then go along with its business.
780
781 <process>:
782
783 Specifies the process to be executed and it's command line.
784
785
786Example /etc/inittab file:
787
788 # This is run first except when booting in single-user mode.
789 #
790 ::sysinit:/etc/init.d/rcS
791
792 # /bin/sh invocations on selected ttys
793 #
794 # Start an "askfirst" shell on the console (whatever that may be)
795 ::askfirst:/bin/sh
796 # Start an "askfirst" shell on /dev/tty2
797 tty2::askfirst:/bin/sh
798
799 # /sbin/getty invocations for selected ttys
800 #
801 tty4::respawn:/sbin/getty 38400 tty4
802 tty5::respawn:/sbin/getty 38400 tty5
803
804
805 # Example of how to put a getty on a serial line (for a terminal)
806 #
807 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
808 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
809 #
810 # Example how to put a getty on a modem line.
811 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
812
813 # Stuff to do before rebooting
814 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
815 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000816
817-------------------------------
818
John Beppu46a4e762000-01-18 22:33:11 +0000819=item kill
820
John Beppuf17792c2000-04-13 03:16:01 +0000821Usage: kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000822
Erik Andersen62dc17a2000-04-13 01:18:23 +0000823Send a signal (default is SIGTERM) to the specified process(es).
824
825Options:
John Beppuf17792c2000-04-13 03:16:01 +0000826
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000827 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000828
829Example:
830
831 $ ps | grep apache
832 252 root root S [apache]
833 263 www-data www-data S [apache]
834 264 www-data www-data S [apache]
835 265 www-data www-data S [apache]
836 266 www-data www-data S [apache]
837 267 www-data www-data S [apache]
838 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +0000839
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000840-------------------------------
841
842=item killall
843
John Beppu9057b6a2000-04-16 10:22:28 +0000844Usage: killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +0000845
846Send a signal (default is SIGTERM) to the specified process(es).
847
848Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000849
Erik Andersen5e1189e2000-04-15 16:34:54 +0000850 -l List all signal names and numbers.
851
852Example:
853
854 $ killall apache
855
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000856-------------------------------
857
858=item length
859
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000860Usage: length STRING
Erik Andersen5e1189e2000-04-15 16:34:54 +0000861
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000862Prints out the length of the specified STRING.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000863
864Example:
Erik Andersena19bc642000-05-02 06:40:02 +0000865
Erik Andersen5e1189e2000-04-15 16:34:54 +0000866 $ length "Hello"
867 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000868
869-------------------------------
870
John Beppu46a4e762000-01-18 22:33:11 +0000871=item ln
872
John Beppu4581b4c2000-01-19 15:04:41 +0000873Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +0000874
John Beppu4581b4c2000-01-19 15:04:41 +0000875Create a link named LINK_NAME or DIRECTORY to the specified TARGET
876
877Options:
878
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000879 -s make symbolic links instead of hard links
880 -f remove existing destination files
John Beppu4581b4c2000-01-19 15:04:41 +0000881
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000882Example:
883
Erik Andersencf8d38a2000-04-21 01:23:36 +0000884 $ ln -s BusyBox /tmp/ls
Erik Andersena19bc642000-05-02 06:40:02 +0000885 $ ls -l /tmp/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000886 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000887
888-------------------------------
889
890=item loadacm
891
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000892Usage: loadacm
893
894Loads an acm from standard input.
895
896Example:
897
898 $ loadacm < /etc/i18n/acmname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000899
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000900-------------------------------
901
902=item loadfont
903
Erik Andersena6c75222000-04-18 00:00:52 +0000904Usage: loadfont
905
906Loads a console font from standard input.
907
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000908Example:
909
910 $ loadfont < /etc/i18n/fontname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000911
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000912-------------------------------
913
914=item loadkmap
915
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000916Usage: loadkmap
917
918Loads a binary keyboard translation table from standard input.
919
920Example:
921
922 $ loadkmap < /etc/i18n/lang-keymap
Erik Andersen5e1189e2000-04-15 16:34:54 +0000923
924-------------------------------
925
926=item logger
927
928Usage: logger [OPTION]... [MESSAGE]
929
930Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
931
932Options:
933
934 -s Log to stderr as well as the system log.
935 -t Log using the specified tag (defaults to user name).
936 -p Enter the message with the specified priority.
937 This may be numerical or a ``facility.level'' pair.
938
939Example:
940
941 $ logger "hello"
942
943-------------------------------
944
945=item logname
946
947Usage: logname
948
949Print the name of the current user.
950
951Example:
952
953 $ logname
954 root
955
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000956-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000957
John Beppu46a4e762000-01-18 22:33:11 +0000958=item ls
959
Eric Andersena42982e2000-06-07 17:28:53 +0000960Usage: ls [B<-1acdelnpuxACFR>] [filenames...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000961
962Options:
963
964 -a do not hide entries starting with .
965 -c with -l: show ctime (the time of last
966 modification of file status information)
967 -d list directory entries instead of contents
968 -e list both full date and full time
969 -l use a long listing format
970 -n list numeric UIDs and GIDs instead of names
971 -p append indicator (one of /=@|) to entries
972 -u with -l: show access time (the time of last
973 access of the file)
974 -x list entries by lines instead of by columns
975 -A do not list implied . and ..
976 -C list entries by columns
977 -F append indicator (one of */=@|) to entries
Eric Andersena42982e2000-06-07 17:28:53 +0000978 -R list subdirectories recursively
John Beppu50ed0672000-04-13 23:44:04 +0000979
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000980-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000981
John Beppu46a4e762000-01-18 22:33:11 +0000982=item lsmod
983
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000984Usage: lsmod
John Beppu4581b4c2000-01-19 15:04:41 +0000985
Erik Andersen5e1189e2000-04-15 16:34:54 +0000986Shows a list of all currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000987
988-------------------------------
989
990=item makedevs
991
Erik Andersen5e1189e2000-04-15 16:34:54 +0000992Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
993
994Creates a range of block or character special files
995
996TYPEs include:
997
998 b: Make a block (buffered) device.
999 c or u: Make a character (un-buffered) device.
1000 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
1001
1002FIRST specifies the number appended to NAME to create the first device.
1003LAST specifies the number of the last item that should be created.
1004If 's' is the last argument, the base device is created as well.
1005
1006Example:
1007
1008 $ makedevs /dev/ttyS c 4 66 2 63
1009 [creates ttyS2-ttyS63]
1010 $ makedevs /dev/hda b 3 0 0 8 s
1011 [creates hda,hda1-hda8]
1012
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001013-------------------------------
1014
1015=item math
1016
Erik Andersen5e1189e2000-04-15 16:34:54 +00001017Usage: math expression ...
1018
1019This is a Tiny RPN calculator that understands the
1020following operations: +, -, /, *, and, or, not, eor.
John Beppu44760d02000-06-12 23:04:55 +00001021If no arguments are given, math will process input from STDIN.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001022
1023Example:
1024
John Beppu44760d02000-06-12 23:04:55 +00001025 $ math 2 2 +
Erik Andersen5e1189e2000-04-15 16:34:54 +00001026 4
1027 $ math 8 8 \* 2 2 + /
1028 16
1029 $ math 0 1 and
1030 0
1031 $ math 0 1 or
1032 1
John Beppu44760d02000-06-12 23:04:55 +00001033 $ echo 72 9 / | math
1034 8
Erik Andersen5e1189e2000-04-15 16:34:54 +00001035
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001036-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001037
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001038=item md5sum
1039
1040Usage: md5sum [OPTION] [file ...]
1041
1042Print or check MD5 checksums.
1043
1044Options:
1045
1046 -b read files in binary mode
1047 -c check MD5 sums against given list
1048 -t read files in text mode (default)
1049 -g read a string
1050
1051The following two options are useful only when verifying checksums:
1052
1053 -s don't output anything, status code shows success
1054 -w warn about improperly formated MD5 checksum lines
1055
1056Example:
1057
1058 $ md5sum busybox
1059 6fd11e98b98a58f64ff3398d7b324003 busybox
1060 $ md5sum -c -
1061 6fd11e98b98a58f64ff3398d7b324003 busybox
1062 busybox: OK
1063 ^D
1064
1065-------------------------------
1066
John Beppu46a4e762000-01-18 22:33:11 +00001067=item mkdir
1068
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001069Usage: mkdir [OPTION] DIRECTORY...
1070
John Beppu4581b4c2000-01-19 15:04:41 +00001071Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001072
John Beppu4581b4c2000-01-19 15:04:41 +00001073Options:
1074
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001075 -m set permission mode (as in chmod), not rwxrwxrwx - umask
1076 -p no error if dir exists, make parent directories as needed
1077
1078Example:
1079
1080 $ mkdir /tmp/foo
1081 $ mkdir /tmp/foo
1082 /tmp/foo: File exists
1083 $ mkdir /tmp/foo/bar/baz
1084 /tmp/foo/bar/baz: No such file or directory
1085 $ mkdir -p /tmp/foo/bar/baz
1086
1087-------------------------------
1088
1089=item mkfifo
1090
Erik Andersen5e1189e2000-04-15 16:34:54 +00001091Usage: mkfifo [OPTIONS] name
1092
1093Creates a named pipe (identical to 'mknod name p')
1094
1095Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001096
Erik Andersen5e1189e2000-04-15 16:34:54 +00001097 -m create the pipe using the specified mode (default a=rw)
1098
1099-------------------------------
1100
1101=item mkfs.minix
1102
1103Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1104
1105Make a MINIX filesystem.
1106
1107OPTIONS:
1108
1109 -c Check the device for bad blocks
1110 -n [14|30] Specify the maximum length of filenames
1111 -i Specify the number of inodes for the filesystem
1112 -l FILENAME Read the bad blocks list from FILENAME
1113 -v Make a Minix version 2 filesystem
1114
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001115-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001116
John Beppu46a4e762000-01-18 22:33:11 +00001117=item mknod
1118
Erik Andersen5e1189e2000-04-15 16:34:54 +00001119Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001120
Erik Andersen5e1189e2000-04-15 16:34:54 +00001121Create a special file (block, character, or pipe).
1122
1123Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001124
Erik Andersen5e1189e2000-04-15 16:34:54 +00001125 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001126
1127TYPEs include:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001128 b: Make a block (buffered) device.
1129 c or u: Make a character (un-buffered) device.
1130 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001131
1132Example:
1133
1134 $ mknod /dev/fd0 b 2 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00001135 $ mknod -m 644 /tmp/pipe p
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001136
1137-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001138
John Beppu46a4e762000-01-18 22:33:11 +00001139=item mkswap
1140
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001141Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1142
John Beppu4581b4c2000-01-19 15:04:41 +00001143Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001144
John Beppu4581b4c2000-01-19 15:04:41 +00001145Options:
1146
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001147 -c Check for read-ability.
1148 -v0 Make version 0 swap [max 128 Megs].
1149 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1150 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001151
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001152-------------------------------
1153
Erik Andersen227a59b2000-04-25 23:24:55 +00001154=item mktemp
1155
Erik Andersene31c0662000-05-02 05:32:07 +00001156Usage: mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001157
1158Creates a temporary file with its name based on TEMPLATE.
1159TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1160
1161Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001162
Erik Andersen227a59b2000-04-25 23:24:55 +00001163 $ mktemp /tmp/temp.XXXXXX
1164 /tmp/temp.mWiLjM
1165 $ ls -la /tmp/temp.mWiLjM
1166 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1167
1168-------------------------------
1169
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001170=item nc
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001171
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001172Usage: nc [IP] [port]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001173
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001174Netcat opens a pipe to IP:port
Erik Andersen5e1189e2000-04-15 16:34:54 +00001175
1176Example:
1177
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001178 $ nc foobar.somedomain.com 25
Erik Andersen5e1189e2000-04-15 16:34:54 +00001179 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1180 help
1181 214-Commands supported:
1182 214- HELO EHLO MAIL RCPT DATA AUTH
1183 214 NOOP QUIT RSET HELP
1184 quit
1185 221 foobar closing connection
1186
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001187-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001188
John Beppu46a4e762000-01-18 22:33:11 +00001189=item more
1190
John Beppu4581b4c2000-01-19 15:04:41 +00001191Usage: more [file ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001192
1193More is a filter for paging through text one screenful at a time.
1194
1195Example:
1196
1197 $ dmesg | more
John Beppu50ed0672000-04-13 23:44:04 +00001198
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001199-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001200
John Beppu46a4e762000-01-18 22:33:11 +00001201=item mount
1202
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001203Usage: mount [flags]
1204 mount [flags] device directory [B<-o> options,more-options]
John Beppu4581b4c2000-01-19 15:04:41 +00001205
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001206Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001207
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001208 -a: Mount all file systems in fstab.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001209 -o option: One of many filesystem options, listed below.
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001210 -r: Mount the filesystem read-only.
1211 -t fs-type: Specify the filesystem type.
1212 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001213
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001214Options for use with the "B<-o>" flag:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001215
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001216 async/sync: Writes are asynchronous / synchronous.
1217 atime/noatime: Enable / disable updates to inode access times.
1218 dev/nodev: Allow use of special device files / disallow them.
1219 exec/noexec: Allow use of executable files / disallow them.
1220 loop: Mounts a file via loop device.
1221 suid/nosuid: Allow set-user-id-root programs / disallow them.
1222 remount: Re-mount a currently-mounted filesystem, changing its flags.
1223 ro/rw: Mount for read-only / read-write.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001224 There are EVEN MORE flags that are specific to each filesystem.
1225 You'll have to see the written documentation for those.
1226
1227Example:
1228
1229 $ mount
1230 /dev/hda3 on / type minix (rw)
1231 proc on /proc type proc (rw)
1232 devpts on /dev/pts type devpts (rw)
1233 $ mount /dev/fd0 /mnt -t msdos -o ro
1234 $ mount /tmp/diskimage /opt -t ext2 -o loop
John Beppu50ed0672000-04-13 23:44:04 +00001235
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001236-------------------------------
1237
1238=item mt
1239
John Beppu9057b6a2000-04-16 10:22:28 +00001240Usage: mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001241
1242Control magnetic tape drive operation
1243
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001244-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001245
John Beppu46a4e762000-01-18 22:33:11 +00001246=item mv
1247
John Beppu4581b4c2000-01-19 15:04:41 +00001248Usage: mv SOURCE DEST
1249
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001250 or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001251
1252Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001253
1254Example:
1255
1256 $ mv /tmp/foo /bin/bar
John Beppu50ed0672000-04-13 23:44:04 +00001257
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001258-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001259
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001260=item nslookup
John Beppu46a4e762000-01-18 22:33:11 +00001261
Erik Andersen5e1189e2000-04-15 16:34:54 +00001262Usage: nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001263
Erik Andersen5e1189e2000-04-15 16:34:54 +00001264Queries the nameserver for the IP address of the given HOST
1265
1266Example:
1267
1268 $ nslookup localhost
1269 Server: default
1270 Address: default
1271
1272 Name: debian
1273 Address: 127.0.0.1
John Beppu46a4e762000-01-18 22:33:11 +00001274
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001275-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001276
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001277=item ping
1278
1279Usage: ping [OPTION]... host
1280
1281Send ICMP ECHO_REQUEST packets to network hosts.
1282
1283Options:
1284
1285 -c COUNT Send only COUNT pings.
Pavel Roskin0024abc2000-06-07 20:38:15 +00001286 -s SIZE Send SIZE data bytes in packets (default=56).
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001287 -q Quiet mode, only displays output at start
1288 and when finished.
1289Example:
1290
1291 $ ping localhost
1292 PING slag (127.0.0.1): 56 data bytes
1293 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1294
1295 --- debian ping statistics ---
1296 1 packets transmitted, 1 packets received, 0% packet loss
1297 round-trip min/avg/max = 20.1/20.1/20.1 ms
1298
1299-------------------------------
1300
Erik Andersen5e1189e2000-04-15 16:34:54 +00001301=item poweroff
1302
1303Shuts down the system, and requests that the kernel turn off power upon halting.
1304
1305-------------------------------
1306
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001307=item printf
1308
Erik Andersen5e1189e2000-04-15 16:34:54 +00001309Usage: printf format [argument...]
1310
1311Formats and prints the given data in a manner similar to the C printf command.
1312
1313Example:
1314
1315 $ printf "Val=%d\n" 5
1316 Val=5
1317
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001318-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001319
John Beppu46a4e762000-01-18 22:33:11 +00001320=item ps
1321
Erik Andersen5e1189e2000-04-15 16:34:54 +00001322Usage: ps
1323
1324Report process status
1325
1326This version of ps accepts no options.
1327
1328Example:
1329
1330 $ ps
1331 PID Uid Gid State Command
1332 1 root root S init
1333 2 root root S [kflushd]
1334 3 root root S [kupdate]
1335 4 root root S [kpiod]
1336 5 root root S [kswapd]
1337 742 andersen andersen S [bash]
1338 743 andersen andersen S -bash
1339 745 root root S [getty]
1340 2990 andersen andersen R ps
1341
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001342-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001343
John Beppu46a4e762000-01-18 22:33:11 +00001344=item pwd
1345
Erik Andersen5e1189e2000-04-15 16:34:54 +00001346Prints the full filename of the current working directory.
1347
1348Example:
1349
1350 $ pwd
1351 /root
1352
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001353-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001354
John Beppu46a4e762000-01-18 22:33:11 +00001355=item reboot
1356
Erik Andersen5e1189e2000-04-15 16:34:54 +00001357Instructs the kernel to reboot the system.
1358
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001359-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001360
John Beppu46a4e762000-01-18 22:33:11 +00001361=item rm
1362
Erik Andersen5e1189e2000-04-15 16:34:54 +00001363Usage: rm [OPTION]... FILE...
1364
Eric Andersen815e9042000-06-06 16:15:23 +00001365Remove (unlink) the FILE(s). You may use '--' to
1366indicate that all following arguments are non-options.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001367
1368Options:
1369
1370 -f remove existing destinations, never prompt
1371 -r or -R remove the contents of directories recursively
1372
1373Example:
1374
1375 $ rm -rf /tmp/foo
1376
1377-------------------------------
1378
1379=item rmdir
1380
1381Usage: rmdir [OPTION]... DIRECTORY...
1382
1383Remove the DIRECTORY(ies), if they are empty.
1384
1385Example:
1386
1387 # rmdir /tmp/foo
1388
1389-------------------------------
1390
1391=item rmmod
1392
1393Usage: rmmod [OPTION]... [MODULE]...
1394
1395Unloads the specified kernel modules from the kernel.
1396
1397Options:
1398
1399 -a Try to remove all unused kernel modules.
1400
1401Example:
1402
1403 $ rmmod tulip
1404
1405-------------------------------
1406
1407=item sed
1408
John Beppu9057b6a2000-04-16 10:22:28 +00001409Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001410
1411Allowed sed scripts come in the following form:
1412
1413 'ADDR [!] COMMAND'
1414
1415 where address ADDR can be:
1416 NUMBER Match specified line number
1417 $ Match last line
1418 /REGEXP/ Match specified regexp
1419 (! inverts the meaning of the match)
1420
1421 and COMMAND can be:
1422 s/regexp/replacement/[igp]
1423 which attempt to match regexp against the pattern space
1424 and if successful replaces the matched portion with replacement.
1425
1426 aTEXT
1427 which appends TEXT after the pattern space
1428
1429Options:
1430
1431 -e add the script to the commands to be executed
1432 -n suppress automatic printing of pattern space
1433
1434This version of sed matches full regular expresions.
1435
1436Example:
1437
1438 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1439 bar
1440
1441-------------------------------
1442
Erik Andersen4f3f7572000-04-28 00:18:56 +00001443=item setkeycodes
1444
1445Usage: setkeycodes SCANCODE KEYCODE ...
1446
1447Set entries into the kernel's scancode-to-keycode map,
1448allowing unusual keyboards to generate usable keycodes.
1449
1450SCANCODE may be either xx or e0xx (hexadecimal),
1451and KEYCODE is given in decimal
1452
1453Example:
1454
1455 # setkeycodes e030 127
1456
1457-------------------------------
1458
Erik Andersen5e1189e2000-04-15 16:34:54 +00001459=item sh
1460
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001461Usage: sh
1462
1463lash -- the BusyBox LAme SHell (command interpreter)
1464
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001465This command does not yet have proper documentation.
1466
1467Use lash just as you would use any other shell. It properly handles pipes,
1468redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1469has a sufficient set of builtins to do what is needed. It does not (yet)
1470support Bourne Shell syntax. If you need things like "if-then-else", "while",
1471and such, use ash or bash. If you just need a very simple and extremely small
1472shell, this will do the job.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001473
1474-------------------------------
1475
1476=item sfdisk
1477
1478Usage: sfdisk [options] device ...
1479
1480device: something like /dev/hda or /dev/sda
1481
1482useful options:
1483
1484 -s [or --show-size]: list size of a partition
1485 -c [or --id]: print or change partition Id
1486 -l [or --list]: list partitions of each device
1487 -d [or --dump]: idem, but in a format suitable for later input
1488 -i [or --increment]: number cylinders etc. from 1 instead of from 0
1489 -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB
1490 -T [or --list-types]:list the known partition types
1491 -D [or --DOS]: for DOS-compatibility: waste a little space
1492 -R [or --re-read]: make kernel reread partition table
1493 -N# : change only the partition with number #
1494 -n : do not actually write to disk
1495 -O file : save the sectors that will be overwritten to file
1496 -I file : restore these sectors again
1497 -v [or --version]: print version
1498 -? [or --help]: print this message
1499
1500dangerous options:
1501
1502 -g [or --show-geometry]: print the kernel's idea of the geometry
1503 -x [or --show-extended]: also list extended partitions on output
1504
1505 or expect descriptors for them on input
1506 -L [or --Linux]: do not complain about things irrelevant for Linux
1507 -q [or --quiet]: suppress warning messages
1508 You can override the detected geometry using:
1509 -C# [or --cylinders #]:set the number of cylinders to use
1510 -H# [or --heads #]: set the number of heads to use
1511 -S# [or --sectors #]: set the number of sectors to use
1512
1513You can disable all consistency checking with:
1514
1515 -f [or --force]: do what I say, even if it is stupid
1516
1517-------------------------------
1518
1519=item sleep
1520
1521Usage: sleep N
1522
1523Pause for N seconds.
1524
1525Example:
1526
1527 $ sleep 2
1528 [2 second delay results]
1529
1530-------------------------------
1531
1532=item sort
1533
John Beppu9057b6a2000-04-16 10:22:28 +00001534Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001535
1536Sorts lines of text in the specified files
1537
1538Example:
1539
1540 $ echo -e "e\nf\nb\nd\nc\na" | sort
1541 a
1542 b
1543 c
1544 d
1545 e
1546 f
1547
1548-------------------------------
1549
1550=item sync
1551
1552Usage: sync
1553
1554Write all buffered filesystem blocks to disk.
1555
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001556-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001557
John Beppu46a4e762000-01-18 22:33:11 +00001558=item syslogd
1559
Erik Andersen5e1189e2000-04-15 16:34:54 +00001560Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001561
Erik Andersen5e1189e2000-04-15 16:34:54 +00001562Linux system and kernel (provides klogd) logging utility.
1563Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001564
Erik Andersen5e1189e2000-04-15 16:34:54 +00001565Options:
Pavel Roskin049b7062000-06-07 21:19:49 +00001566
Pavel Roskinda10ec02000-06-07 21:08:25 +00001567 -m NUM Interval between MARK lines (default=20min, 0=off)
1568 -n Run as a foreground process
1569 -K Do not start up the klogd process
1570 -O FILE Use an alternate log file (default=/var/log/messages)
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001571
1572-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001573
John Beppu46a4e762000-01-18 22:33:11 +00001574=item swapon
1575
Erik Andersen5e1189e2000-04-15 16:34:54 +00001576Usage: swapon [OPTION] [device]
1577
1578Start swapping virtual memory pages on the given device.
1579
1580Options:
1581
1582 -a Start swapping on all swap devices
1583
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001584-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001585
John Beppu46a4e762000-01-18 22:33:11 +00001586=item swapoff
1587
Erik Andersen5e1189e2000-04-15 16:34:54 +00001588Usage: swapoff [OPTION] [device]
1589
1590Stop swapping virtual memory pages on the given device.
1591
1592Options:
1593
1594 -a Stop swapping on all swap devices
1595
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001596-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001597
John Beppu46a4e762000-01-18 22:33:11 +00001598=item tail
1599
Erik Andersen5e1189e2000-04-15 16:34:54 +00001600Usage: tail [OPTION] [FILE]...
1601
1602Print last 10 lines of each FILE to standard output.
1603With more than one FILE, precede each with a header giving the
1604file name. With no FILE, or when FILE is -, read standard input.
1605
1606Options:
1607
1608 -n NUM Print last NUM lines instead of first 10
1609 -f Output data as the file grows. This version
1610 of 'tail -f' supports only one file at a time.
1611
1612Example:
1613
1614 $ tail -n 1 /etc/resolv.conf
1615 nameserver 10.0.0.1
1616
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001617-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001618
John Beppu46a4e762000-01-18 22:33:11 +00001619=item tar
1620
John Beppu9057b6a2000-04-16 10:22:28 +00001621Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001622
1623Create, extract, or list files from a tar file. Note that
1624this version of tar treats hard links as separate files.
1625
1626Main operation mode:
1627
1628 c create
1629 x extract
1630 t list
1631
1632File selection:
1633
1634 f name of tarfile or "-" for stdin
1635 O extract to stdout
1636 --exclude file to exclude
1637
1638Informative output:
1639
1640 v verbosely list files processed
1641
1642Example:
1643
1644 $ zcat /tmp/tarball.tar.gz | tar -xf -
1645 $ tar -cf /tmp/tarball.tar /usr/local
1646
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001647-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001648
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001649=item test, [
1650
Erik Andersen5e1189e2000-04-15 16:34:54 +00001651Usage: test EXPRESSION
1652or [ EXPRESSION ]
1653
1654Checks file types and compares values returning an exit
1655code determined by the value of EXPRESSION.
1656
1657Example:
1658
1659 $ test 1 -eq 2
1660 $ echo $?
1661 1
1662 $ test 1 -eq 1
1663 $ echo $?
1664 0
1665 $ [ -d /etc ]
1666 $ echo $?
1667 0
1668 $ [ -d /junk ]
1669 $ echo $?
1670 1
1671
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001672-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001673
John Beppu46a4e762000-01-18 22:33:11 +00001674=item tee
1675
Erik Andersen5e1189e2000-04-15 16:34:54 +00001676Usage: tee [OPTION]... [FILE]...
1677
1678Copy standard input to each FILE, and also to standard output.
1679
1680Options:
1681
1682 -a append to the given FILEs, do not overwrite
1683
1684Example:
1685
1686 $ echo "Hello" | tee /tmp/foo
1687 $ cat /tmp/foo
1688 Hello
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
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00001757=item uuencode
1758
1759Usage: uuencode [OPTION] [INFILE] REMOTEFILE
1760
1761Uuencode a file.
1762
1763Options:
1764
1765 -m use base64 encoding as of RFC1521
1766
1767Example:
1768
1769 $ uuencode busybox busybox
1770 begin 755 busybox
1771 M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&
1772 .....
1773 $ uudecode busybox busybox > busybox.uu
1774 $
1775
1776-------------------------------
1777
1778=item uudecode
1779
1780Usage: uudecode [OPTION] [FILE]
1781
1782Uudecode a uuencoded file
1783
1784Options:
1785
1786 -o FILE direct output to FILE
1787
1788Example:
1789
1790 $ uudecode -o busybox busybox.uu
1791 $ ls -l busybox
1792 -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
1793
1794-------------------------------
1795
John Beppu46a4e762000-01-18 22:33:11 +00001796=item umount
1797
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001798Usage: umount [flags] filesystem|directory
1799
1800Flags:
1801
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001802 -a: Unmount all file systems
1803 -r: Try to remount devices as read-only if mount is busy
1804 -f: Force filesystem umount (i.e. unreachable NFS server)
1805 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001806
1807Example:
1808
1809 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001810
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001811-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001812
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001813=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001814
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001815Usage: uname [OPTION]...
1816
Erik Andersen26702fe2000-04-17 16:44:46 +00001817Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001818
1819Options:
1820
1821 -a print all information
1822 -m the machine (hardware) type
1823 -n print the machine's network node hostname
1824 -r print the operating system release
1825 -s print the operating system name
1826 -p print the host processor type
1827 -v print the operating system version
1828
1829Example:
1830
1831 $ uname -a
1832 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001833
1834-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001835
John Beppu46a4e762000-01-18 22:33:11 +00001836=item uniq
1837
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001838Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1839
1840Discard all but one of successive identical lines from INPUT
1841(or standard input), writing to OUTPUT (or standard output).
1842
1843Example:
1844
1845 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1846 a
1847 b
1848 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001849
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001850-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001851
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001852=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001853
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001854Usage: update [options]
1855
1856Periodically flushes filesystem buffers.
1857
1858Options:
1859
1860 -S force use of sync(2) instead of flushing
1861 -s SECS call sync this often (default 30)
1862 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001863
1864-------------------------------
1865
1866=item uptime
1867
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001868Usage: uptime
1869
1870Tells how long the system has been running since boot.
1871
1872Example:
1873
1874 $ uptime
1875 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001876
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001877-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001878
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001879=item usleep
1880
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001881Usage: usleep N
1882
1883Pauses for N microseconds.
1884
1885Example:
1886
1887 $ usleep 1000000
1888 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001889
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001890-------------------------------
1891
1892=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
1913=item whoami
1914
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001915Usage: whoami
1916
1917Prints the user name associated with the current effective user id.
1918
1919Example:
1920
1921 $ whoami
1922 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00001923
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001924-------------------------------
1925
1926=item yes
1927
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001928Usage: yes [OPTION]... [STRING]...
1929
1930Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001931
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001932-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00001933
1934=item zcat
1935
Erik Andersen26702fe2000-04-17 16:44:46 +00001936This is essentially an alias for invoking "gunzip B<-c>", where
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001937it decompresses the file inquestion and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001938
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001939-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001940
John Beppu46a4e762000-01-18 22:33:11 +00001941=back
John Beppu3a1b6be2000-01-18 15:45:59 +00001942
Erik Andersena19bc642000-05-02 06:40:02 +00001943=head1 LIBC NSS
1944
1945GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
1946library for the local environment, and to configure how it reads system data,
1947such as passwords and group information. BusyBox has made it Policy that it
1948will never use NSS, and will never use and libc calls that make use of NSS.
1949This allows you to run an embedded system without the need for installing an
1950/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
1951
1952If you are using a system that is using a remote LDAP server for authentication
1953via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
1954BusyBox source. Chances are though, that if you have enough space to install
1955of that stuff on your system, then you probably want the full GNU utilities.
1956
John Beppu3a1b6be2000-01-18 15:45:59 +00001957=head1 SEE ALSO
1958
1959textutils(1), shellutils(1), etc...
1960
1961=head1 MAINTAINER
1962
Erik Andersen1101d232000-04-19 05:15:12 +00001963Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001964
1965=head1 AUTHORS
1966
John Beppu08fe43d2000-01-19 12:39:16 +00001967The following people have contributed code to BusyBox whether
1968they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00001969
Erik Andersen1101d232000-04-19 05:15:12 +00001970Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001971
John Beppu08fe43d2000-01-19 12:39:16 +00001972=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001973
John Beppu08fe43d2000-01-19 12:39:16 +00001974John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001975
John Beppu08fe43d2000-01-19 12:39:16 +00001976=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001977
John Beppu08fe43d2000-01-19 12:39:16 +00001978Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001979
John Beppu08fe43d2000-01-19 12:39:16 +00001980=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001981
John Beppu08fe43d2000-01-19 12:39:16 +00001982Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001983
John Beppu08fe43d2000-01-19 12:39:16 +00001984=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001985
John Beppu08fe43d2000-01-19 12:39:16 +00001986Dave Cinege <dcinege@psychosis.com>
1987
1988=for html <br>
1989
John Beppu50ed0672000-04-13 23:44:04 +00001990Karl M. Hegbloom <karlheg@debian.org>
1991
1992=for html <br>
1993
John Beppu4fd10fc2000-04-17 05:13:59 +00001994John Lombardo <john@deltanet.com>
1995
1996=for html <br>
1997
Eric Andersen86ab8a32000-06-02 03:21:42 +00001998Glenn McGrath <bug1@netconnect.com.au>
1999
2000=for html <br>
2001
John Beppu08fe43d2000-01-19 12:39:16 +00002002Bruce Perens <bruce@perens.com>
2003
2004=for html <br>
2005
Eric Andersen08e92892000-06-02 03:21:36 +00002006Pavel Roskin <pavel_roskin@geocities.com>
2007
2008=for html <br>
2009
John Beppu08fe43d2000-01-19 12:39:16 +00002010Linus Torvalds <torvalds@transmeta.com>
2011
2012=for html <br>
2013
2014Charles P. Wright <cpwright@villagenet.com>
2015
2016=for html <br>
2017
2018Enrique Zanardi <ezanardi@ull.es>
2019
2020=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00002021
2022=cut
John Beppu08fe43d2000-01-19 12:39:16 +00002023
Eric Andersen2b6ab3c2000-06-13 06:54:53 +00002024# $Id: busybox.pod,v 1.41 2000/06/13 06:54:53 andersen Exp $