blob: ac492ab1560aefc82b3e394bcfc080367aa682e9 [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
Erik Andersena19bc642000-05-02 06:40:02 +000068-------------------------------
69
John Beppu46a4e762000-01-18 22:33:11 +000070=over 4
71
Erik Andersen62dc17a2000-04-13 01:18:23 +000072=item basename
73
74Usage: basename [file ...]
75
Erik Andersencf8d38a2000-04-21 01:23:36 +000076Strips directory path and suffixes from FILE(s).
Erik Andersen62dc17a2000-04-13 01:18:23 +000077
78Example:
79
80 $ basename /usr/local/bin/foo
81 foo
82 $ basename /usr/local/bin/
83 bin
84
Erik Andersen9cf3bfa2000-04-13 18:49:43 +000085-------------------------------
86
Erik Andersena6c75222000-04-18 00:00:52 +000087=item cat
John Beppu46a4e762000-01-18 22:33:11 +000088
Erik Andersencf8d38a2000-04-21 01:23:36 +000089Usage: cat [FILE ...]
Erik Andersen62dc17a2000-04-13 01:18:23 +000090
Erik Andersencf8d38a2000-04-21 01:23:36 +000091Concatenates FILE(s) and prints them to the standard output.
Erik Andersen62dc17a2000-04-13 01:18:23 +000092
93Example:
94
95 $ cat /proc/uptime
96 110716.72 17.67
John Beppu4581b4c2000-01-19 15:04:41 +000097
Erik Andersen9cf3bfa2000-04-13 18:49:43 +000098-------------------------------
99
Erik Andersen5e1189e2000-04-15 16:34:54 +0000100=item chgrp
101
102Usage: chgrp [OPTION]... GROUP FILE...
103
104Change the group membership of each FILE to GROUP.
Erik Andersen26702fe2000-04-17 16:44:46 +0000105
Erik Andersen5e1189e2000-04-15 16:34:54 +0000106Options:
107
108 -R change files and directories recursively
Erik Andersen26702fe2000-04-17 16:44:46 +0000109
Erik Andersen5e1189e2000-04-15 16:34:54 +0000110Example:
111
112 $ ls -l /tmp/foo
113 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
114 $ chgrp root /tmp/foo
115 $ ls -l /tmp/foo
116 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
117
118-------------------------------
119
John Beppu46a4e762000-01-18 22:33:11 +0000120=item chmod
121
John Beppuf17792c2000-04-13 03:16:01 +0000122Usage: chmod [B<-R>] MODE[,MODE]... FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000123
Erik Andersencf8d38a2000-04-21 01:23:36 +0000124Changes file access permissions for the specified FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000125Each MODE is defined by combining the letters for WHO has access to the file,
126an OPERATOR for selecting how the permissions should be changed, and a
Erik Andersencf8d38a2000-04-21 01:23:36 +0000127PERISSION for FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000128
Erik Andersencf8d38a2000-04-21 01:23:36 +0000129WHO may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000130
Erik Andersencf8d38a2000-04-21 01:23:36 +0000131 u User who owns the file
132 g Users in the file's Group
Erik Andersen62dc17a2000-04-13 01:18:23 +0000133 o Other users not in the file's group
134 a All users
135
Erik Andersencf8d38a2000-04-21 01:23:36 +0000136OPERATOR may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000137
Erik Andersencf8d38a2000-04-21 01:23:36 +0000138 + Add a permission
139 - Remove a permission
140 = Assign a permission
Erik Andersen62dc17a2000-04-13 01:18:23 +0000141
Erik Andersencf8d38a2000-04-21 01:23:36 +0000142PERMISSION may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000143
Erik Andersencf8d38a2000-04-21 01:23:36 +0000144 r Read
Erik Andersen62dc17a2000-04-13 01:18:23 +0000145 w Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000146 x Execute (or access for directories)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000147 s Set user (or group) ID bit
Erik Andersencf8d38a2000-04-21 01:23:36 +0000148 t Stickey bit (for directories prevents removing files by non-owners)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000149
Erik Andersencf8d38a2000-04-21 01:23:36 +0000150Alternately, permissions can be set numerically where the first three
151numbers are calculated by adding the octal values, such as
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000152
Erik Andersen62dc17a2000-04-13 01:18:23 +0000153 4 Read
154 2 Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000155 1 Execute
Erik Andersen62dc17a2000-04-13 01:18:23 +0000156
Erik Andersencf8d38a2000-04-21 01:23:36 +0000157An optional fourth digit can also be used to specify
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000158
Erik Andersen62dc17a2000-04-13 01:18:23 +0000159 4 Set user ID
160 2 Set group ID
Erik Andersencf8d38a2000-04-21 01:23:36 +0000161 1 Stickey bit
Erik Andersen62dc17a2000-04-13 01:18:23 +0000162
John Beppu4581b4c2000-01-19 15:04:41 +0000163Options:
164
Erik Andersencf8d38a2000-04-21 01:23:36 +0000165 -R Change files and directories recursively.
John Beppu4581b4c2000-01-19 15:04:41 +0000166
Erik Andersen62dc17a2000-04-13 01:18:23 +0000167Example:
168
169 $ ls -l /tmp/foo
170 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
171 $ chmod u+x /tmp/foo
172 $ ls -l /tmp/foo
173 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
174 $ chmod 444 /tmp/foo
175 $ ls -l /tmp/foo
176 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000177
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000178-------------------------------
179
John Beppu46a4e762000-01-18 22:33:11 +0000180=item chown
181
Erik Andersencf8d38a2000-04-21 01:23:36 +0000182Usage: chown [OPTION]... OWNER[<.|:>[GROUP] FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000183
Erik Andersen62dc17a2000-04-13 01:18:23 +0000184Changes the owner and/or group of each FILE to OWNER and/or GROUP.
John Beppu5a50def2000-04-17 17:46:46 +0000185
John Beppu4581b4c2000-01-19 15:04:41 +0000186Options:
187
Erik Andersencf8d38a2000-04-21 01:23:36 +0000188 -R Changes files and directories recursively
Erik Andersen62dc17a2000-04-13 01:18:23 +0000189
190Example:
191
192 $ ls -l /tmp/foo
193 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
194 $ chown root /tmp/foo
195 $ ls -l /tmp/foo
196 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
197 $ chown root.root /tmp/foo
198 ls -l /tmp/foo
199 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000200
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000201-------------------------------
202
John Beppu46a4e762000-01-18 22:33:11 +0000203=item chroot
204
John Beppu4581b4c2000-01-19 15:04:41 +0000205Usage: chroot NEWROOT [COMMAND...]
206
207Run COMMAND with root directory set to NEWROOT.
208
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000209Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000210
211 $ ls -l /bin/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000212 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox
Erik Andersen62dc17a2000-04-13 01:18:23 +0000213 $ mount /dev/hdc1 /mnt -t minix
214 $ chroot /mnt
215 $ ls -l /bin/ls
216 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
John Beppu4581b4c2000-01-19 15:04:41 +0000217
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000218-------------------------------
219
John Beppu46a4e762000-01-18 22:33:11 +0000220=item clear
221
Erik Andersen62dc17a2000-04-13 01:18:23 +0000222Clears the screen.
John Beppu4581b4c2000-01-19 15:04:41 +0000223
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000224-------------------------------
225
John Beppu46a4e762000-01-18 22:33:11 +0000226=item chvt
227
John Beppu4581b4c2000-01-19 15:04:41 +0000228Usage: chvt N
229
Erik Andersencf8d38a2000-04-21 01:23:36 +0000230Changes the foreground virtual terminal to /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000231
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000232-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000233
John Beppu46a4e762000-01-18 22:33:11 +0000234=item cp
235
John Beppu4581b4c2000-01-19 15:04:41 +0000236Usage: cp [OPTION]... SOURCE DEST
237
Erik Andersen62dc17a2000-04-13 01:18:23 +0000238 or: cp [OPTION]... SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +0000239
Erik Andersencf8d38a2000-04-21 01:23:36 +0000240Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
John Beppu4581b4c2000-01-19 15:04:41 +0000241
Erik Andersene31c0662000-05-02 05:32:07 +0000242Options:
243
Erik Andersencf8d38a2000-04-21 01:23:36 +0000244 -a Same as -dpR
245 -d Preserves links
246 -p Preserves file attributes if possable
247 -R Copies directories recursively
John Beppu4581b4c2000-01-19 15:04:41 +0000248
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000249-------------------------------
250
John Beppu46a4e762000-01-18 22:33:11 +0000251=item date
252
Erik Andersen62dc17a2000-04-13 01:18:23 +0000253Usage: date [OPTION]... [+FORMAT]
John Beppu4581b4c2000-01-19 15:04:41 +0000254
Erik Andersen62dc17a2000-04-13 01:18:23 +0000255 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
256
Erik Andersencf8d38a2000-04-21 01:23:36 +0000257Displays the current time in the given FORMAT, or sets the system date.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000258
259Options:
Erik Andersene31c0662000-05-02 05:32:07 +0000260
Erik Andersencf8d38a2000-04-21 01:23:36 +0000261 -R Outputs RFC-822 compliant date string
262 -s Sets time described by STRING
263 -u Prints or sets Coordinated Universal Time
Erik Andersen62dc17a2000-04-13 01:18:23 +0000264
265Example:
John Beppuf17792c2000-04-13 03:16:01 +0000266
Erik Andersen62dc17a2000-04-13 01:18:23 +0000267 $ date
268 Wed Apr 12 18:52:41 MDT 2000
John Beppu4581b4c2000-01-19 15:04:41 +0000269
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000270-------------------------------
271
John Beppu46a4e762000-01-18 22:33:11 +0000272=item dd
273
Erik Andersen62dc17a2000-04-13 01:18:23 +0000274Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
John Beppu4581b4c2000-01-19 15:04:41 +0000275
276Copy a file, converting and formatting according to options
277
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000278 if=FILE read from FILE instead of stdin
279 of=FILE write to FILE instead of stdout
280 bs=n read and write n bytes at a time
281 count=n copy only n input blocks
282 skip=n skip n input blocks
283 seek=n skip n output blocks
Erik Andersen62dc17a2000-04-13 01:18:23 +0000284
285Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
John Beppu4581b4c2000-01-19 15:04:41 +0000286
Erik Andersen62dc17a2000-04-13 01:18:23 +0000287Example:
288
289 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
290 4+0 records in
291 4+0 records out
292
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000293-------------------------------
294
John Beppu46a4e762000-01-18 22:33:11 +0000295=item df
296
Erik Andersen62dc17a2000-04-13 01:18:23 +0000297Usage: df [filesystem ...]
298
299Prints the filesystem space used and space available.
300
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000301Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000302
303 $ df
304 Filesystem 1k-blocks Used Available Use% Mounted on
305 /dev/sda3 8690864 8553540 137324 98% /
306 /dev/sda1 64216 36364 27852 57% /boot
307 $ df /dev/sda3
308 Filesystem 1k-blocks Used Available Use% Mounted on
309 /dev/sda3 8690864 8553540 137324 98% /
John Beppu4581b4c2000-01-19 15:04:41 +0000310
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000311-------------------------------
312
313=item dirname
314
315Usage: dirname NAME
316
317Strip non-directory suffix from file name
318
319Example:
320
321 $ dirname /tmp/foo
322 /tmp
323 $ dirname /tmp/foo/
324 /tmp
325
326-------------------------------
327
John Beppu46a4e762000-01-18 22:33:11 +0000328=item dmesg
329
John Beppuf17792c2000-04-13 03:16:01 +0000330Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
John Beppu4581b4c2000-01-19 15:04:41 +0000331
Erik Andersen62dc17a2000-04-13 01:18:23 +0000332Print or controls the kernel ring buffer.
John Beppu4581b4c2000-01-19 15:04:41 +0000333
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000334-------------------------------
335
John Beppu46a4e762000-01-18 22:33:11 +0000336=item du
337
Erik Andersen62dc17a2000-04-13 01:18:23 +0000338Usage: du [OPTION]... [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000339
Erik Andersen62dc17a2000-04-13 01:18:23 +0000340Summarize disk space used for each FILE and/or directory.
341Disk space is printed in units of 1k (i.e. 1024 bytes).
342
343Options:
John Beppuf17792c2000-04-13 03:16:01 +0000344
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000345 -l count sizes many times if hard linked
346 -s display only a total for each argument
Erik Andersen62dc17a2000-04-13 01:18:23 +0000347
348Example:
349
Erik Andersencf8d38a2000-04-21 01:23:36 +0000350 $ ./BusyBox du
Erik Andersen62dc17a2000-04-13 01:18:23 +0000351 16 ./CVS
352 12 ./kernel-patches/CVS
353 80 ./kernel-patches
354 12 ./tests/CVS
355 36 ./tests
356 12 ./scripts/CVS
357 16 ./scripts
358 12 ./docs/CVS
359 104 ./docs
360 2417 .
361
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000362-------------------------------
363
364=item dutmp
365
366Usage: dutmp [FILE]
367
368Dump utmp file format (pipe delimited) from FILE
369or stdin to stdout.
370
371Example:
372
373 $ dutmp /var/run/utmp
374 8|7||si|||0|0|0|955637625|760097|0
375 2|0|~|~~|reboot||0|0|0|955637625|782235|0
376 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
377 8|125||l4|||0|0|0|955637629|998367|0
378 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
379 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
380 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
381
382-------------------------------
383
384=item echo
385
386Usage: echo [-neE] [ARG ...]
387
388Prints the specified ARGs to stdout
389
390Options:
391
392 -n suppress trailing newline
393 -e interpret backslash-escaped characters (i.e. \t=tab etc)
394 -E disable interpretation of backslash-escaped characters
395
396Example:
397
398 $ echo "Erik is cool"
399 Erik is cool
400 $ echo -e "Erik\nis\ncool"
401 Erik
402 is
403 cool
404 $ echo "Erik\nis\ncool"
405 Erik\nis\ncool
406
407-------------------------------
408
409=item false
410
Erik Andersen5e1189e2000-04-15 16:34:54 +0000411Returns an exit code of FALSE (1)
412
413Example:
414
415 $ false
416 $ echo $?
417 1
418
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000419-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000420
John Beppu46a4e762000-01-18 22:33:11 +0000421=item fbset
422
John Beppu4581b4c2000-01-19 15:04:41 +0000423Usage: fbset [options] [mode]
424
Erik Andersen62dc17a2000-04-13 01:18:23 +0000425Show and modify frame buffer device settings
426
John Beppu4581b4c2000-01-19 15:04:41 +0000427Options:
428
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000429 -h
430 -fb
431 -db
432 -a
433 -i
434 -g
435 -t
436 -accel
437 -hsync
438 -vsync
439 -laced
440 -double
John Beppu4581b4c2000-01-19 15:04:41 +0000441
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000442Example:
443
444 $ fbset
445 mode "1024x768-76"
446 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
447 geometry 1024 768 1024 768 16
448 timings 12714 128 32 16 4 128 4
449 accel false
450 rgba 5/11,6/5,5/0,0/0
451 endmode
452
453-------------------------------
454
455=item fdflush
456
457Usage: fdflush device
458
459Force floppy disk drive to detect disk change
460
461-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000462
John Beppu46a4e762000-01-18 22:33:11 +0000463=item find
464
John Beppu4581b4c2000-01-19 15:04:41 +0000465Usage: find [PATH...] [EXPRESSION]
466
467Search for files in a directory hierarchy. The default PATH is
468the current directory; default EXPRESSION is '-print'
469
John Beppu4581b4c2000-01-19 15:04:41 +0000470
Erik Andersen62dc17a2000-04-13 01:18:23 +0000471EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000472
473 -follow Dereference symbolic links.
474 -name PATTERN File name (leading directories removed) matches PATTERN.
475 -print print the full file name followed by a newline to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000476
477Example:
478
479 $ find / -name /etc/passwd
480 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000481
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000482-------------------------------
483
John Beppu46a4e762000-01-18 22:33:11 +0000484=item free
485
John Beppu4581b4c2000-01-19 15:04:41 +0000486Usage: free
487
Erik Andersen62dc17a2000-04-13 01:18:23 +0000488Displays the amount of free and used memory in the system.
489
490Example:
491
492 $ free
Erik Andersen5e1189e2000-04-15 16:34:54 +0000493 total used free shared buffers
Erik Andersen62dc17a2000-04-13 01:18:23 +0000494 Mem: 257628 248724 8904 59644 93124
495 Swap: 128516 8404 120112
496 Total: 386144 257128 129016
497
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000498-------------------------------
499
500=item freeramdisk
501
502Usage: freeramdisk DEVICE
503
504Free all memory used by the specified ramdisk.
505
506Example:
507
508 $ freeramdisk /dev/ram2
509
510-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000511
John Beppu46a4e762000-01-18 22:33:11 +0000512=item deallocvt
513
John Beppu4581b4c2000-01-19 15:04:41 +0000514Usage: deallocvt N
515
Erik Andersen62dc17a2000-04-13 01:18:23 +0000516Deallocates unused virtual terminal /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000517
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000518-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000519
John Beppu46a4e762000-01-18 22:33:11 +0000520=item fsck.minix
521
John Beppuf17792c2000-04-13 03:16:01 +0000522Usage: fsck.minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000523
524Performs a consistency check for MINIX filesystems.
525
Erik Andersen62dc17a2000-04-13 01:18:23 +0000526OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000527
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000528 -l Lists all filenames
529 -r Perform interactive repairs
530 -a Perform automatic repairs
531 -v verbose
532 -s Outputs super-block information
533 -m Activates MINIX-like "mode not cleared" warnings
534 -f Force file system check.
535
536-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000537
John Beppu46a4e762000-01-18 22:33:11 +0000538=item grep
539
Erik Andersen62dc17a2000-04-13 01:18:23 +0000540Usage: grep [OPTIONS]... PATTERN [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000541
Erik Andersen62dc17a2000-04-13 01:18:23 +0000542Search for PATTERN in each FILE or standard input.
543
544OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000545
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000546 -h suppress the prefixing filename on output
547 -i ignore case distinctions
548 -n print line number with output lines
549 -q be quiet. Returns 0 if result was found, 1 otherwise
Erik Andersena19bc642000-05-02 06:40:02 +0000550 -v select non-matching lines
Erik Andersen62dc17a2000-04-13 01:18:23 +0000551
552This version of grep matches full regular expresions.
553
Erik Andersen62dc17a2000-04-13 01:18:23 +0000554Example:
555
556 $ grep root /etc/passwd
557 root:x:0:0:root:/root:/bin/bash
558 $ grep ^[rR]oo. /etc/passwd
559 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000560
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000561-------------------------------
562
563=item gunzip
564
Erik Andersen5e1189e2000-04-15 16:34:54 +0000565Usage: gunzip [OPTION]... FILE
566
567Uncompress FILE (or standard input if FILE is '-').
568
569Options:
570
571 -c Write output to standard output
572 -t Test compressed file integrity
573
574Example:
575
Erik Andersencf8d38a2000-04-21 01:23:36 +0000576 $ ls -la /tmp/BusyBox*
577 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
578 $ gunzip /tmp/BusyBox-0.43.tar.gz
579 $ ls -la /tmp/BusyBox*
580 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000581
582-------------------------------
583
584=item gzip
585
Erik Andersen5e1189e2000-04-15 16:34:54 +0000586Usage: gzip [OPTION]... FILE
587
588Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000589When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000590
591Options:
592
593 -c Write output to standard output instead of FILE.gz
594
595Example:
596
Erik Andersencf8d38a2000-04-21 01:23:36 +0000597 $ ls -la /tmp/BusyBox*
598 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
599 $ gzip /tmp/BusyBox-0.43.tar
600 $ ls -la /tmp/BusyBox*
601 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen5e1189e2000-04-15 16:34:54 +0000602
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000603
604-------------------------------
605
606=item halt
607
Erik Andersen5e1189e2000-04-15 16:34:54 +0000608Usage: halt
609
610This comand halts the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000611
612-------------------------------
613
John Beppu46a4e762000-01-18 22:33:11 +0000614=item head
615
Erik Andersen62dc17a2000-04-13 01:18:23 +0000616Usage: head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000617
618Print first 10 lines of each FILE to standard output.
619With more than one FILE, precede each with a header giving the
620file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000621
622Options:
John Beppuf17792c2000-04-13 03:16:01 +0000623
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000624 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000625
626Example:
627
628 $ head -n 2 /etc/passwd
629 root:x:0:0:root:/root:/bin/bash
630 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000631
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000632-------------------------------
633
634=item hostid
635
Erik Andersen5e1189e2000-04-15 16:34:54 +0000636Usage: hostid
637
638Prints out a unique 32-bit identifier for the current
639machine. The 32-bit identifier is intended to be unique
640among all UNIX systems in existence.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000641
642-------------------------------
643
John Beppu46a4e762000-01-18 22:33:11 +0000644=item hostname
645
John Beppuf17792c2000-04-13 03:16:01 +0000646Usage: hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000647
John Beppu4581b4c2000-01-19 15:04:41 +0000648Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000649(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000650
Erik Andersen62dc17a2000-04-13 01:18:23 +0000651Options:
John Beppuf17792c2000-04-13 03:16:01 +0000652
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000653 -s Short
654 -i Addresses for the hostname
655 -d DNS domain name
656 -F FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000657
658Example:
659
660 $ hostname
661 slag
John Beppu46a4e762000-01-18 22:33:11 +0000662
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000663-------------------------------
664
665=item init
666
Erik Andersen5e1189e2000-04-15 16:34:54 +0000667Usage: init
668
669Init is the parent of all processes.
670
671This version of init is designed to be run only by the kernel.
672
673BusyBox init doesn't support multiple runlevels. The runlevels field of
674the /etc/inittab file is completely ignored by BusyBox init. If you want
675runlevels, use sysvinit.
676
677BusyBox init works just fine without an inittab. If no inittab is found,
678it has the following default behavior:
679
680 ::sysinit:/etc/init.d/rcS
681 ::askfirst:/bin/sh
682
683if it detects that /dev/console is _not_ a serial console, it will also run:
684
685 tty2::askfirst:/bin/sh
686
687If you choose to use an /etc/inittab file, the inittab entry format is as follows:
688
689 <id>:<runlevels>:<action>:<process>
690
691 <id>:
692
693 WARNING: This field has a non-traditional meaning for BusyBox init!
694 The id field is used by BusyBox init to specify the controlling tty for
695 the specified process to run on. The contents of this field are
696 appended to "/dev/" and used as-is. There is no need for this field to
697 be unique, although if it isn't you may have strange results. If this
698 field is left blank, it is completely ignored. Also note that if
699 BusyBox detects that a serial console is in use, then all entries
700 containing non-empty id fields will _not_ be run. BusyBox init does
701 nothing with utmp. We don't need no stinkin' utmp.
702
703 <runlevels>:
704
705 The runlevels field is completely ignored.
706
707 <action>:
708
709 Valid actions include: sysinit, respawn, askfirst, wait,
710 once, and ctrlaltdel.
711
712 askfirst acts just like respawn, but before running the specified
713 process it displays the line "Please press Enter to activate this
714 console." and then waits for the user to press enter before starting
715 the specified process.
716
717 Unrecognised actions (like initdefault) will cause init to emit
718 an error message, and then go along with its business.
719
720 <process>:
721
722 Specifies the process to be executed and it's command line.
723
724
725Example /etc/inittab file:
726
727 # This is run first except when booting in single-user mode.
728 #
729 ::sysinit:/etc/init.d/rcS
730
731 # /bin/sh invocations on selected ttys
732 #
733 # Start an "askfirst" shell on the console (whatever that may be)
734 ::askfirst:/bin/sh
735 # Start an "askfirst" shell on /dev/tty2
736 tty2::askfirst:/bin/sh
737
738 # /sbin/getty invocations for selected ttys
739 #
740 tty4::respawn:/sbin/getty 38400 tty4
741 tty5::respawn:/sbin/getty 38400 tty5
742
743
744 # Example of how to put a getty on a serial line (for a terminal)
745 #
746 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
747 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
748 #
749 # Example how to put a getty on a modem line.
750 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
751
752 # Stuff to do before rebooting
753 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
754 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000755
756-------------------------------
757
John Beppu46a4e762000-01-18 22:33:11 +0000758=item kill
759
John Beppuf17792c2000-04-13 03:16:01 +0000760Usage: kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000761
Erik Andersen62dc17a2000-04-13 01:18:23 +0000762Send a signal (default is SIGTERM) to the specified process(es).
763
764Options:
John Beppuf17792c2000-04-13 03:16:01 +0000765
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000766 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000767
768Example:
769
770 $ ps | grep apache
771 252 root root S [apache]
772 263 www-data www-data S [apache]
773 264 www-data www-data S [apache]
774 265 www-data www-data S [apache]
775 266 www-data www-data S [apache]
776 267 www-data www-data S [apache]
777 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +0000778
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000779-------------------------------
780
781=item killall
782
John Beppu9057b6a2000-04-16 10:22:28 +0000783Usage: killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +0000784
785Send a signal (default is SIGTERM) to the specified process(es).
786
787Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000788
Erik Andersen5e1189e2000-04-15 16:34:54 +0000789 -l List all signal names and numbers.
790
791Example:
792
793 $ killall apache
794
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000795-------------------------------
796
797=item length
798
Erik Andersen5e1189e2000-04-15 16:34:54 +0000799Usage: length string
800
801Prints out the length of the specified string.
802
803Example:
Erik Andersena19bc642000-05-02 06:40:02 +0000804
Erik Andersen5e1189e2000-04-15 16:34:54 +0000805 $ length "Hello"
806 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000807
808-------------------------------
809
John Beppu46a4e762000-01-18 22:33:11 +0000810=item ln
811
John Beppu4581b4c2000-01-19 15:04:41 +0000812Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +0000813
John Beppu4581b4c2000-01-19 15:04:41 +0000814Create a link named LINK_NAME or DIRECTORY to the specified TARGET
815
816Options:
817
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000818 -s make symbolic links instead of hard links
819 -f remove existing destination files
John Beppu4581b4c2000-01-19 15:04:41 +0000820
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000821Example:
822
Erik Andersencf8d38a2000-04-21 01:23:36 +0000823 $ ln -s BusyBox /tmp/ls
Erik Andersena19bc642000-05-02 06:40:02 +0000824 $ ls -l /tmp/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000825 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000826
827-------------------------------
828
829=item loadacm
830
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000831Usage: loadacm
832
833Loads an acm from standard input.
834
835Example:
836
837 $ loadacm < /etc/i18n/acmname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000838
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000839-------------------------------
840
841=item loadfont
842
Erik Andersena6c75222000-04-18 00:00:52 +0000843Usage: loadfont
844
845Loads a console font from standard input.
846
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000847Example:
848
849 $ loadfont < /etc/i18n/fontname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000850
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000851-------------------------------
852
853=item loadkmap
854
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000855Usage: loadkmap
856
857Loads a binary keyboard translation table from standard input.
858
859Example:
860
861 $ loadkmap < /etc/i18n/lang-keymap
Erik Andersen5e1189e2000-04-15 16:34:54 +0000862
863-------------------------------
864
865=item logger
866
867Usage: logger [OPTION]... [MESSAGE]
868
869Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
870
871Options:
872
873 -s Log to stderr as well as the system log.
874 -t Log using the specified tag (defaults to user name).
875 -p Enter the message with the specified priority.
876 This may be numerical or a ``facility.level'' pair.
877
878Example:
879
880 $ logger "hello"
881
882-------------------------------
883
884=item logname
885
886Usage: logname
887
888Print the name of the current user.
889
890Example:
891
892 $ logname
893 root
894
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000895-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000896
John Beppu46a4e762000-01-18 22:33:11 +0000897=item ls
898
John Beppuf17792c2000-04-13 03:16:01 +0000899Usage: ls [B<-1acdelnpuxACF>] [filenames...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000900
901Options:
902
903 -a do not hide entries starting with .
904 -c with -l: show ctime (the time of last
905 modification of file status information)
906 -d list directory entries instead of contents
907 -e list both full date and full time
908 -l use a long listing format
909 -n list numeric UIDs and GIDs instead of names
910 -p append indicator (one of /=@|) to entries
911 -u with -l: show access time (the time of last
912 access of the file)
913 -x list entries by lines instead of by columns
914 -A do not list implied . and ..
915 -C list entries by columns
916 -F append indicator (one of */=@|) to entries
John Beppu50ed0672000-04-13 23:44:04 +0000917
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000918-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000919
John Beppu46a4e762000-01-18 22:33:11 +0000920=item lsmod
921
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000922Usage: lsmod
John Beppu4581b4c2000-01-19 15:04:41 +0000923
Erik Andersen5e1189e2000-04-15 16:34:54 +0000924Shows a list of all currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000925
926-------------------------------
927
928=item makedevs
929
Erik Andersen5e1189e2000-04-15 16:34:54 +0000930Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
931
932Creates a range of block or character special files
933
934TYPEs include:
935
936 b: Make a block (buffered) device.
937 c or u: Make a character (un-buffered) device.
938 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
939
940FIRST specifies the number appended to NAME to create the first device.
941LAST specifies the number of the last item that should be created.
942If 's' is the last argument, the base device is created as well.
943
944Example:
945
946 $ makedevs /dev/ttyS c 4 66 2 63
947 [creates ttyS2-ttyS63]
948 $ makedevs /dev/hda b 3 0 0 8 s
949 [creates hda,hda1-hda8]
950
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000951-------------------------------
952
953=item math
954
Erik Andersen5e1189e2000-04-15 16:34:54 +0000955Usage: math expression ...
956
957This is a Tiny RPN calculator that understands the
958following operations: +, -, /, *, and, or, not, eor.
959
960Example:
961
962 $ math 2 2 add
963 4
964 $ math 8 8 \* 2 2 + /
965 16
966 $ math 0 1 and
967 0
968 $ math 0 1 or
969 1
970
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000971-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000972
John Beppu46a4e762000-01-18 22:33:11 +0000973=item mkdir
974
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000975Usage: mkdir [OPTION] DIRECTORY...
976
John Beppu4581b4c2000-01-19 15:04:41 +0000977Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000978
John Beppu4581b4c2000-01-19 15:04:41 +0000979Options:
980
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000981 -m set permission mode (as in chmod), not rwxrwxrwx - umask
982 -p no error if dir exists, make parent directories as needed
983
984Example:
985
986 $ mkdir /tmp/foo
987 $ mkdir /tmp/foo
988 /tmp/foo: File exists
989 $ mkdir /tmp/foo/bar/baz
990 /tmp/foo/bar/baz: No such file or directory
991 $ mkdir -p /tmp/foo/bar/baz
992
993-------------------------------
994
995=item mkfifo
996
Erik Andersen5e1189e2000-04-15 16:34:54 +0000997Usage: mkfifo [OPTIONS] name
998
999Creates a named pipe (identical to 'mknod name p')
1000
1001Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001002
Erik Andersen5e1189e2000-04-15 16:34:54 +00001003 -m create the pipe using the specified mode (default a=rw)
1004
1005-------------------------------
1006
1007=item mkfs.minix
1008
1009Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1010
1011Make a MINIX filesystem.
1012
1013OPTIONS:
1014
1015 -c Check the device for bad blocks
1016 -n [14|30] Specify the maximum length of filenames
1017 -i Specify the number of inodes for the filesystem
1018 -l FILENAME Read the bad blocks list from FILENAME
1019 -v Make a Minix version 2 filesystem
1020
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001021-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001022
John Beppu46a4e762000-01-18 22:33:11 +00001023=item mknod
1024
Erik Andersen5e1189e2000-04-15 16:34:54 +00001025Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001026
Erik Andersen5e1189e2000-04-15 16:34:54 +00001027Create a special file (block, character, or pipe).
1028
1029Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001030
Erik Andersen5e1189e2000-04-15 16:34:54 +00001031 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001032
1033TYPEs include:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001034 b: Make a block (buffered) device.
1035 c or u: Make a character (un-buffered) device.
1036 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001037
1038Example:
1039
1040 $ mknod /dev/fd0 b 2 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00001041 $ mknod -m 644 /tmp/pipe p
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001042
1043-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001044
John Beppu46a4e762000-01-18 22:33:11 +00001045=item mkswap
1046
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001047Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1048
John Beppu4581b4c2000-01-19 15:04:41 +00001049Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001050
John Beppu4581b4c2000-01-19 15:04:41 +00001051Options:
1052
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001053 -c Check for read-ability.
1054 -v0 Make version 0 swap [max 128 Megs].
1055 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1056 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001057
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001058-------------------------------
1059
Erik Andersen227a59b2000-04-25 23:24:55 +00001060=item mktemp
1061
Erik Andersene31c0662000-05-02 05:32:07 +00001062Usage: mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001063
1064Creates a temporary file with its name based on TEMPLATE.
1065TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1066
1067Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001068
Erik Andersen227a59b2000-04-25 23:24:55 +00001069 $ mktemp /tmp/temp.XXXXXX
1070 /tmp/temp.mWiLjM
1071 $ ls -la /tmp/temp.mWiLjM
1072 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1073
1074-------------------------------
1075
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001076=item mnc
1077
Erik Andersen5e1189e2000-04-15 16:34:54 +00001078Usage: mnc [IP] [port]
1079
1080mini-netcat opens a pipe to IP:port
1081
1082Example:
1083
1084 $ mnc foobar.somedomain.com 25
1085 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1086 help
1087 214-Commands supported:
1088 214- HELO EHLO MAIL RCPT DATA AUTH
1089 214 NOOP QUIT RSET HELP
1090 quit
1091 221 foobar closing connection
1092
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001093-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001094
John Beppu46a4e762000-01-18 22:33:11 +00001095=item more
1096
John Beppu4581b4c2000-01-19 15:04:41 +00001097Usage: more [file ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001098
1099More is a filter for paging through text one screenful at a time.
1100
1101Example:
1102
1103 $ dmesg | more
John Beppu50ed0672000-04-13 23:44:04 +00001104
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001105-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001106
John Beppu46a4e762000-01-18 22:33:11 +00001107=item mount
1108
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001109Usage: mount [flags]
1110 mount [flags] device directory [B<-o> options,more-options]
John Beppu4581b4c2000-01-19 15:04:41 +00001111
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001112Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001113
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001114 -a: Mount all file systems in fstab.
1115 -o option: One of many filesystem options, listed below.
1116 -r: Mount the filesystem read-only.
1117 -t filesystem-type: Specify the filesystem type.
1118 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001119
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001120Options for use with the "B<-o>" flag:
1121
1122 async / sync: Writes are asynchronous / synchronous.
1123 dev / nodev: Allow use of special device files / disallow them.
1124 exec / noexec: Allow use of executable files / disallow them.
1125 loop: Mounts a file via loop device.
1126 suid / nosuid: Allow set-user-id-root programs / disallow them.
1127 remount: Re-mount a currently-mounted filesystem, changing its flags.
1128 ro / rw: Mount for read-only / read-write.
1129 There are EVEN MORE flags that are specific to each filesystem.
1130 You'll have to see the written documentation for those.
1131
1132Example:
1133
1134 $ mount
1135 /dev/hda3 on / type minix (rw)
1136 proc on /proc type proc (rw)
1137 devpts on /dev/pts type devpts (rw)
1138 $ mount /dev/fd0 /mnt -t msdos -o ro
1139 $ mount /tmp/diskimage /opt -t ext2 -o loop
John Beppu50ed0672000-04-13 23:44:04 +00001140
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001141-------------------------------
1142
1143=item mt
1144
John Beppu9057b6a2000-04-16 10:22:28 +00001145Usage: mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001146
1147Control magnetic tape drive operation
1148
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001149-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001150
John Beppu46a4e762000-01-18 22:33:11 +00001151=item mv
1152
John Beppu4581b4c2000-01-19 15:04:41 +00001153Usage: mv SOURCE DEST
1154
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001155 or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001156
1157Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001158
1159Example:
1160
1161 $ mv /tmp/foo /bin/bar
John Beppu50ed0672000-04-13 23:44:04 +00001162
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001163-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001164
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001165=item nslookup
John Beppu46a4e762000-01-18 22:33:11 +00001166
Erik Andersen5e1189e2000-04-15 16:34:54 +00001167Usage: nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001168
Erik Andersen5e1189e2000-04-15 16:34:54 +00001169Queries the nameserver for the IP address of the given HOST
1170
1171Example:
1172
1173 $ nslookup localhost
1174 Server: default
1175 Address: default
1176
1177 Name: debian
1178 Address: 127.0.0.1
John Beppu46a4e762000-01-18 22:33:11 +00001179
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001180-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001181
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001182=item ping
1183
1184Usage: ping [OPTION]... host
1185
1186Send ICMP ECHO_REQUEST packets to network hosts.
1187
1188Options:
1189
1190 -c COUNT Send only COUNT pings.
1191 -q Quiet mode, only displays output at start
1192 and when finished.
1193Example:
1194
1195 $ ping localhost
1196 PING slag (127.0.0.1): 56 data bytes
1197 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1198
1199 --- debian ping statistics ---
1200 1 packets transmitted, 1 packets received, 0% packet loss
1201 round-trip min/avg/max = 20.1/20.1/20.1 ms
1202
1203-------------------------------
1204
Erik Andersen5e1189e2000-04-15 16:34:54 +00001205=item poweroff
1206
1207Shuts down the system, and requests that the kernel turn off power upon halting.
1208
1209-------------------------------
1210
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001211=item printf
1212
Erik Andersen5e1189e2000-04-15 16:34:54 +00001213Usage: printf format [argument...]
1214
1215Formats and prints the given data in a manner similar to the C printf command.
1216
1217Example:
1218
1219 $ printf "Val=%d\n" 5
1220 Val=5
1221
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001222-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001223
John Beppu46a4e762000-01-18 22:33:11 +00001224=item ps
1225
Erik Andersen5e1189e2000-04-15 16:34:54 +00001226Usage: ps
1227
1228Report process status
1229
1230This version of ps accepts no options.
1231
1232Example:
1233
1234 $ ps
1235 PID Uid Gid State Command
1236 1 root root S init
1237 2 root root S [kflushd]
1238 3 root root S [kupdate]
1239 4 root root S [kpiod]
1240 5 root root S [kswapd]
1241 742 andersen andersen S [bash]
1242 743 andersen andersen S -bash
1243 745 root root S [getty]
1244 2990 andersen andersen R ps
1245
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001246-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001247
John Beppu46a4e762000-01-18 22:33:11 +00001248=item pwd
1249
Erik Andersen5e1189e2000-04-15 16:34:54 +00001250Prints the full filename of the current working directory.
1251
1252Example:
1253
1254 $ pwd
1255 /root
1256
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001257-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001258
John Beppu46a4e762000-01-18 22:33:11 +00001259=item reboot
1260
Erik Andersen5e1189e2000-04-15 16:34:54 +00001261Instructs the kernel to reboot the system.
1262
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001263-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001264
John Beppu46a4e762000-01-18 22:33:11 +00001265=item rm
1266
Erik Andersen5e1189e2000-04-15 16:34:54 +00001267Usage: rm [OPTION]... FILE...
1268
1269Remove (unlink) the FILE(s).
1270
1271Options:
1272
1273 -f remove existing destinations, never prompt
1274 -r or -R remove the contents of directories recursively
1275
1276Example:
1277
1278 $ rm -rf /tmp/foo
1279
1280-------------------------------
1281
1282=item rmdir
1283
1284Usage: rmdir [OPTION]... DIRECTORY...
1285
1286Remove the DIRECTORY(ies), if they are empty.
1287
1288Example:
1289
1290 # rmdir /tmp/foo
1291
1292-------------------------------
1293
1294=item rmmod
1295
1296Usage: rmmod [OPTION]... [MODULE]...
1297
1298Unloads the specified kernel modules from the kernel.
1299
1300Options:
1301
1302 -a Try to remove all unused kernel modules.
1303
1304Example:
1305
1306 $ rmmod tulip
1307
1308-------------------------------
1309
1310=item sed
1311
John Beppu9057b6a2000-04-16 10:22:28 +00001312Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001313
1314Allowed sed scripts come in the following form:
1315
1316 'ADDR [!] COMMAND'
1317
1318 where address ADDR can be:
1319 NUMBER Match specified line number
1320 $ Match last line
1321 /REGEXP/ Match specified regexp
1322 (! inverts the meaning of the match)
1323
1324 and COMMAND can be:
1325 s/regexp/replacement/[igp]
1326 which attempt to match regexp against the pattern space
1327 and if successful replaces the matched portion with replacement.
1328
1329 aTEXT
1330 which appends TEXT after the pattern space
1331
1332Options:
1333
1334 -e add the script to the commands to be executed
1335 -n suppress automatic printing of pattern space
1336
1337This version of sed matches full regular expresions.
1338
1339Example:
1340
1341 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1342 bar
1343
1344-------------------------------
1345
Erik Andersen4f3f7572000-04-28 00:18:56 +00001346=item setkeycodes
1347
1348Usage: setkeycodes SCANCODE KEYCODE ...
1349
1350Set entries into the kernel's scancode-to-keycode map,
1351allowing unusual keyboards to generate usable keycodes.
1352
1353SCANCODE may be either xx or e0xx (hexadecimal),
1354and KEYCODE is given in decimal
1355
1356Example:
1357
1358 # setkeycodes e030 127
1359
1360-------------------------------
1361
Erik Andersen5e1189e2000-04-15 16:34:54 +00001362=item sh
1363
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001364Usage: sh
1365
1366lash -- the BusyBox LAme SHell (command interpreter)
1367
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001368This command does not yet have proper documentation.
1369
1370Use lash just as you would use any other shell. It properly handles pipes,
1371redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1372has a sufficient set of builtins to do what is needed. It does not (yet)
1373support Bourne Shell syntax. If you need things like "if-then-else", "while",
1374and such, use ash or bash. If you just need a very simple and extremely small
1375shell, this will do the job.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001376
1377-------------------------------
1378
1379=item sfdisk
1380
1381Usage: sfdisk [options] device ...
1382
1383device: something like /dev/hda or /dev/sda
1384
1385useful options:
1386
1387 -s [or --show-size]: list size of a partition
1388 -c [or --id]: print or change partition Id
1389 -l [or --list]: list partitions of each device
1390 -d [or --dump]: idem, but in a format suitable for later input
1391 -i [or --increment]: number cylinders etc. from 1 instead of from 0
1392 -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB
1393 -T [or --list-types]:list the known partition types
1394 -D [or --DOS]: for DOS-compatibility: waste a little space
1395 -R [or --re-read]: make kernel reread partition table
1396 -N# : change only the partition with number #
1397 -n : do not actually write to disk
1398 -O file : save the sectors that will be overwritten to file
1399 -I file : restore these sectors again
1400 -v [or --version]: print version
1401 -? [or --help]: print this message
1402
1403dangerous options:
1404
1405 -g [or --show-geometry]: print the kernel's idea of the geometry
1406 -x [or --show-extended]: also list extended partitions on output
1407
1408 or expect descriptors for them on input
1409 -L [or --Linux]: do not complain about things irrelevant for Linux
1410 -q [or --quiet]: suppress warning messages
1411 You can override the detected geometry using:
1412 -C# [or --cylinders #]:set the number of cylinders to use
1413 -H# [or --heads #]: set the number of heads to use
1414 -S# [or --sectors #]: set the number of sectors to use
1415
1416You can disable all consistency checking with:
1417
1418 -f [or --force]: do what I say, even if it is stupid
1419
1420-------------------------------
1421
1422=item sleep
1423
1424Usage: sleep N
1425
1426Pause for N seconds.
1427
1428Example:
1429
1430 $ sleep 2
1431 [2 second delay results]
1432
1433-------------------------------
1434
1435=item sort
1436
John Beppu9057b6a2000-04-16 10:22:28 +00001437Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001438
1439Sorts lines of text in the specified files
1440
1441Example:
1442
1443 $ echo -e "e\nf\nb\nd\nc\na" | sort
1444 a
1445 b
1446 c
1447 d
1448 e
1449 f
1450
1451-------------------------------
1452
1453=item sync
1454
1455Usage: sync
1456
1457Write all buffered filesystem blocks to disk.
1458
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001459-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001460
John Beppu46a4e762000-01-18 22:33:11 +00001461=item syslogd
1462
Erik Andersen5e1189e2000-04-15 16:34:54 +00001463Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001464
Erik Andersen5e1189e2000-04-15 16:34:54 +00001465Linux system and kernel (provides klogd) logging utility.
1466Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001467
Erik Andersen5e1189e2000-04-15 16:34:54 +00001468Options:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001469
Erik Andersen5e1189e2000-04-15 16:34:54 +00001470 -m Change the mark timestamp interval. default=20min. 0=off
1471 -n Do not fork into the background (for when run by init)
1472 -K Do not start up the klogd process (by default syslogd spawns klogd).
1473 -O Specify an alternate log file. default=/var/log/messages
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001474
1475-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001476
John Beppu46a4e762000-01-18 22:33:11 +00001477=item swapon
1478
Erik Andersen5e1189e2000-04-15 16:34:54 +00001479Usage: swapon [OPTION] [device]
1480
1481Start swapping virtual memory pages on the given device.
1482
1483Options:
1484
1485 -a Start swapping on all swap devices
1486
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001487-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001488
John Beppu46a4e762000-01-18 22:33:11 +00001489=item swapoff
1490
Erik Andersen5e1189e2000-04-15 16:34:54 +00001491Usage: swapoff [OPTION] [device]
1492
1493Stop swapping virtual memory pages on the given device.
1494
1495Options:
1496
1497 -a Stop swapping on all swap devices
1498
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001499-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001500
John Beppu46a4e762000-01-18 22:33:11 +00001501=item tail
1502
Erik Andersen5e1189e2000-04-15 16:34:54 +00001503Usage: tail [OPTION] [FILE]...
1504
1505Print last 10 lines of each FILE to standard output.
1506With more than one FILE, precede each with a header giving the
1507file name. With no FILE, or when FILE is -, read standard input.
1508
1509Options:
1510
1511 -n NUM Print last NUM lines instead of first 10
1512 -f Output data as the file grows. This version
1513 of 'tail -f' supports only one file at a time.
1514
1515Example:
1516
1517 $ tail -n 1 /etc/resolv.conf
1518 nameserver 10.0.0.1
1519
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001520-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001521
John Beppu46a4e762000-01-18 22:33:11 +00001522=item tar
1523
John Beppu9057b6a2000-04-16 10:22:28 +00001524Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001525
1526Create, extract, or list files from a tar file. Note that
1527this version of tar treats hard links as separate files.
1528
1529Main operation mode:
1530
1531 c create
1532 x extract
1533 t list
1534
1535File selection:
1536
1537 f name of tarfile or "-" for stdin
1538 O extract to stdout
1539 --exclude file to exclude
1540
1541Informative output:
1542
1543 v verbosely list files processed
1544
1545Example:
1546
1547 $ zcat /tmp/tarball.tar.gz | tar -xf -
1548 $ tar -cf /tmp/tarball.tar /usr/local
1549
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001550-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001551
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001552=item test, [
1553
Erik Andersen5e1189e2000-04-15 16:34:54 +00001554Usage: test EXPRESSION
1555or [ EXPRESSION ]
1556
1557Checks file types and compares values returning an exit
1558code determined by the value of EXPRESSION.
1559
1560Example:
1561
1562 $ test 1 -eq 2
1563 $ echo $?
1564 1
1565 $ test 1 -eq 1
1566 $ echo $?
1567 0
1568 $ [ -d /etc ]
1569 $ echo $?
1570 0
1571 $ [ -d /junk ]
1572 $ echo $?
1573 1
1574
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001575-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001576
John Beppu46a4e762000-01-18 22:33:11 +00001577=item tee
1578
Erik Andersen5e1189e2000-04-15 16:34:54 +00001579Usage: tee [OPTION]... [FILE]...
1580
1581Copy standard input to each FILE, and also to standard output.
1582
1583Options:
1584
1585 -a append to the given FILEs, do not overwrite
1586
1587Example:
1588
1589 $ echo "Hello" | tee /tmp/foo
1590 $ cat /tmp/foo
1591 Hello
1592
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001593-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001594
John Beppu46a4e762000-01-18 22:33:11 +00001595=item touch
1596
John Beppu9057b6a2000-04-16 10:22:28 +00001597Usage: touch [B<-c>] file [file ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001598
1599Update the last-modified date on (or create) the selected file[s].
1600
1601Example:
1602
1603 $ ls -l /tmp/foo
1604 /bin/ls: /tmp/foo: No such file or directory
1605 $ touch /tmp/foo
1606 $ ls -l /tmp/foo
1607 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1608
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001609-------------------------------
1610
1611=item tr
Erik Andersena19bc642000-05-02 06:40:02 +00001612
Erik Andersen3c1217c2000-05-01 22:34:24 +00001613Usage: tr [-cds] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001614
Erik Andersen3c1217c2000-05-01 22:34:24 +00001615Translate, squeeze, and/or delete characters from
1616standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001617
Erik Andersen3c1217c2000-05-01 22:34:24 +00001618Options:
1619
1620 -c take complement of STRING1
1621 -d delete input characters coded STRING1
1622 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00001623
1624Example:
1625
1626 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1627 hello world
1628
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001629-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001630
John Beppu46a4e762000-01-18 22:33:11 +00001631=item true
1632
Erik Andersen5e1189e2000-04-15 16:34:54 +00001633Returns an exit code of TRUE (0)
1634
1635Example:
1636
1637 $ true
1638 $ echo $?
1639 0
1640
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001641-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001642
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001643=item tty
John Beppu4581b4c2000-01-19 15:04:41 +00001644
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001645Usage: tty
1646
1647Print the file name of the terminal connected to standard input.
1648
1649Options:
1650
1651 -s print nothing, only return an exit status
1652
1653Example:
1654
1655 $ tty
1656 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00001657
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001658-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001659
John Beppu46a4e762000-01-18 22:33:11 +00001660=item umount
1661
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001662Usage: umount [flags] filesystem|directory
1663
1664Flags:
1665
1666 -a: Unmount all file systems
1667 -r: Try to remount devices as read-only if mount is busy
1668 -f: Do not free loop device (if a loop device has been used)
1669
1670Example:
1671
1672 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001673
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001674-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001675
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001676=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001677
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001678Usage: uname [OPTION]...
1679
Erik Andersen26702fe2000-04-17 16:44:46 +00001680Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001681
1682Options:
1683
1684 -a print all information
1685 -m the machine (hardware) type
1686 -n print the machine's network node hostname
1687 -r print the operating system release
1688 -s print the operating system name
1689 -p print the host processor type
1690 -v print the operating system version
1691
1692Example:
1693
1694 $ uname -a
1695 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001696
1697-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001698
John Beppu46a4e762000-01-18 22:33:11 +00001699=item uniq
1700
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001701Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1702
1703Discard all but one of successive identical lines from INPUT
1704(or standard input), writing to OUTPUT (or standard output).
1705
1706Example:
1707
1708 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1709 a
1710 b
1711 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001712
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001713-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001714
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001715=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001716
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001717Usage: update [options]
1718
1719Periodically flushes filesystem buffers.
1720
1721Options:
1722
1723 -S force use of sync(2) instead of flushing
1724 -s SECS call sync this often (default 30)
1725 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001726
1727-------------------------------
1728
1729=item uptime
1730
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001731Usage: uptime
1732
1733Tells how long the system has been running since boot.
1734
1735Example:
1736
1737 $ uptime
1738 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001739
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001740-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001741
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001742=item usleep
1743
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001744Usage: usleep N
1745
1746Pauses for N microseconds.
1747
1748Example:
1749
1750 $ usleep 1000000
1751 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001752
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001753-------------------------------
1754
1755=item wc
1756
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001757Usage: wc [OPTION]... [FILE]...
1758
1759Print line, word, and byte counts for each FILE, and a total line if
1760more than one FILE is specified. With no FILE, read standard input.
1761
1762Options:
1763
1764 -c print the byte counts
1765 -l print the newline counts
1766 -L print the length of the longest line
1767 -w print the word counts
1768
1769Example:
1770
1771 $ wc /etc/passwd
1772 31 46 1365 /etc/passwd
Erik Andersen5e1189e2000-04-15 16:34:54 +00001773
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001774-------------------------------
1775
1776=item whoami
1777
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001778Usage: whoami
1779
1780Prints the user name associated with the current effective user id.
1781
1782Example:
1783
1784 $ whoami
1785 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00001786
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001787-------------------------------
1788
1789=item yes
1790
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001791Usage: yes [OPTION]... [STRING]...
1792
1793Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001794
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001795-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00001796
1797=item zcat
1798
Erik Andersen26702fe2000-04-17 16:44:46 +00001799This is essentially an alias for invoking "gunzip B<-c>", where
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001800it decompresses the file inquestion and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001801
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001802-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001803
John Beppu46a4e762000-01-18 22:33:11 +00001804=back
John Beppu3a1b6be2000-01-18 15:45:59 +00001805
Erik Andersena19bc642000-05-02 06:40:02 +00001806=head1 LIBC NSS
1807
1808GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
1809library for the local environment, and to configure how it reads system data,
1810such as passwords and group information. BusyBox has made it Policy that it
1811will never use NSS, and will never use and libc calls that make use of NSS.
1812This allows you to run an embedded system without the need for installing an
1813/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
1814
1815If you are using a system that is using a remote LDAP server for authentication
1816via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
1817BusyBox source. Chances are though, that if you have enough space to install
1818of that stuff on your system, then you probably want the full GNU utilities.
1819
John Beppu3a1b6be2000-01-18 15:45:59 +00001820=head1 SEE ALSO
1821
1822textutils(1), shellutils(1), etc...
1823
1824=head1 MAINTAINER
1825
Erik Andersen1101d232000-04-19 05:15:12 +00001826Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001827
1828=head1 AUTHORS
1829
John Beppu08fe43d2000-01-19 12:39:16 +00001830The following people have contributed code to BusyBox whether
1831they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00001832
Erik Andersen1101d232000-04-19 05:15:12 +00001833Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001834
John Beppu08fe43d2000-01-19 12:39:16 +00001835=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001836
John Beppu08fe43d2000-01-19 12:39:16 +00001837John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001838
John Beppu08fe43d2000-01-19 12:39:16 +00001839=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001840
John Beppu08fe43d2000-01-19 12:39:16 +00001841Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001842
John Beppu08fe43d2000-01-19 12:39:16 +00001843=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001844
John Beppu08fe43d2000-01-19 12:39:16 +00001845Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001846
John Beppu08fe43d2000-01-19 12:39:16 +00001847=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001848
John Beppu08fe43d2000-01-19 12:39:16 +00001849Dave Cinege <dcinege@psychosis.com>
1850
1851=for html <br>
1852
John Beppu50ed0672000-04-13 23:44:04 +00001853Karl M. Hegbloom <karlheg@debian.org>
1854
1855=for html <br>
1856
John Beppu4fd10fc2000-04-17 05:13:59 +00001857John Lombardo <john@deltanet.com>
1858
1859=for html <br>
1860
John Beppu08fe43d2000-01-19 12:39:16 +00001861Bruce Perens <bruce@perens.com>
1862
1863=for html <br>
1864
1865Linus Torvalds <torvalds@transmeta.com>
1866
1867=for html <br>
1868
1869Charles P. Wright <cpwright@villagenet.com>
1870
1871=for html <br>
1872
1873Enrique Zanardi <ezanardi@ull.es>
1874
1875=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00001876
1877=cut
John Beppu08fe43d2000-01-19 12:39:16 +00001878
Erik Andersena19bc642000-05-02 06:40:02 +00001879# $Id: busybox.pod,v 1.27 2000/05/02 06:40:02 erik Exp $