blob: e64cf80703ce18f40823331750441f737cf13144 [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
Erik Andersene90f4042000-04-21 21:53:58 +000019or emdedded system. The utilities in BusyBox generally have fewer options then
20their full featured GNU cousins; however, the options that are included provide
21the 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
Erik Andersen5e1189e2000-04-15 16:34:54 +000058basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, date, dd, df,
59dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
60freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
61hostname, init, kill, killall, length, ln, loadacm, loadfont, loadkmap, logger,
62logname, ls, lsmod, makedevs, math, mkdir, mkfifo, mkfs.minix, mknod, mkswap,
Erik Andersen227a59b2000-04-25 23:24:55 +000063mktemp, mnc, more, mount, mt, mv, nslookup, ping, poweroff, printf, ps, pwd,
Erik Andersen4f3f7572000-04-28 00:18:56 +000064reboot, rm, rmdir, rmmod, sed, setkeycodes, sh, sfdisk, sleep, sort, sync,
65syslogd, swapon, swapoff, tail, tar, test, tee, touch, tr, true, tty, umount,
66uname, uniq, update, uptime, usleep, wc, whoami, yes, zcat, [
Erik Andersen62dc17a2000-04-13 01:18:23 +000067
John Beppu46a4e762000-01-18 22:33:11 +000068=over 4
69
Erik Andersen62dc17a2000-04-13 01:18:23 +000070=item basename
71
72Usage: basename [file ...]
73
Erik Andersencf8d38a2000-04-21 01:23:36 +000074Strips directory path and suffixes from FILE(s).
Erik Andersen62dc17a2000-04-13 01:18:23 +000075
76Example:
77
78 $ basename /usr/local/bin/foo
79 foo
80 $ basename /usr/local/bin/
81 bin
82
Erik Andersen9cf3bfa2000-04-13 18:49:43 +000083-------------------------------
84
Erik Andersena6c75222000-04-18 00:00:52 +000085=item cat
John Beppu46a4e762000-01-18 22:33:11 +000086
Erik Andersencf8d38a2000-04-21 01:23:36 +000087Usage: cat [FILE ...]
Erik Andersen62dc17a2000-04-13 01:18:23 +000088
Erik Andersencf8d38a2000-04-21 01:23:36 +000089Concatenates FILE(s) and prints them to the standard output.
Erik Andersen62dc17a2000-04-13 01:18:23 +000090
91Example:
92
93 $ cat /proc/uptime
94 110716.72 17.67
John Beppu4581b4c2000-01-19 15:04:41 +000095
Erik Andersen9cf3bfa2000-04-13 18:49:43 +000096-------------------------------
97
Erik Andersen5e1189e2000-04-15 16:34:54 +000098=item chgrp
99
100Usage: chgrp [OPTION]... GROUP FILE...
101
102Change the group membership of each FILE to GROUP.
Erik Andersen26702fe2000-04-17 16:44:46 +0000103
Erik Andersen5e1189e2000-04-15 16:34:54 +0000104Options:
105
106 -R change files and directories recursively
Erik Andersen26702fe2000-04-17 16:44:46 +0000107
Erik Andersen5e1189e2000-04-15 16:34:54 +0000108Example:
109
110 $ ls -l /tmp/foo
111 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
112 $ chgrp root /tmp/foo
113 $ ls -l /tmp/foo
114 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
115
116-------------------------------
117
John Beppu46a4e762000-01-18 22:33:11 +0000118=item chmod
119
John Beppuf17792c2000-04-13 03:16:01 +0000120Usage: chmod [B<-R>] MODE[,MODE]... FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000121
Erik Andersencf8d38a2000-04-21 01:23:36 +0000122Changes file access permissions for the specified FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000123Each MODE is defined by combining the letters for WHO has access to the file,
124an OPERATOR for selecting how the permissions should be changed, and a
Erik Andersencf8d38a2000-04-21 01:23:36 +0000125PERISSION for FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000126
Erik Andersencf8d38a2000-04-21 01:23:36 +0000127WHO may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000128
Erik Andersencf8d38a2000-04-21 01:23:36 +0000129 u User who owns the file
130 g Users in the file's Group
Erik Andersen62dc17a2000-04-13 01:18:23 +0000131 o Other users not in the file's group
132 a All users
133
Erik Andersencf8d38a2000-04-21 01:23:36 +0000134OPERATOR may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000135
Erik Andersencf8d38a2000-04-21 01:23:36 +0000136 + Add a permission
137 - Remove a permission
138 = Assign a permission
Erik Andersen62dc17a2000-04-13 01:18:23 +0000139
Erik Andersencf8d38a2000-04-21 01:23:36 +0000140PERMISSION may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000141
Erik Andersencf8d38a2000-04-21 01:23:36 +0000142 r Read
Erik Andersen62dc17a2000-04-13 01:18:23 +0000143 w Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000144 x Execute (or access for directories)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000145 s Set user (or group) ID bit
Erik Andersencf8d38a2000-04-21 01:23:36 +0000146 t Stickey bit (for directories prevents removing files by non-owners)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000147
Erik Andersencf8d38a2000-04-21 01:23:36 +0000148Alternately, permissions can be set numerically where the first three
149numbers are calculated by adding the octal values, such as
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000150
Erik Andersen62dc17a2000-04-13 01:18:23 +0000151 4 Read
152 2 Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000153 1 Execute
Erik Andersen62dc17a2000-04-13 01:18:23 +0000154
Erik Andersencf8d38a2000-04-21 01:23:36 +0000155An optional fourth digit can also be used to specify
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000156
Erik Andersen62dc17a2000-04-13 01:18:23 +0000157 4 Set user ID
158 2 Set group ID
Erik Andersencf8d38a2000-04-21 01:23:36 +0000159 1 Stickey bit
Erik Andersen62dc17a2000-04-13 01:18:23 +0000160
John Beppu4581b4c2000-01-19 15:04:41 +0000161Options:
162
Erik Andersencf8d38a2000-04-21 01:23:36 +0000163 -R Change files and directories recursively.
John Beppu4581b4c2000-01-19 15:04:41 +0000164
Erik Andersen62dc17a2000-04-13 01:18:23 +0000165Example:
166
167 $ ls -l /tmp/foo
168 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
169 $ chmod u+x /tmp/foo
170 $ ls -l /tmp/foo
171 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
172 $ chmod 444 /tmp/foo
173 $ ls -l /tmp/foo
174 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000175
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000176-------------------------------
177
John Beppu46a4e762000-01-18 22:33:11 +0000178=item chown
179
Erik Andersencf8d38a2000-04-21 01:23:36 +0000180Usage: chown [OPTION]... OWNER[<.|:>[GROUP] FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000181
Erik Andersen62dc17a2000-04-13 01:18:23 +0000182Changes the owner and/or group of each FILE to OWNER and/or GROUP.
John Beppu5a50def2000-04-17 17:46:46 +0000183
John Beppu4581b4c2000-01-19 15:04:41 +0000184Options:
185
Erik Andersencf8d38a2000-04-21 01:23:36 +0000186 -R Changes files and directories recursively
Erik Andersen62dc17a2000-04-13 01:18:23 +0000187
188Example:
189
190 $ ls -l /tmp/foo
191 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
192 $ chown root /tmp/foo
193 $ ls -l /tmp/foo
194 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
195 $ chown root.root /tmp/foo
196 ls -l /tmp/foo
197 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000198
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000199-------------------------------
200
John Beppu46a4e762000-01-18 22:33:11 +0000201=item chroot
202
John Beppu4581b4c2000-01-19 15:04:41 +0000203Usage: chroot NEWROOT [COMMAND...]
204
205Run COMMAND with root directory set to NEWROOT.
206
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000207Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000208
209 $ ls -l /bin/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000210 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox
Erik Andersen62dc17a2000-04-13 01:18:23 +0000211 $ mount /dev/hdc1 /mnt -t minix
212 $ chroot /mnt
213 $ ls -l /bin/ls
214 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
John Beppu4581b4c2000-01-19 15:04:41 +0000215
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000216-------------------------------
217
John Beppu46a4e762000-01-18 22:33:11 +0000218=item clear
219
Erik Andersen62dc17a2000-04-13 01:18:23 +0000220Clears the screen.
John Beppu4581b4c2000-01-19 15:04:41 +0000221
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000222-------------------------------
223
John Beppu46a4e762000-01-18 22:33:11 +0000224=item chvt
225
John Beppu4581b4c2000-01-19 15:04:41 +0000226Usage: chvt N
227
Erik Andersencf8d38a2000-04-21 01:23:36 +0000228Changes the foreground virtual terminal to /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000229
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000230-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000231
John Beppu46a4e762000-01-18 22:33:11 +0000232=item cp
233
John Beppu4581b4c2000-01-19 15:04:41 +0000234Usage: cp [OPTION]... SOURCE DEST
235
Erik Andersen62dc17a2000-04-13 01:18:23 +0000236 or: cp [OPTION]... SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +0000237
Erik Andersencf8d38a2000-04-21 01:23:36 +0000238Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
John Beppu4581b4c2000-01-19 15:04:41 +0000239
Erik Andersene31c0662000-05-02 05:32:07 +0000240Options:
241
Erik Andersencf8d38a2000-04-21 01:23:36 +0000242 -a Same as -dpR
243 -d Preserves links
244 -p Preserves file attributes if possable
245 -R Copies directories recursively
John Beppu4581b4c2000-01-19 15:04:41 +0000246
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000247-------------------------------
248
John Beppu46a4e762000-01-18 22:33:11 +0000249=item date
250
Erik Andersen62dc17a2000-04-13 01:18:23 +0000251Usage: date [OPTION]... [+FORMAT]
John Beppu4581b4c2000-01-19 15:04:41 +0000252
Erik Andersen62dc17a2000-04-13 01:18:23 +0000253 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
254
Erik Andersencf8d38a2000-04-21 01:23:36 +0000255Displays the current time in the given FORMAT, or sets the system date.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000256
257Options:
Erik Andersene31c0662000-05-02 05:32:07 +0000258
Erik Andersencf8d38a2000-04-21 01:23:36 +0000259 -R Outputs RFC-822 compliant date string
260 -s Sets time described by STRING
261 -u Prints or sets Coordinated Universal Time
Erik Andersen62dc17a2000-04-13 01:18:23 +0000262
263Example:
John Beppuf17792c2000-04-13 03:16:01 +0000264
Erik Andersen62dc17a2000-04-13 01:18:23 +0000265 $ date
266 Wed Apr 12 18:52:41 MDT 2000
John Beppu4581b4c2000-01-19 15:04:41 +0000267
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000268-------------------------------
269
John Beppu46a4e762000-01-18 22:33:11 +0000270=item dd
271
Erik Andersen62dc17a2000-04-13 01:18:23 +0000272Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
John Beppu4581b4c2000-01-19 15:04:41 +0000273
274Copy a file, converting and formatting according to options
275
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000276 if=FILE read from FILE instead of stdin
277 of=FILE write to FILE instead of stdout
278 bs=n read and write n bytes at a time
279 count=n copy only n input blocks
280 skip=n skip n input blocks
281 seek=n skip n output blocks
Erik Andersen62dc17a2000-04-13 01:18:23 +0000282
283Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
John Beppu4581b4c2000-01-19 15:04:41 +0000284
Erik Andersen62dc17a2000-04-13 01:18:23 +0000285Example:
286
287 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
288 4+0 records in
289 4+0 records out
290
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000291-------------------------------
292
John Beppu46a4e762000-01-18 22:33:11 +0000293=item df
294
Erik Andersen62dc17a2000-04-13 01:18:23 +0000295Usage: df [filesystem ...]
296
297Prints the filesystem space used and space available.
298
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000299Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000300
301 $ df
302 Filesystem 1k-blocks Used Available Use% Mounted on
303 /dev/sda3 8690864 8553540 137324 98% /
304 /dev/sda1 64216 36364 27852 57% /boot
305 $ df /dev/sda3
306 Filesystem 1k-blocks Used Available Use% Mounted on
307 /dev/sda3 8690864 8553540 137324 98% /
John Beppu4581b4c2000-01-19 15:04:41 +0000308
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000309-------------------------------
310
311=item dirname
312
313Usage: dirname NAME
314
315Strip non-directory suffix from file name
316
317Example:
318
319 $ dirname /tmp/foo
320 /tmp
321 $ dirname /tmp/foo/
322 /tmp
323
324-------------------------------
325
John Beppu46a4e762000-01-18 22:33:11 +0000326=item dmesg
327
John Beppuf17792c2000-04-13 03:16:01 +0000328Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
John Beppu4581b4c2000-01-19 15:04:41 +0000329
Erik Andersen62dc17a2000-04-13 01:18:23 +0000330Print or controls the kernel ring buffer.
John Beppu4581b4c2000-01-19 15:04:41 +0000331
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000332-------------------------------
333
John Beppu46a4e762000-01-18 22:33:11 +0000334=item du
335
Erik Andersen62dc17a2000-04-13 01:18:23 +0000336Usage: du [OPTION]... [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000337
Erik Andersen62dc17a2000-04-13 01:18:23 +0000338Summarize disk space used for each FILE and/or directory.
339Disk space is printed in units of 1k (i.e. 1024 bytes).
340
341Options:
John Beppuf17792c2000-04-13 03:16:01 +0000342
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000343 -l count sizes many times if hard linked
344 -s display only a total for each argument
Erik Andersen62dc17a2000-04-13 01:18:23 +0000345
346Example:
347
Erik Andersencf8d38a2000-04-21 01:23:36 +0000348 $ ./BusyBox du
Erik Andersen62dc17a2000-04-13 01:18:23 +0000349 16 ./CVS
350 12 ./kernel-patches/CVS
351 80 ./kernel-patches
352 12 ./tests/CVS
353 36 ./tests
354 12 ./scripts/CVS
355 16 ./scripts
356 12 ./docs/CVS
357 104 ./docs
358 2417 .
359
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000360-------------------------------
361
362=item dutmp
363
364Usage: dutmp [FILE]
365
366Dump utmp file format (pipe delimited) from FILE
367or stdin to stdout.
368
369Example:
370
371 $ dutmp /var/run/utmp
372 8|7||si|||0|0|0|955637625|760097|0
373 2|0|~|~~|reboot||0|0|0|955637625|782235|0
374 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
375 8|125||l4|||0|0|0|955637629|998367|0
376 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
377 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
378 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
379
380-------------------------------
381
382=item echo
383
384Usage: echo [-neE] [ARG ...]
385
386Prints the specified ARGs to stdout
387
388Options:
389
390 -n suppress trailing newline
391 -e interpret backslash-escaped characters (i.e. \t=tab etc)
392 -E disable interpretation of backslash-escaped characters
393
394Example:
395
396 $ echo "Erik is cool"
397 Erik is cool
398 $ echo -e "Erik\nis\ncool"
399 Erik
400 is
401 cool
402 $ echo "Erik\nis\ncool"
403 Erik\nis\ncool
404
405-------------------------------
406
407=item false
408
Erik Andersen5e1189e2000-04-15 16:34:54 +0000409Returns an exit code of FALSE (1)
410
411Example:
412
413 $ false
414 $ echo $?
415 1
416
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000417-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000418
John Beppu46a4e762000-01-18 22:33:11 +0000419=item fbset
420
John Beppu4581b4c2000-01-19 15:04:41 +0000421Usage: fbset [options] [mode]
422
Erik Andersen62dc17a2000-04-13 01:18:23 +0000423Show and modify frame buffer device settings
424
John Beppu4581b4c2000-01-19 15:04:41 +0000425Options:
426
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000427 -h
428 -fb
429 -db
430 -a
431 -i
432 -g
433 -t
434 -accel
435 -hsync
436 -vsync
437 -laced
438 -double
John Beppu4581b4c2000-01-19 15:04:41 +0000439
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000440Example:
441
442 $ fbset
443 mode "1024x768-76"
444 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
445 geometry 1024 768 1024 768 16
446 timings 12714 128 32 16 4 128 4
447 accel false
448 rgba 5/11,6/5,5/0,0/0
449 endmode
450
451-------------------------------
452
453=item fdflush
454
455Usage: fdflush device
456
457Force floppy disk drive to detect disk change
458
459-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000460
John Beppu46a4e762000-01-18 22:33:11 +0000461=item find
462
John Beppu4581b4c2000-01-19 15:04:41 +0000463Usage: find [PATH...] [EXPRESSION]
464
465Search for files in a directory hierarchy. The default PATH is
466the current directory; default EXPRESSION is '-print'
467
John Beppu4581b4c2000-01-19 15:04:41 +0000468
Erik Andersen62dc17a2000-04-13 01:18:23 +0000469EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000470
471 -follow Dereference symbolic links.
472 -name PATTERN File name (leading directories removed) matches PATTERN.
473 -print print the full file name followed by a newline to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000474
475Example:
476
477 $ find / -name /etc/passwd
478 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000479
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000480-------------------------------
481
John Beppu46a4e762000-01-18 22:33:11 +0000482=item free
483
John Beppu4581b4c2000-01-19 15:04:41 +0000484Usage: free
485
Erik Andersen62dc17a2000-04-13 01:18:23 +0000486Displays the amount of free and used memory in the system.
487
488Example:
489
490 $ free
Erik Andersen5e1189e2000-04-15 16:34:54 +0000491 total used free shared buffers
Erik Andersen62dc17a2000-04-13 01:18:23 +0000492 Mem: 257628 248724 8904 59644 93124
493 Swap: 128516 8404 120112
494 Total: 386144 257128 129016
495
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000496-------------------------------
497
498=item freeramdisk
499
500Usage: freeramdisk DEVICE
501
502Free all memory used by the specified ramdisk.
503
504Example:
505
506 $ freeramdisk /dev/ram2
507
508-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000509
John Beppu46a4e762000-01-18 22:33:11 +0000510=item deallocvt
511
John Beppu4581b4c2000-01-19 15:04:41 +0000512Usage: deallocvt N
513
Erik Andersen62dc17a2000-04-13 01:18:23 +0000514Deallocates unused virtual terminal /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000515
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000516-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000517
John Beppu46a4e762000-01-18 22:33:11 +0000518=item fsck.minix
519
John Beppuf17792c2000-04-13 03:16:01 +0000520Usage: fsck.minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000521
522Performs a consistency check for MINIX filesystems.
523
Erik Andersen62dc17a2000-04-13 01:18:23 +0000524OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000525
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000526 -l Lists all filenames
527 -r Perform interactive repairs
528 -a Perform automatic repairs
529 -v verbose
530 -s Outputs super-block information
531 -m Activates MINIX-like "mode not cleared" warnings
532 -f Force file system check.
533
534-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000535
John Beppu46a4e762000-01-18 22:33:11 +0000536=item grep
537
Erik Andersen62dc17a2000-04-13 01:18:23 +0000538Usage: grep [OPTIONS]... PATTERN [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000539
Erik Andersen62dc17a2000-04-13 01:18:23 +0000540Search for PATTERN in each FILE or standard input.
541
542OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000543
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000544 -h suppress the prefixing filename on output
545 -i ignore case distinctions
546 -n print line number with output lines
547 -q be quiet. Returns 0 if result was found, 1 otherwise
John Beppuf93a95d2000-04-24 18:07:30 +0000548 -v select non-matching lines
Erik Andersen62dc17a2000-04-13 01:18:23 +0000549
550This version of grep matches full regular expresions.
551
Erik Andersen62dc17a2000-04-13 01:18:23 +0000552Example:
553
554 $ grep root /etc/passwd
555 root:x:0:0:root:/root:/bin/bash
556 $ grep ^[rR]oo. /etc/passwd
557 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000558
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000559-------------------------------
560
561=item gunzip
562
Erik Andersen5e1189e2000-04-15 16:34:54 +0000563Usage: gunzip [OPTION]... FILE
564
565Uncompress FILE (or standard input if FILE is '-').
566
567Options:
568
569 -c Write output to standard output
570 -t Test compressed file integrity
571
572Example:
573
Erik Andersencf8d38a2000-04-21 01:23:36 +0000574 $ ls -la /tmp/BusyBox*
575 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
576 $ gunzip /tmp/BusyBox-0.43.tar.gz
577 $ ls -la /tmp/BusyBox*
578 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000579
580-------------------------------
581
582=item gzip
583
Erik Andersen5e1189e2000-04-15 16:34:54 +0000584Usage: gzip [OPTION]... FILE
585
586Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000587When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000588
589Options:
590
591 -c Write output to standard output instead of FILE.gz
592
593Example:
594
Erik Andersencf8d38a2000-04-21 01:23:36 +0000595 $ ls -la /tmp/BusyBox*
596 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
597 $ gzip /tmp/BusyBox-0.43.tar
598 $ ls -la /tmp/BusyBox*
599 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen5e1189e2000-04-15 16:34:54 +0000600
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000601
602-------------------------------
603
604=item halt
605
Erik Andersen5e1189e2000-04-15 16:34:54 +0000606Usage: halt
607
608This comand halts the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000609
610-------------------------------
611
John Beppu46a4e762000-01-18 22:33:11 +0000612=item head
613
Erik Andersen62dc17a2000-04-13 01:18:23 +0000614Usage: head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000615
616Print first 10 lines of each FILE to standard output.
617With more than one FILE, precede each with a header giving the
618file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000619
620Options:
John Beppuf17792c2000-04-13 03:16:01 +0000621
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000622 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000623
624Example:
625
626 $ head -n 2 /etc/passwd
627 root:x:0:0:root:/root:/bin/bash
628 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000629
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000630-------------------------------
631
632=item hostid
633
Erik Andersen5e1189e2000-04-15 16:34:54 +0000634Usage: hostid
635
636Prints out a unique 32-bit identifier for the current
637machine. The 32-bit identifier is intended to be unique
638among all UNIX systems in existence.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000639
640-------------------------------
641
John Beppu46a4e762000-01-18 22:33:11 +0000642=item hostname
643
John Beppuf17792c2000-04-13 03:16:01 +0000644Usage: hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000645
John Beppu4581b4c2000-01-19 15:04:41 +0000646Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000647(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000648
Erik Andersen62dc17a2000-04-13 01:18:23 +0000649Options:
John Beppuf17792c2000-04-13 03:16:01 +0000650
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000651 -s Short
652 -i Addresses for the hostname
653 -d DNS domain name
654 -F FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000655
656Example:
657
658 $ hostname
659 slag
John Beppu46a4e762000-01-18 22:33:11 +0000660
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000661-------------------------------
662
663=item init
664
Erik Andersen5e1189e2000-04-15 16:34:54 +0000665Usage: init
666
667Init is the parent of all processes.
668
669This version of init is designed to be run only by the kernel.
670
671BusyBox init doesn't support multiple runlevels. The runlevels field of
672the /etc/inittab file is completely ignored by BusyBox init. If you want
673runlevels, use sysvinit.
674
675BusyBox init works just fine without an inittab. If no inittab is found,
676it has the following default behavior:
677
678 ::sysinit:/etc/init.d/rcS
679 ::askfirst:/bin/sh
680
681if it detects that /dev/console is _not_ a serial console, it will also run:
682
683 tty2::askfirst:/bin/sh
684
685If you choose to use an /etc/inittab file, the inittab entry format is as follows:
686
687 <id>:<runlevels>:<action>:<process>
688
689 <id>:
690
691 WARNING: This field has a non-traditional meaning for BusyBox init!
692 The id field is used by BusyBox init to specify the controlling tty for
693 the specified process to run on. The contents of this field are
694 appended to "/dev/" and used as-is. There is no need for this field to
695 be unique, although if it isn't you may have strange results. If this
696 field is left blank, it is completely ignored. Also note that if
697 BusyBox detects that a serial console is in use, then all entries
698 containing non-empty id fields will _not_ be run. BusyBox init does
699 nothing with utmp. We don't need no stinkin' utmp.
700
701 <runlevels>:
702
703 The runlevels field is completely ignored.
704
705 <action>:
706
707 Valid actions include: sysinit, respawn, askfirst, wait,
708 once, and ctrlaltdel.
709
710 askfirst acts just like respawn, but before running the specified
711 process it displays the line "Please press Enter to activate this
712 console." and then waits for the user to press enter before starting
713 the specified process.
714
715 Unrecognised actions (like initdefault) will cause init to emit
716 an error message, and then go along with its business.
717
718 <process>:
719
720 Specifies the process to be executed and it's command line.
721
722
723Example /etc/inittab file:
724
725 # This is run first except when booting in single-user mode.
726 #
727 ::sysinit:/etc/init.d/rcS
728
729 # /bin/sh invocations on selected ttys
730 #
731 # Start an "askfirst" shell on the console (whatever that may be)
732 ::askfirst:/bin/sh
733 # Start an "askfirst" shell on /dev/tty2
734 tty2::askfirst:/bin/sh
735
736 # /sbin/getty invocations for selected ttys
737 #
738 tty4::respawn:/sbin/getty 38400 tty4
739 tty5::respawn:/sbin/getty 38400 tty5
740
741
742 # Example of how to put a getty on a serial line (for a terminal)
743 #
744 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
745 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
746 #
747 # Example how to put a getty on a modem line.
748 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
749
750 # Stuff to do before rebooting
751 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
752 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000753
754-------------------------------
755
John Beppu46a4e762000-01-18 22:33:11 +0000756=item kill
757
John Beppuf17792c2000-04-13 03:16:01 +0000758Usage: kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000759
Erik Andersen62dc17a2000-04-13 01:18:23 +0000760Send a signal (default is SIGTERM) to the specified process(es).
761
762Options:
John Beppuf17792c2000-04-13 03:16:01 +0000763
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000764 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000765
766Example:
767
768 $ ps | grep apache
769 252 root root S [apache]
770 263 www-data www-data S [apache]
771 264 www-data www-data S [apache]
772 265 www-data www-data S [apache]
773 266 www-data www-data S [apache]
774 267 www-data www-data S [apache]
775 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +0000776
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000777-------------------------------
778
779=item killall
780
John Beppu9057b6a2000-04-16 10:22:28 +0000781Usage: killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +0000782
783Send a signal (default is SIGTERM) to the specified process(es).
784
785Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000786
Erik Andersen5e1189e2000-04-15 16:34:54 +0000787 -l List all signal names and numbers.
788
789Example:
790
791 $ killall apache
792
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000793-------------------------------
794
795=item length
796
Erik Andersen5e1189e2000-04-15 16:34:54 +0000797Usage: length string
798
799Prints out the length of the specified string.
800
801Example:
802 $ length "Hello"
803 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000804
805-------------------------------
806
John Beppu46a4e762000-01-18 22:33:11 +0000807=item ln
808
John Beppu4581b4c2000-01-19 15:04:41 +0000809Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
810Create a link named LINK_NAME or DIRECTORY to the specified TARGET
811
812Options:
813
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000814 -s make symbolic links instead of hard links
815 -f remove existing destination files
John Beppu4581b4c2000-01-19 15:04:41 +0000816
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000817Example:
818
Erik Andersencf8d38a2000-04-21 01:23:36 +0000819 $ ln -s BusyBox /tmp/ls
820 [andersen@debian BusyBox]$ ls -l /tmp/ls
821 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000822
823-------------------------------
824
825=item loadacm
826
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000827Usage: loadacm
828
829Loads an acm from standard input.
830
831Example:
832
833 $ loadacm < /etc/i18n/acmname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000834
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000835-------------------------------
836
837=item loadfont
838
Erik Andersena6c75222000-04-18 00:00:52 +0000839Usage: loadfont
840
841Loads a console font from standard input.
842
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000843Example:
844
845 $ loadfont < /etc/i18n/fontname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000846
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000847-------------------------------
848
849=item loadkmap
850
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000851Usage: loadkmap
852
853Loads a binary keyboard translation table from standard input.
854
855Example:
856
857 $ loadkmap < /etc/i18n/lang-keymap
Erik Andersen5e1189e2000-04-15 16:34:54 +0000858
859-------------------------------
860
861=item logger
862
863Usage: logger [OPTION]... [MESSAGE]
864
865Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
866
867Options:
868
869 -s Log to stderr as well as the system log.
870 -t Log using the specified tag (defaults to user name).
871 -p Enter the message with the specified priority.
872 This may be numerical or a ``facility.level'' pair.
873
874Example:
875
876 $ logger "hello"
877
878-------------------------------
879
880=item logname
881
882Usage: logname
883
884Print the name of the current user.
885
886Example:
887
888 $ logname
889 root
890
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000891-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000892
John Beppu46a4e762000-01-18 22:33:11 +0000893=item ls
894
John Beppuf17792c2000-04-13 03:16:01 +0000895Usage: ls [B<-1acdelnpuxACF>] [filenames...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000896
897Options:
898
899 -a do not hide entries starting with .
900 -c with -l: show ctime (the time of last
901 modification of file status information)
902 -d list directory entries instead of contents
903 -e list both full date and full time
904 -l use a long listing format
905 -n list numeric UIDs and GIDs instead of names
906 -p append indicator (one of /=@|) to entries
907 -u with -l: show access time (the time of last
908 access of the file)
909 -x list entries by lines instead of by columns
910 -A do not list implied . and ..
911 -C list entries by columns
912 -F append indicator (one of */=@|) to entries
John Beppu50ed0672000-04-13 23:44:04 +0000913
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000914-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000915
John Beppu46a4e762000-01-18 22:33:11 +0000916=item lsmod
917
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000918Usage: lsmod
John Beppu4581b4c2000-01-19 15:04:41 +0000919
Erik Andersen5e1189e2000-04-15 16:34:54 +0000920Shows a list of all currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000921
922-------------------------------
923
924=item makedevs
925
Erik Andersen5e1189e2000-04-15 16:34:54 +0000926Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
927
928Creates a range of block or character special files
929
930TYPEs include:
931
932 b: Make a block (buffered) device.
933 c or u: Make a character (un-buffered) device.
934 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
935
936FIRST specifies the number appended to NAME to create the first device.
937LAST specifies the number of the last item that should be created.
938If 's' is the last argument, the base device is created as well.
939
940Example:
941
942 $ makedevs /dev/ttyS c 4 66 2 63
943 [creates ttyS2-ttyS63]
944 $ makedevs /dev/hda b 3 0 0 8 s
945 [creates hda,hda1-hda8]
946
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000947-------------------------------
948
949=item math
950
Erik Andersen5e1189e2000-04-15 16:34:54 +0000951Usage: math expression ...
952
953This is a Tiny RPN calculator that understands the
954following operations: +, -, /, *, and, or, not, eor.
955
956Example:
957
958 $ math 2 2 add
959 4
960 $ math 8 8 \* 2 2 + /
961 16
962 $ math 0 1 and
963 0
964 $ math 0 1 or
965 1
966
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000967-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000968
John Beppu46a4e762000-01-18 22:33:11 +0000969=item mkdir
970
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000971Usage: mkdir [OPTION] DIRECTORY...
972
John Beppu4581b4c2000-01-19 15:04:41 +0000973Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000974
John Beppu4581b4c2000-01-19 15:04:41 +0000975Options:
976
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000977 -m set permission mode (as in chmod), not rwxrwxrwx - umask
978 -p no error if dir exists, make parent directories as needed
979
980Example:
981
982 $ mkdir /tmp/foo
983 $ mkdir /tmp/foo
984 /tmp/foo: File exists
985 $ mkdir /tmp/foo/bar/baz
986 /tmp/foo/bar/baz: No such file or directory
987 $ mkdir -p /tmp/foo/bar/baz
988
989-------------------------------
990
991=item mkfifo
992
Erik Andersen5e1189e2000-04-15 16:34:54 +0000993Usage: mkfifo [OPTIONS] name
994
995Creates a named pipe (identical to 'mknod name p')
996
997Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000998
Erik Andersen5e1189e2000-04-15 16:34:54 +0000999 -m create the pipe using the specified mode (default a=rw)
1000
1001-------------------------------
1002
1003=item mkfs.minix
1004
1005Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1006
1007Make a MINIX filesystem.
1008
1009OPTIONS:
1010
1011 -c Check the device for bad blocks
1012 -n [14|30] Specify the maximum length of filenames
1013 -i Specify the number of inodes for the filesystem
1014 -l FILENAME Read the bad blocks list from FILENAME
1015 -v Make a Minix version 2 filesystem
1016
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001017-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001018
John Beppu46a4e762000-01-18 22:33:11 +00001019=item mknod
1020
Erik Andersen5e1189e2000-04-15 16:34:54 +00001021Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001022
Erik Andersen5e1189e2000-04-15 16:34:54 +00001023Create a special file (block, character, or pipe).
1024
1025Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001026
Erik Andersen5e1189e2000-04-15 16:34:54 +00001027 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001028
1029TYPEs include:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001030 b: Make a block (buffered) device.
1031 c or u: Make a character (un-buffered) device.
1032 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001033
1034Example:
1035
1036 $ mknod /dev/fd0 b 2 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00001037 $ mknod -m 644 /tmp/pipe p
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001038
1039-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001040
John Beppu46a4e762000-01-18 22:33:11 +00001041=item mkswap
1042
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001043Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1044
John Beppu4581b4c2000-01-19 15:04:41 +00001045Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001046
John Beppu4581b4c2000-01-19 15:04:41 +00001047Options:
1048
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001049 -c Check for read-ability.
1050 -v0 Make version 0 swap [max 128 Megs].
1051 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1052 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001053
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001054-------------------------------
1055
Erik Andersen227a59b2000-04-25 23:24:55 +00001056=item mktemp
1057
Erik Andersene31c0662000-05-02 05:32:07 +00001058Usage: mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001059
1060Creates a temporary file with its name based on TEMPLATE.
1061TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1062
1063Example:
1064
1065 $ mktemp /tmp/temp.XXXXXX
1066 /tmp/temp.mWiLjM
1067 $ ls -la /tmp/temp.mWiLjM
1068 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1069
1070-------------------------------
1071
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001072=item mnc
1073
Erik Andersen5e1189e2000-04-15 16:34:54 +00001074Usage: mnc [IP] [port]
1075
1076mini-netcat opens a pipe to IP:port
1077
1078Example:
1079
1080 $ mnc foobar.somedomain.com 25
1081 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1082 help
1083 214-Commands supported:
1084 214- HELO EHLO MAIL RCPT DATA AUTH
1085 214 NOOP QUIT RSET HELP
1086 quit
1087 221 foobar closing connection
1088
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001089-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001090
John Beppu46a4e762000-01-18 22:33:11 +00001091=item more
1092
John Beppu4581b4c2000-01-19 15:04:41 +00001093Usage: more [file ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001094
1095More is a filter for paging through text one screenful at a time.
1096
1097Example:
1098
1099 $ dmesg | more
John Beppu50ed0672000-04-13 23:44:04 +00001100
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001101-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001102
John Beppu46a4e762000-01-18 22:33:11 +00001103=item mount
1104
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001105Usage: mount [flags]
1106 mount [flags] device directory [B<-o> options,more-options]
John Beppu4581b4c2000-01-19 15:04:41 +00001107
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001108Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001109
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001110 -a: Mount all file systems in fstab.
1111 -o option: One of many filesystem options, listed below.
1112 -r: Mount the filesystem read-only.
1113 -t filesystem-type: Specify the filesystem type.
1114 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001115
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001116Options for use with the "B<-o>" flag:
1117
1118 async / sync: Writes are asynchronous / synchronous.
1119 dev / nodev: Allow use of special device files / disallow them.
1120 exec / noexec: Allow use of executable files / disallow them.
1121 loop: Mounts a file via loop device.
1122 suid / nosuid: Allow set-user-id-root programs / disallow them.
1123 remount: Re-mount a currently-mounted filesystem, changing its flags.
1124 ro / rw: Mount for read-only / read-write.
1125 There are EVEN MORE flags that are specific to each filesystem.
1126 You'll have to see the written documentation for those.
1127
1128Example:
1129
1130 $ mount
1131 /dev/hda3 on / type minix (rw)
1132 proc on /proc type proc (rw)
1133 devpts on /dev/pts type devpts (rw)
1134 $ mount /dev/fd0 /mnt -t msdos -o ro
1135 $ mount /tmp/diskimage /opt -t ext2 -o loop
John Beppu50ed0672000-04-13 23:44:04 +00001136
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001137-------------------------------
1138
1139=item mt
1140
John Beppu9057b6a2000-04-16 10:22:28 +00001141Usage: mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001142
1143Control magnetic tape drive operation
1144
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001145-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001146
John Beppu46a4e762000-01-18 22:33:11 +00001147=item mv
1148
John Beppu4581b4c2000-01-19 15:04:41 +00001149Usage: mv SOURCE DEST
1150
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001151 or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001152
1153Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001154
1155Example:
1156
1157 $ mv /tmp/foo /bin/bar
John Beppu50ed0672000-04-13 23:44:04 +00001158
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001159-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001160
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001161=item nslookup
John Beppu46a4e762000-01-18 22:33:11 +00001162
Erik Andersen5e1189e2000-04-15 16:34:54 +00001163Usage: nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001164
Erik Andersen5e1189e2000-04-15 16:34:54 +00001165Queries the nameserver for the IP address of the given HOST
1166
1167Example:
1168
1169 $ nslookup localhost
1170 Server: default
1171 Address: default
1172
1173 Name: debian
1174 Address: 127.0.0.1
John Beppu46a4e762000-01-18 22:33:11 +00001175
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001176-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001177
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001178=item ping
1179
1180Usage: ping [OPTION]... host
1181
1182Send ICMP ECHO_REQUEST packets to network hosts.
1183
1184Options:
1185
1186 -c COUNT Send only COUNT pings.
1187 -q Quiet mode, only displays output at start
1188 and when finished.
1189Example:
1190
1191 $ ping localhost
1192 PING slag (127.0.0.1): 56 data bytes
1193 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1194
1195 --- debian ping statistics ---
1196 1 packets transmitted, 1 packets received, 0% packet loss
1197 round-trip min/avg/max = 20.1/20.1/20.1 ms
1198
1199-------------------------------
1200
Erik Andersen5e1189e2000-04-15 16:34:54 +00001201=item poweroff
1202
1203Shuts down the system, and requests that the kernel turn off power upon halting.
1204
1205-------------------------------
1206
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001207=item printf
1208
Erik Andersen5e1189e2000-04-15 16:34:54 +00001209Usage: printf format [argument...]
1210
1211Formats and prints the given data in a manner similar to the C printf command.
1212
1213Example:
1214
1215 $ printf "Val=%d\n" 5
1216 Val=5
1217
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001218-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001219
John Beppu46a4e762000-01-18 22:33:11 +00001220=item ps
1221
Erik Andersen5e1189e2000-04-15 16:34:54 +00001222Usage: ps
1223
1224Report process status
1225
1226This version of ps accepts no options.
1227
1228Example:
1229
1230 $ ps
1231 PID Uid Gid State Command
1232 1 root root S init
1233 2 root root S [kflushd]
1234 3 root root S [kupdate]
1235 4 root root S [kpiod]
1236 5 root root S [kswapd]
1237 742 andersen andersen S [bash]
1238 743 andersen andersen S -bash
1239 745 root root S [getty]
1240 2990 andersen andersen R ps
1241
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001242-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001243
John Beppu46a4e762000-01-18 22:33:11 +00001244=item pwd
1245
Erik Andersen5e1189e2000-04-15 16:34:54 +00001246Prints the full filename of the current working directory.
1247
1248Example:
1249
1250 $ pwd
1251 /root
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 reboot
1256
Erik Andersen5e1189e2000-04-15 16:34:54 +00001257Instructs the kernel to reboot the system.
1258
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001259-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001260
John Beppu46a4e762000-01-18 22:33:11 +00001261=item rm
1262
Erik Andersen5e1189e2000-04-15 16:34:54 +00001263Usage: rm [OPTION]... FILE...
1264
1265Remove (unlink) the FILE(s).
1266
1267Options:
1268
1269 -f remove existing destinations, never prompt
1270 -r or -R remove the contents of directories recursively
1271
1272Example:
1273
1274 $ rm -rf /tmp/foo
1275
1276-------------------------------
1277
1278=item rmdir
1279
1280Usage: rmdir [OPTION]... DIRECTORY...
1281
1282Remove the DIRECTORY(ies), if they are empty.
1283
1284Example:
1285
1286 # rmdir /tmp/foo
1287
1288-------------------------------
1289
1290=item rmmod
1291
1292Usage: rmmod [OPTION]... [MODULE]...
1293
1294Unloads the specified kernel modules from the kernel.
1295
1296Options:
1297
1298 -a Try to remove all unused kernel modules.
1299
1300Example:
1301
1302 $ rmmod tulip
1303
1304-------------------------------
1305
1306=item sed
1307
John Beppu9057b6a2000-04-16 10:22:28 +00001308Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001309
1310Allowed sed scripts come in the following form:
1311
1312 'ADDR [!] COMMAND'
1313
1314 where address ADDR can be:
1315 NUMBER Match specified line number
1316 $ Match last line
1317 /REGEXP/ Match specified regexp
1318 (! inverts the meaning of the match)
1319
1320 and COMMAND can be:
1321 s/regexp/replacement/[igp]
1322 which attempt to match regexp against the pattern space
1323 and if successful replaces the matched portion with replacement.
1324
1325 aTEXT
1326 which appends TEXT after the pattern space
1327
1328Options:
1329
1330 -e add the script to the commands to be executed
1331 -n suppress automatic printing of pattern space
1332
1333This version of sed matches full regular expresions.
1334
1335Example:
1336
1337 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1338 bar
1339
1340-------------------------------
1341
Erik Andersen4f3f7572000-04-28 00:18:56 +00001342=item setkeycodes
1343
1344Usage: setkeycodes SCANCODE KEYCODE ...
1345
1346Set entries into the kernel's scancode-to-keycode map,
1347allowing unusual keyboards to generate usable keycodes.
1348
1349SCANCODE may be either xx or e0xx (hexadecimal),
1350and KEYCODE is given in decimal
1351
1352Example:
1353
1354 # setkeycodes e030 127
1355
1356-------------------------------
1357
Erik Andersen5e1189e2000-04-15 16:34:54 +00001358=item sh
1359
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001360Usage: sh
1361
1362lash -- the BusyBox LAme SHell (command interpreter)
1363
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001364This command does not yet have proper documentation.
1365
1366Use lash just as you would use any other shell. It properly handles pipes,
1367redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1368has a sufficient set of builtins to do what is needed. It does not (yet)
1369support Bourne Shell syntax. If you need things like "if-then-else", "while",
1370and such, use ash or bash. If you just need a very simple and extremely small
1371shell, this will do the job.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001372
1373-------------------------------
1374
1375=item sfdisk
1376
1377Usage: sfdisk [options] device ...
1378
1379device: something like /dev/hda or /dev/sda
1380
1381useful options:
1382
1383 -s [or --show-size]: list size of a partition
1384 -c [or --id]: print or change partition Id
1385 -l [or --list]: list partitions of each device
1386 -d [or --dump]: idem, but in a format suitable for later input
1387 -i [or --increment]: number cylinders etc. from 1 instead of from 0
1388 -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB
1389 -T [or --list-types]:list the known partition types
1390 -D [or --DOS]: for DOS-compatibility: waste a little space
1391 -R [or --re-read]: make kernel reread partition table
1392 -N# : change only the partition with number #
1393 -n : do not actually write to disk
1394 -O file : save the sectors that will be overwritten to file
1395 -I file : restore these sectors again
1396 -v [or --version]: print version
1397 -? [or --help]: print this message
1398
1399dangerous options:
1400
1401 -g [or --show-geometry]: print the kernel's idea of the geometry
1402 -x [or --show-extended]: also list extended partitions on output
1403
1404 or expect descriptors for them on input
1405 -L [or --Linux]: do not complain about things irrelevant for Linux
1406 -q [or --quiet]: suppress warning messages
1407 You can override the detected geometry using:
1408 -C# [or --cylinders #]:set the number of cylinders to use
1409 -H# [or --heads #]: set the number of heads to use
1410 -S# [or --sectors #]: set the number of sectors to use
1411
1412You can disable all consistency checking with:
1413
1414 -f [or --force]: do what I say, even if it is stupid
1415
1416-------------------------------
1417
1418=item sleep
1419
1420Usage: sleep N
1421
1422Pause for N seconds.
1423
1424Example:
1425
1426 $ sleep 2
1427 [2 second delay results]
1428
1429-------------------------------
1430
1431=item sort
1432
John Beppu9057b6a2000-04-16 10:22:28 +00001433Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001434
1435Sorts lines of text in the specified files
1436
1437Example:
1438
1439 $ echo -e "e\nf\nb\nd\nc\na" | sort
1440 a
1441 b
1442 c
1443 d
1444 e
1445 f
1446
1447-------------------------------
1448
1449=item sync
1450
1451Usage: sync
1452
1453Write all buffered filesystem blocks to disk.
1454
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001455-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001456
John Beppu46a4e762000-01-18 22:33:11 +00001457=item syslogd
1458
Erik Andersen5e1189e2000-04-15 16:34:54 +00001459Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001460
Erik Andersen5e1189e2000-04-15 16:34:54 +00001461Linux system and kernel (provides klogd) logging utility.
1462Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001463
Erik Andersen5e1189e2000-04-15 16:34:54 +00001464Options:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001465
Erik Andersen5e1189e2000-04-15 16:34:54 +00001466 -m Change the mark timestamp interval. default=20min. 0=off
1467 -n Do not fork into the background (for when run by init)
1468 -K Do not start up the klogd process (by default syslogd spawns klogd).
1469 -O Specify an alternate log file. default=/var/log/messages
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001470
1471-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001472
John Beppu46a4e762000-01-18 22:33:11 +00001473=item swapon
1474
Erik Andersen5e1189e2000-04-15 16:34:54 +00001475Usage: swapon [OPTION] [device]
1476
1477Start swapping virtual memory pages on the given device.
1478
1479Options:
1480
1481 -a Start swapping on all swap devices
1482
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001483-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001484
John Beppu46a4e762000-01-18 22:33:11 +00001485=item swapoff
1486
Erik Andersen5e1189e2000-04-15 16:34:54 +00001487Usage: swapoff [OPTION] [device]
1488
1489Stop swapping virtual memory pages on the given device.
1490
1491Options:
1492
1493 -a Stop swapping on all swap devices
1494
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001495-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001496
John Beppu46a4e762000-01-18 22:33:11 +00001497=item tail
1498
Erik Andersen5e1189e2000-04-15 16:34:54 +00001499Usage: tail [OPTION] [FILE]...
1500
1501Print last 10 lines of each FILE to standard output.
1502With more than one FILE, precede each with a header giving the
1503file name. With no FILE, or when FILE is -, read standard input.
1504
1505Options:
1506
1507 -n NUM Print last NUM lines instead of first 10
1508 -f Output data as the file grows. This version
1509 of 'tail -f' supports only one file at a time.
1510
1511Example:
1512
1513 $ tail -n 1 /etc/resolv.conf
1514 nameserver 10.0.0.1
1515
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001516-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001517
John Beppu46a4e762000-01-18 22:33:11 +00001518=item tar
1519
John Beppu9057b6a2000-04-16 10:22:28 +00001520Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001521
1522Create, extract, or list files from a tar file. Note that
1523this version of tar treats hard links as separate files.
1524
1525Main operation mode:
1526
1527 c create
1528 x extract
1529 t list
1530
1531File selection:
1532
1533 f name of tarfile or "-" for stdin
1534 O extract to stdout
1535 --exclude file to exclude
1536
1537Informative output:
1538
1539 v verbosely list files processed
1540
1541Example:
1542
1543 $ zcat /tmp/tarball.tar.gz | tar -xf -
1544 $ tar -cf /tmp/tarball.tar /usr/local
1545
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001546-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001547
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001548=item test, [
1549
Erik Andersen5e1189e2000-04-15 16:34:54 +00001550Usage: test EXPRESSION
1551or [ EXPRESSION ]
1552
1553Checks file types and compares values returning an exit
1554code determined by the value of EXPRESSION.
1555
1556Example:
1557
1558 $ test 1 -eq 2
1559 $ echo $?
1560 1
1561 $ test 1 -eq 1
1562 $ echo $?
1563 0
1564 $ [ -d /etc ]
1565 $ echo $?
1566 0
1567 $ [ -d /junk ]
1568 $ echo $?
1569 1
1570
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001571-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001572
John Beppu46a4e762000-01-18 22:33:11 +00001573=item tee
1574
Erik Andersen5e1189e2000-04-15 16:34:54 +00001575Usage: tee [OPTION]... [FILE]...
1576
1577Copy standard input to each FILE, and also to standard output.
1578
1579Options:
1580
1581 -a append to the given FILEs, do not overwrite
1582
1583Example:
1584
1585 $ echo "Hello" | tee /tmp/foo
1586 $ cat /tmp/foo
1587 Hello
1588
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001589-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001590
John Beppu46a4e762000-01-18 22:33:11 +00001591=item touch
1592
John Beppu9057b6a2000-04-16 10:22:28 +00001593Usage: touch [B<-c>] file [file ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001594
1595Update the last-modified date on (or create) the selected file[s].
1596
1597Example:
1598
1599 $ ls -l /tmp/foo
1600 /bin/ls: /tmp/foo: No such file or directory
1601 $ touch /tmp/foo
1602 $ ls -l /tmp/foo
1603 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1604
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001605-------------------------------
1606
1607=item tr
Erik Andersen3c1217c2000-05-01 22:34:24 +00001608Usage: tr [-cds] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001609
Erik Andersen3c1217c2000-05-01 22:34:24 +00001610Translate, squeeze, and/or delete characters from
1611standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001612
Erik Andersen3c1217c2000-05-01 22:34:24 +00001613Options:
1614
1615 -c take complement of STRING1
1616 -d delete input characters coded STRING1
1617 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00001618
1619Example:
1620
1621 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1622 hello world
1623
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001624-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001625
John Beppu46a4e762000-01-18 22:33:11 +00001626=item true
1627
Erik Andersen5e1189e2000-04-15 16:34:54 +00001628Returns an exit code of TRUE (0)
1629
1630Example:
1631
1632 $ true
1633 $ echo $?
1634 0
1635
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001636-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001637
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001638=item tty
John Beppu4581b4c2000-01-19 15:04:41 +00001639
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001640Usage: tty
1641
1642Print the file name of the terminal connected to standard input.
1643
1644Options:
1645
1646 -s print nothing, only return an exit status
1647
1648Example:
1649
1650 $ tty
1651 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00001652
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001653-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001654
John Beppu46a4e762000-01-18 22:33:11 +00001655=item umount
1656
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001657Usage: umount [flags] filesystem|directory
1658
1659Flags:
1660
1661 -a: Unmount all file systems
1662 -r: Try to remount devices as read-only if mount is busy
1663 -f: Do not free loop device (if a loop device has been used)
1664
1665Example:
1666
1667 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001668
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001669-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001670
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001671=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001672
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001673Usage: uname [OPTION]...
1674
Erik Andersen26702fe2000-04-17 16:44:46 +00001675Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001676
1677Options:
1678
1679 -a print all information
1680 -m the machine (hardware) type
1681 -n print the machine's network node hostname
1682 -r print the operating system release
1683 -s print the operating system name
1684 -p print the host processor type
1685 -v print the operating system version
1686
1687Example:
1688
1689 $ uname -a
1690 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001691
1692-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001693
John Beppu46a4e762000-01-18 22:33:11 +00001694=item uniq
1695
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001696Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1697
1698Discard all but one of successive identical lines from INPUT
1699(or standard input), writing to OUTPUT (or standard output).
1700
1701Example:
1702
1703 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1704 a
1705 b
1706 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001707
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001708-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001709
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001710=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001711
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001712Usage: update [options]
1713
1714Periodically flushes filesystem buffers.
1715
1716Options:
1717
1718 -S force use of sync(2) instead of flushing
1719 -s SECS call sync this often (default 30)
1720 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001721
1722-------------------------------
1723
1724=item uptime
1725
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001726Usage: uptime
1727
1728Tells how long the system has been running since boot.
1729
1730Example:
1731
1732 $ uptime
1733 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001734
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001735-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001736
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001737=item usleep
1738
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001739Usage: usleep N
1740
1741Pauses for N microseconds.
1742
1743Example:
1744
1745 $ usleep 1000000
1746 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001747
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001748-------------------------------
1749
1750=item wc
1751
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001752Usage: wc [OPTION]... [FILE]...
1753
1754Print line, word, and byte counts for each FILE, and a total line if
1755more than one FILE is specified. With no FILE, read standard input.
1756
1757Options:
1758
1759 -c print the byte counts
1760 -l print the newline counts
1761 -L print the length of the longest line
1762 -w print the word counts
1763
1764Example:
1765
1766 $ wc /etc/passwd
1767 31 46 1365 /etc/passwd
Erik Andersen5e1189e2000-04-15 16:34:54 +00001768
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001769-------------------------------
1770
1771=item whoami
1772
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001773Usage: whoami
1774
1775Prints the user name associated with the current effective user id.
1776
1777Example:
1778
1779 $ whoami
1780 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00001781
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001782-------------------------------
1783
1784=item yes
1785
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001786Usage: yes [OPTION]... [STRING]...
1787
1788Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001789
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001790-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00001791
1792=item zcat
1793
Erik Andersen26702fe2000-04-17 16:44:46 +00001794This is essentially an alias for invoking "gunzip B<-c>", where
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001795it decompresses the file inquestion and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001796
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001797-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001798
John Beppu46a4e762000-01-18 22:33:11 +00001799=back
John Beppu3a1b6be2000-01-18 15:45:59 +00001800
1801=head1 SEE ALSO
1802
1803textutils(1), shellutils(1), etc...
1804
1805=head1 MAINTAINER
1806
Erik Andersen1101d232000-04-19 05:15:12 +00001807Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001808
1809=head1 AUTHORS
1810
John Beppu08fe43d2000-01-19 12:39:16 +00001811The following people have contributed code to BusyBox whether
1812they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00001813
Erik Andersen1101d232000-04-19 05:15:12 +00001814Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001815
John Beppu08fe43d2000-01-19 12:39:16 +00001816=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001817
John Beppu08fe43d2000-01-19 12:39:16 +00001818John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001819
John Beppu08fe43d2000-01-19 12:39:16 +00001820=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001821
John Beppu08fe43d2000-01-19 12:39:16 +00001822Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001823
John Beppu08fe43d2000-01-19 12:39:16 +00001824=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001825
John Beppu08fe43d2000-01-19 12:39:16 +00001826Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001827
John Beppu08fe43d2000-01-19 12:39:16 +00001828=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001829
John Beppu08fe43d2000-01-19 12:39:16 +00001830Dave Cinege <dcinege@psychosis.com>
1831
1832=for html <br>
1833
John Beppu50ed0672000-04-13 23:44:04 +00001834Karl M. Hegbloom <karlheg@debian.org>
1835
1836=for html <br>
1837
John Beppu4fd10fc2000-04-17 05:13:59 +00001838John Lombardo <john@deltanet.com>
1839
1840=for html <br>
1841
John Beppu08fe43d2000-01-19 12:39:16 +00001842Bruce Perens <bruce@perens.com>
1843
1844=for html <br>
1845
1846Linus Torvalds <torvalds@transmeta.com>
1847
1848=for html <br>
1849
1850Charles P. Wright <cpwright@villagenet.com>
1851
1852=for html <br>
1853
1854Enrique Zanardi <ezanardi@ull.es>
1855
1856=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00001857
1858=cut
John Beppu08fe43d2000-01-19 12:39:16 +00001859
Erik Andersene31c0662000-05-02 05:32:07 +00001860# $Id: busybox.pod,v 1.26 2000/05/02 05:32:07 erik Exp $