blob: d6b475c99f12faeca61876b28d83e44913fe01db [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 Andersen73c8c9c2000-05-13 05:36:13 +000058basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, cut, date, dd, df,
Erik Andersen5e1189e2000-04-15 16:34:54 +000059dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
60freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
Erik Andersen73c8c9c2000-05-13 05:36:13 +000061hostname, id, init, kill, killall, length, ln, loadacm, loadfont, loadkmap,
62logger, logname, ls, lsmod, makedevs, math, mkdir, mkfifo, mkfs.minix, mknod,
63mkswap, mktemp, nc, more, mount, mt, mv, nslookup, ping, poweroff, printf, ps,
64pwd, reboot, rm, rmdir, rmmod, sed, setkeycodes, sh, sfdisk, sleep, sort, sync,
Erik Andersen4f3f7572000-04-28 00:18:56 +000065syslogd, 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
Erik Andersenac130e12000-05-10 05:00:31 +000074Usage: basename FILE [SUFFIX]
Erik Andersen62dc17a2000-04-13 01:18:23 +000075
Erik Andersenac130e12000-05-10 05:00:31 +000076Strips directory path and suffixes from FILE.
77If specified, also removes any trailing SUFFIX.
Erik Andersen62dc17a2000-04-13 01:18:23 +000078
79Example:
80
81 $ basename /usr/local/bin/foo
82 foo
83 $ basename /usr/local/bin/
84 bin
Erik Andersenac130e12000-05-10 05:00:31 +000085 $ basename /foo/bar.txt .txt
86 bar
Erik Andersen62dc17a2000-04-13 01:18:23 +000087
Erik Andersen9cf3bfa2000-04-13 18:49:43 +000088-------------------------------
89
Erik Andersena6c75222000-04-18 00:00:52 +000090=item cat
John Beppu46a4e762000-01-18 22:33:11 +000091
Erik Andersencf8d38a2000-04-21 01:23:36 +000092Usage: cat [FILE ...]
Erik Andersen62dc17a2000-04-13 01:18:23 +000093
Erik Andersencf8d38a2000-04-21 01:23:36 +000094Concatenates FILE(s) and prints them to the standard output.
Erik Andersen62dc17a2000-04-13 01:18:23 +000095
96Example:
97
98 $ cat /proc/uptime
99 110716.72 17.67
John Beppu4581b4c2000-01-19 15:04:41 +0000100
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000101-------------------------------
102
Erik Andersen5e1189e2000-04-15 16:34:54 +0000103=item chgrp
104
105Usage: chgrp [OPTION]... GROUP FILE...
106
107Change the group membership of each FILE to GROUP.
Erik Andersen26702fe2000-04-17 16:44:46 +0000108
Erik Andersen5e1189e2000-04-15 16:34:54 +0000109Options:
110
111 -R change files and directories recursively
Erik Andersen26702fe2000-04-17 16:44:46 +0000112
Erik Andersen5e1189e2000-04-15 16:34:54 +0000113Example:
114
115 $ ls -l /tmp/foo
116 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
117 $ chgrp root /tmp/foo
118 $ ls -l /tmp/foo
119 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
120
121-------------------------------
122
John Beppu46a4e762000-01-18 22:33:11 +0000123=item chmod
124
John Beppuf17792c2000-04-13 03:16:01 +0000125Usage: chmod [B<-R>] MODE[,MODE]... FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000126
Erik Andersencf8d38a2000-04-21 01:23:36 +0000127Changes file access permissions for the specified FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000128Each MODE is defined by combining the letters for WHO has access to the file,
129an OPERATOR for selecting how the permissions should be changed, and a
Erik Andersencf8d38a2000-04-21 01:23:36 +0000130PERISSION for FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000131
Erik Andersencf8d38a2000-04-21 01:23:36 +0000132WHO may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000133
Erik Andersencf8d38a2000-04-21 01:23:36 +0000134 u User who owns the file
135 g Users in the file's Group
Erik Andersen62dc17a2000-04-13 01:18:23 +0000136 o Other users not in the file's group
137 a All users
138
Erik Andersencf8d38a2000-04-21 01:23:36 +0000139OPERATOR may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000140
Erik Andersencf8d38a2000-04-21 01:23:36 +0000141 + Add a permission
142 - Remove a permission
143 = Assign a permission
Erik Andersen62dc17a2000-04-13 01:18:23 +0000144
Erik Andersencf8d38a2000-04-21 01:23:36 +0000145PERMISSION may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000146
Erik Andersencf8d38a2000-04-21 01:23:36 +0000147 r Read
Erik Andersen62dc17a2000-04-13 01:18:23 +0000148 w Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000149 x Execute (or access for directories)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000150 s Set user (or group) ID bit
Erik Andersencf8d38a2000-04-21 01:23:36 +0000151 t Stickey bit (for directories prevents removing files by non-owners)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000152
Erik Andersencf8d38a2000-04-21 01:23:36 +0000153Alternately, permissions can be set numerically where the first three
154numbers are calculated by adding the octal values, such as
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000155
Erik Andersen62dc17a2000-04-13 01:18:23 +0000156 4 Read
157 2 Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000158 1 Execute
Erik Andersen62dc17a2000-04-13 01:18:23 +0000159
Erik Andersencf8d38a2000-04-21 01:23:36 +0000160An optional fourth digit can also be used to specify
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000161
Erik Andersen62dc17a2000-04-13 01:18:23 +0000162 4 Set user ID
163 2 Set group ID
Erik Andersencf8d38a2000-04-21 01:23:36 +0000164 1 Stickey bit
Erik Andersen62dc17a2000-04-13 01:18:23 +0000165
John Beppu4581b4c2000-01-19 15:04:41 +0000166Options:
167
Erik Andersencf8d38a2000-04-21 01:23:36 +0000168 -R Change files and directories recursively.
John Beppu4581b4c2000-01-19 15:04:41 +0000169
Erik Andersen62dc17a2000-04-13 01:18:23 +0000170Example:
171
172 $ ls -l /tmp/foo
173 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
174 $ chmod u+x /tmp/foo
175 $ ls -l /tmp/foo
176 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
177 $ chmod 444 /tmp/foo
178 $ ls -l /tmp/foo
179 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000180
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000181-------------------------------
182
John Beppu46a4e762000-01-18 22:33:11 +0000183=item chown
184
Erik Andersencf8d38a2000-04-21 01:23:36 +0000185Usage: chown [OPTION]... OWNER[<.|:>[GROUP] FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000186
Erik Andersen62dc17a2000-04-13 01:18:23 +0000187Changes the owner and/or group of each FILE to OWNER and/or GROUP.
John Beppu5a50def2000-04-17 17:46:46 +0000188
John Beppu4581b4c2000-01-19 15:04:41 +0000189Options:
190
Erik Andersencf8d38a2000-04-21 01:23:36 +0000191 -R Changes files and directories recursively
Erik Andersen62dc17a2000-04-13 01:18:23 +0000192
193Example:
194
195 $ ls -l /tmp/foo
196 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
197 $ chown root /tmp/foo
198 $ ls -l /tmp/foo
199 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
200 $ chown root.root /tmp/foo
201 ls -l /tmp/foo
202 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000203
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000204-------------------------------
205
John Beppu46a4e762000-01-18 22:33:11 +0000206=item chroot
207
John Beppu4581b4c2000-01-19 15:04:41 +0000208Usage: chroot NEWROOT [COMMAND...]
209
210Run COMMAND with root directory set to NEWROOT.
211
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000212Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000213
214 $ ls -l /bin/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000215 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox
Erik Andersen62dc17a2000-04-13 01:18:23 +0000216 $ mount /dev/hdc1 /mnt -t minix
217 $ chroot /mnt
218 $ ls -l /bin/ls
219 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
John Beppu4581b4c2000-01-19 15:04:41 +0000220
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000221-------------------------------
222
John Beppu46a4e762000-01-18 22:33:11 +0000223=item clear
224
Erik Andersen62dc17a2000-04-13 01:18:23 +0000225Clears the screen.
John Beppu4581b4c2000-01-19 15:04:41 +0000226
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000227-------------------------------
228
John Beppu46a4e762000-01-18 22:33:11 +0000229=item chvt
230
John Beppu4581b4c2000-01-19 15:04:41 +0000231Usage: chvt N
232
Erik Andersencf8d38a2000-04-21 01:23:36 +0000233Changes the foreground virtual terminal to /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000234
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000235-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000236
John Beppu46a4e762000-01-18 22:33:11 +0000237=item cp
238
John Beppu4581b4c2000-01-19 15:04:41 +0000239Usage: cp [OPTION]... SOURCE DEST
240
Erik Andersen62dc17a2000-04-13 01:18:23 +0000241 or: cp [OPTION]... SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +0000242
Erik Andersencf8d38a2000-04-21 01:23:36 +0000243Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
John Beppu4581b4c2000-01-19 15:04:41 +0000244
Erik Andersene31c0662000-05-02 05:32:07 +0000245Options:
246
Erik Andersencf8d38a2000-04-21 01:23:36 +0000247 -a Same as -dpR
248 -d Preserves links
249 -p Preserves file attributes if possable
250 -R Copies directories recursively
John Beppu4581b4c2000-01-19 15:04:41 +0000251
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000252-------------------------------
253
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000254=item cut
255
256Usage: cut [OPTION]... [FILE]...
257
258Prints selected fields from each input FILE to standard output.
259
260Options:
261
262 -b LIST Output only bytes from LIST
263 -c LIST Output only characters from LIST
264 -d DELIM Use DELIM instead of tab as the field delimiter
265 -f N Print only these fields
266 -n Ignored
267
268Example:
269
270 $ echo "Hello world" | cut -f 1 -d ' '
271 Hello
272 $ echo "Hello world" | cut -f 2 -d ' '
273 world
274
275
276-------------------------------
277
John Beppu46a4e762000-01-18 22:33:11 +0000278=item date
279
Erik Andersen62dc17a2000-04-13 01:18:23 +0000280Usage: date [OPTION]... [+FORMAT]
John Beppu4581b4c2000-01-19 15:04:41 +0000281
Erik Andersen62dc17a2000-04-13 01:18:23 +0000282 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
283
Erik Andersencf8d38a2000-04-21 01:23:36 +0000284Displays the current time in the given FORMAT, or sets the system date.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000285
286Options:
Erik Andersene31c0662000-05-02 05:32:07 +0000287
Erik Andersencf8d38a2000-04-21 01:23:36 +0000288 -R Outputs RFC-822 compliant date string
289 -s Sets time described by STRING
290 -u Prints or sets Coordinated Universal Time
Erik Andersen62dc17a2000-04-13 01:18:23 +0000291
292Example:
John Beppuf17792c2000-04-13 03:16:01 +0000293
Erik Andersen62dc17a2000-04-13 01:18:23 +0000294 $ date
295 Wed Apr 12 18:52:41 MDT 2000
John Beppu4581b4c2000-01-19 15:04:41 +0000296
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000297-------------------------------
298
John Beppu46a4e762000-01-18 22:33:11 +0000299=item dd
300
Erik Andersen62dc17a2000-04-13 01:18:23 +0000301Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
John Beppu4581b4c2000-01-19 15:04:41 +0000302
303Copy a file, converting and formatting according to options
304
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000305 if=FILE read from FILE instead of stdin
306 of=FILE write to FILE instead of stdout
307 bs=n read and write n bytes at a time
308 count=n copy only n input blocks
309 skip=n skip n input blocks
310 seek=n skip n output blocks
Erik Andersen62dc17a2000-04-13 01:18:23 +0000311
312Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
John Beppu4581b4c2000-01-19 15:04:41 +0000313
Erik Andersen62dc17a2000-04-13 01:18:23 +0000314Example:
315
316 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
317 4+0 records in
318 4+0 records out
319
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000320-------------------------------
321
John Beppu46a4e762000-01-18 22:33:11 +0000322=item df
323
Erik Andersen62dc17a2000-04-13 01:18:23 +0000324Usage: df [filesystem ...]
325
326Prints the filesystem space used and space available.
327
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000328Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000329
330 $ df
331 Filesystem 1k-blocks Used Available Use% Mounted on
332 /dev/sda3 8690864 8553540 137324 98% /
333 /dev/sda1 64216 36364 27852 57% /boot
334 $ df /dev/sda3
335 Filesystem 1k-blocks Used Available Use% Mounted on
336 /dev/sda3 8690864 8553540 137324 98% /
John Beppu4581b4c2000-01-19 15:04:41 +0000337
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000338-------------------------------
339
340=item dirname
341
342Usage: dirname NAME
343
344Strip non-directory suffix from file name
345
346Example:
347
348 $ dirname /tmp/foo
349 /tmp
350 $ dirname /tmp/foo/
351 /tmp
352
353-------------------------------
354
John Beppu46a4e762000-01-18 22:33:11 +0000355=item dmesg
356
John Beppuf17792c2000-04-13 03:16:01 +0000357Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
John Beppu4581b4c2000-01-19 15:04:41 +0000358
Erik Andersen62dc17a2000-04-13 01:18:23 +0000359Print or controls the kernel ring buffer.
John Beppu4581b4c2000-01-19 15:04:41 +0000360
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000361-------------------------------
362
John Beppu46a4e762000-01-18 22:33:11 +0000363=item du
364
Erik Andersen62dc17a2000-04-13 01:18:23 +0000365Usage: du [OPTION]... [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000366
Erik Andersen62dc17a2000-04-13 01:18:23 +0000367Summarize disk space used for each FILE and/or directory.
368Disk space is printed in units of 1k (i.e. 1024 bytes).
369
370Options:
John Beppuf17792c2000-04-13 03:16:01 +0000371
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000372 -l count sizes many times if hard linked
373 -s display only a total for each argument
Erik Andersen62dc17a2000-04-13 01:18:23 +0000374
375Example:
376
Erik Andersencf8d38a2000-04-21 01:23:36 +0000377 $ ./BusyBox du
Erik Andersen62dc17a2000-04-13 01:18:23 +0000378 16 ./CVS
379 12 ./kernel-patches/CVS
380 80 ./kernel-patches
381 12 ./tests/CVS
382 36 ./tests
383 12 ./scripts/CVS
384 16 ./scripts
385 12 ./docs/CVS
386 104 ./docs
387 2417 .
388
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000389-------------------------------
390
391=item dutmp
392
393Usage: dutmp [FILE]
394
395Dump utmp file format (pipe delimited) from FILE
396or stdin to stdout.
397
398Example:
399
400 $ dutmp /var/run/utmp
401 8|7||si|||0|0|0|955637625|760097|0
402 2|0|~|~~|reboot||0|0|0|955637625|782235|0
403 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
404 8|125||l4|||0|0|0|955637629|998367|0
405 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
406 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
407 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
408
409-------------------------------
410
411=item echo
412
413Usage: echo [-neE] [ARG ...]
414
415Prints the specified ARGs to stdout
416
417Options:
418
419 -n suppress trailing newline
420 -e interpret backslash-escaped characters (i.e. \t=tab etc)
421 -E disable interpretation of backslash-escaped characters
422
423Example:
424
425 $ echo "Erik is cool"
426 Erik is cool
427 $ echo -e "Erik\nis\ncool"
428 Erik
429 is
430 cool
431 $ echo "Erik\nis\ncool"
432 Erik\nis\ncool
433
434-------------------------------
435
436=item false
437
Erik Andersen5e1189e2000-04-15 16:34:54 +0000438Returns an exit code of FALSE (1)
439
440Example:
441
442 $ false
443 $ echo $?
444 1
445
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000446-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000447
John Beppu46a4e762000-01-18 22:33:11 +0000448=item fbset
449
John Beppu4581b4c2000-01-19 15:04:41 +0000450Usage: fbset [options] [mode]
451
Erik Andersen62dc17a2000-04-13 01:18:23 +0000452Show and modify frame buffer device settings
453
John Beppu4581b4c2000-01-19 15:04:41 +0000454Options:
455
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000456 -h
457 -fb
458 -db
459 -a
460 -i
461 -g
462 -t
463 -accel
464 -hsync
465 -vsync
466 -laced
467 -double
John Beppu4581b4c2000-01-19 15:04:41 +0000468
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000469Example:
470
471 $ fbset
472 mode "1024x768-76"
473 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
474 geometry 1024 768 1024 768 16
475 timings 12714 128 32 16 4 128 4
476 accel false
477 rgba 5/11,6/5,5/0,0/0
478 endmode
479
480-------------------------------
481
482=item fdflush
483
484Usage: fdflush device
485
486Force floppy disk drive to detect disk change
487
488-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000489
John Beppu46a4e762000-01-18 22:33:11 +0000490=item find
491
John Beppu4581b4c2000-01-19 15:04:41 +0000492Usage: find [PATH...] [EXPRESSION]
493
494Search for files in a directory hierarchy. The default PATH is
495the current directory; default EXPRESSION is '-print'
496
John Beppu4581b4c2000-01-19 15:04:41 +0000497
Erik Andersen62dc17a2000-04-13 01:18:23 +0000498EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000499
500 -follow Dereference symbolic links.
501 -name PATTERN File name (leading directories removed) matches PATTERN.
502 -print print the full file name followed by a newline to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000503
504Example:
505
506 $ find / -name /etc/passwd
507 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000508
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000509-------------------------------
510
John Beppu46a4e762000-01-18 22:33:11 +0000511=item free
512
John Beppu4581b4c2000-01-19 15:04:41 +0000513Usage: free
514
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000515Displays the amount of free and used system memory.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000516
517Example:
518
519 $ free
Erik Andersen5e1189e2000-04-15 16:34:54 +0000520 total used free shared buffers
Erik Andersen62dc17a2000-04-13 01:18:23 +0000521 Mem: 257628 248724 8904 59644 93124
522 Swap: 128516 8404 120112
523 Total: 386144 257128 129016
524
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000525-------------------------------
526
527=item freeramdisk
528
529Usage: freeramdisk DEVICE
530
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000531Frees all memory used by the specified ramdisk.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000532
533Example:
534
535 $ freeramdisk /dev/ram2
536
537-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000538
John Beppu46a4e762000-01-18 22:33:11 +0000539=item deallocvt
540
John Beppu4581b4c2000-01-19 15:04:41 +0000541Usage: deallocvt N
542
Erik Andersen62dc17a2000-04-13 01:18:23 +0000543Deallocates unused virtual terminal /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000544
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000545-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000546
John Beppu46a4e762000-01-18 22:33:11 +0000547=item fsck.minix
548
John Beppuf17792c2000-04-13 03:16:01 +0000549Usage: fsck.minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000550
551Performs a consistency check for MINIX filesystems.
552
Erik Andersen62dc17a2000-04-13 01:18:23 +0000553OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000554
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000555 -l Lists all filenames
556 -r Perform interactive repairs
557 -a Perform automatic repairs
558 -v verbose
559 -s Outputs super-block information
560 -m Activates MINIX-like "mode not cleared" warnings
561 -f Force file system check.
562
563-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000564
John Beppu46a4e762000-01-18 22:33:11 +0000565=item grep
566
Erik Andersen62dc17a2000-04-13 01:18:23 +0000567Usage: grep [OPTIONS]... PATTERN [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000568
Erik Andersen62dc17a2000-04-13 01:18:23 +0000569Search for PATTERN in each FILE or standard input.
570
571OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000572
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000573 -h suppress the prefixing filename on output
574 -i ignore case distinctions
575 -n print line number with output lines
576 -q be quiet. Returns 0 if result was found, 1 otherwise
Erik Andersena19bc642000-05-02 06:40:02 +0000577 -v select non-matching lines
Erik Andersen62dc17a2000-04-13 01:18:23 +0000578
579This version of grep matches full regular expresions.
580
Erik Andersen62dc17a2000-04-13 01:18:23 +0000581Example:
582
583 $ grep root /etc/passwd
584 root:x:0:0:root:/root:/bin/bash
585 $ grep ^[rR]oo. /etc/passwd
586 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000587
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000588-------------------------------
589
590=item gunzip
591
Erik Andersen5e1189e2000-04-15 16:34:54 +0000592Usage: gunzip [OPTION]... FILE
593
594Uncompress FILE (or standard input if FILE is '-').
595
596Options:
597
598 -c Write output to standard output
599 -t Test compressed file integrity
600
601Example:
602
Erik Andersencf8d38a2000-04-21 01:23:36 +0000603 $ ls -la /tmp/BusyBox*
604 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
605 $ gunzip /tmp/BusyBox-0.43.tar.gz
606 $ ls -la /tmp/BusyBox*
607 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000608
609-------------------------------
610
611=item gzip
612
Erik Andersen5e1189e2000-04-15 16:34:54 +0000613Usage: gzip [OPTION]... FILE
614
615Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000616When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000617
618Options:
619
620 -c Write output to standard output instead of FILE.gz
621
622Example:
623
Erik Andersencf8d38a2000-04-21 01:23:36 +0000624 $ ls -la /tmp/BusyBox*
625 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
626 $ gzip /tmp/BusyBox-0.43.tar
627 $ ls -la /tmp/BusyBox*
628 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen5e1189e2000-04-15 16:34:54 +0000629
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000630
631-------------------------------
632
633=item halt
634
Erik Andersen5e1189e2000-04-15 16:34:54 +0000635Usage: halt
636
637This comand halts the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000638
639-------------------------------
640
John Beppu46a4e762000-01-18 22:33:11 +0000641=item head
642
Erik Andersen62dc17a2000-04-13 01:18:23 +0000643Usage: head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000644
645Print first 10 lines of each FILE to standard output.
646With more than one FILE, precede each with a header giving the
647file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000648
649Options:
John Beppuf17792c2000-04-13 03:16:01 +0000650
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000651 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000652
653Example:
654
655 $ head -n 2 /etc/passwd
656 root:x:0:0:root:/root:/bin/bash
657 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000658
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000659-------------------------------
660
661=item hostid
662
Erik Andersen5e1189e2000-04-15 16:34:54 +0000663Usage: hostid
664
665Prints out a unique 32-bit identifier for the current
666machine. The 32-bit identifier is intended to be unique
667among all UNIX systems in existence.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000668
669-------------------------------
670
John Beppu46a4e762000-01-18 22:33:11 +0000671=item hostname
672
John Beppuf17792c2000-04-13 03:16:01 +0000673Usage: hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000674
John Beppu4581b4c2000-01-19 15:04:41 +0000675Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000676(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000677
Erik Andersen62dc17a2000-04-13 01:18:23 +0000678Options:
John Beppuf17792c2000-04-13 03:16:01 +0000679
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000680 -s Short
681 -i Addresses for the hostname
682 -d DNS domain name
683 -F FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000684
685Example:
686
687 $ hostname
688 slag
John Beppu46a4e762000-01-18 22:33:11 +0000689
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000690-------------------------------
691
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000692=item id
693
694Print information for USERNAME or the current user
695
696Options:
697
698 -g prints only the group ID
699 -u prints only the user ID
700 -r prints the real user ID instead of the effective ID (with -ug)
701
702Example:
703
704 $ id
705 uid=1000(andersen) gid=1000(andersen)
706
707-------------------------------
708
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000709=item init
710
Erik Andersen5e1189e2000-04-15 16:34:54 +0000711Usage: init
712
713Init is the parent of all processes.
714
715This version of init is designed to be run only by the kernel.
716
717BusyBox init doesn't support multiple runlevels. The runlevels field of
718the /etc/inittab file is completely ignored by BusyBox init. If you want
719runlevels, use sysvinit.
720
721BusyBox init works just fine without an inittab. If no inittab is found,
722it has the following default behavior:
723
724 ::sysinit:/etc/init.d/rcS
725 ::askfirst:/bin/sh
726
727if it detects that /dev/console is _not_ a serial console, it will also run:
728
729 tty2::askfirst:/bin/sh
730
731If you choose to use an /etc/inittab file, the inittab entry format is as follows:
732
733 <id>:<runlevels>:<action>:<process>
734
735 <id>:
736
737 WARNING: This field has a non-traditional meaning for BusyBox init!
738 The id field is used by BusyBox init to specify the controlling tty for
739 the specified process to run on. The contents of this field are
740 appended to "/dev/" and used as-is. There is no need for this field to
741 be unique, although if it isn't you may have strange results. If this
742 field is left blank, it is completely ignored. Also note that if
743 BusyBox detects that a serial console is in use, then all entries
744 containing non-empty id fields will _not_ be run. BusyBox init does
745 nothing with utmp. We don't need no stinkin' utmp.
746
747 <runlevels>:
748
749 The runlevels field is completely ignored.
750
751 <action>:
752
753 Valid actions include: sysinit, respawn, askfirst, wait,
754 once, and ctrlaltdel.
755
756 askfirst acts just like respawn, but before running the specified
757 process it displays the line "Please press Enter to activate this
758 console." and then waits for the user to press enter before starting
759 the specified process.
760
761 Unrecognised actions (like initdefault) will cause init to emit
762 an error message, and then go along with its business.
763
764 <process>:
765
766 Specifies the process to be executed and it's command line.
767
768
769Example /etc/inittab file:
770
771 # This is run first except when booting in single-user mode.
772 #
773 ::sysinit:/etc/init.d/rcS
774
775 # /bin/sh invocations on selected ttys
776 #
777 # Start an "askfirst" shell on the console (whatever that may be)
778 ::askfirst:/bin/sh
779 # Start an "askfirst" shell on /dev/tty2
780 tty2::askfirst:/bin/sh
781
782 # /sbin/getty invocations for selected ttys
783 #
784 tty4::respawn:/sbin/getty 38400 tty4
785 tty5::respawn:/sbin/getty 38400 tty5
786
787
788 # Example of how to put a getty on a serial line (for a terminal)
789 #
790 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
791 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
792 #
793 # Example how to put a getty on a modem line.
794 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
795
796 # Stuff to do before rebooting
797 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
798 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000799
800-------------------------------
801
John Beppu46a4e762000-01-18 22:33:11 +0000802=item kill
803
John Beppuf17792c2000-04-13 03:16:01 +0000804Usage: kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000805
Erik Andersen62dc17a2000-04-13 01:18:23 +0000806Send a signal (default is SIGTERM) to the specified process(es).
807
808Options:
John Beppuf17792c2000-04-13 03:16:01 +0000809
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000810 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000811
812Example:
813
814 $ ps | grep apache
815 252 root root S [apache]
816 263 www-data www-data S [apache]
817 264 www-data www-data S [apache]
818 265 www-data www-data S [apache]
819 266 www-data www-data S [apache]
820 267 www-data www-data S [apache]
821 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +0000822
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000823-------------------------------
824
825=item killall
826
John Beppu9057b6a2000-04-16 10:22:28 +0000827Usage: killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +0000828
829Send a signal (default is SIGTERM) to the specified process(es).
830
831Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000832
Erik Andersen5e1189e2000-04-15 16:34:54 +0000833 -l List all signal names and numbers.
834
835Example:
836
837 $ killall apache
838
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000839-------------------------------
840
841=item length
842
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000843Usage: length STRING
Erik Andersen5e1189e2000-04-15 16:34:54 +0000844
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000845Prints out the length of the specified STRING.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000846
847Example:
Erik Andersena19bc642000-05-02 06:40:02 +0000848
Erik Andersen5e1189e2000-04-15 16:34:54 +0000849 $ length "Hello"
850 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000851
852-------------------------------
853
John Beppu46a4e762000-01-18 22:33:11 +0000854=item ln
855
John Beppu4581b4c2000-01-19 15:04:41 +0000856Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +0000857
John Beppu4581b4c2000-01-19 15:04:41 +0000858Create a link named LINK_NAME or DIRECTORY to the specified TARGET
859
860Options:
861
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000862 -s make symbolic links instead of hard links
863 -f remove existing destination files
John Beppu4581b4c2000-01-19 15:04:41 +0000864
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000865Example:
866
Erik Andersencf8d38a2000-04-21 01:23:36 +0000867 $ ln -s BusyBox /tmp/ls
Erik Andersena19bc642000-05-02 06:40:02 +0000868 $ ls -l /tmp/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000869 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000870
871-------------------------------
872
873=item loadacm
874
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000875Usage: loadacm
876
877Loads an acm from standard input.
878
879Example:
880
881 $ loadacm < /etc/i18n/acmname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000882
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000883-------------------------------
884
885=item loadfont
886
Erik Andersena6c75222000-04-18 00:00:52 +0000887Usage: loadfont
888
889Loads a console font from standard input.
890
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000891Example:
892
893 $ loadfont < /etc/i18n/fontname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000894
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000895-------------------------------
896
897=item loadkmap
898
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000899Usage: loadkmap
900
901Loads a binary keyboard translation table from standard input.
902
903Example:
904
905 $ loadkmap < /etc/i18n/lang-keymap
Erik Andersen5e1189e2000-04-15 16:34:54 +0000906
907-------------------------------
908
909=item logger
910
911Usage: logger [OPTION]... [MESSAGE]
912
913Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
914
915Options:
916
917 -s Log to stderr as well as the system log.
918 -t Log using the specified tag (defaults to user name).
919 -p Enter the message with the specified priority.
920 This may be numerical or a ``facility.level'' pair.
921
922Example:
923
924 $ logger "hello"
925
926-------------------------------
927
928=item logname
929
930Usage: logname
931
932Print the name of the current user.
933
934Example:
935
936 $ logname
937 root
938
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000939-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000940
John Beppu46a4e762000-01-18 22:33:11 +0000941=item ls
942
John Beppuf17792c2000-04-13 03:16:01 +0000943Usage: ls [B<-1acdelnpuxACF>] [filenames...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000944
945Options:
946
947 -a do not hide entries starting with .
948 -c with -l: show ctime (the time of last
949 modification of file status information)
950 -d list directory entries instead of contents
951 -e list both full date and full time
952 -l use a long listing format
953 -n list numeric UIDs and GIDs instead of names
954 -p append indicator (one of /=@|) to entries
955 -u with -l: show access time (the time of last
956 access of the file)
957 -x list entries by lines instead of by columns
958 -A do not list implied . and ..
959 -C list entries by columns
960 -F append indicator (one of */=@|) to entries
John Beppu50ed0672000-04-13 23:44:04 +0000961
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000962-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000963
John Beppu46a4e762000-01-18 22:33:11 +0000964=item lsmod
965
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000966Usage: lsmod
John Beppu4581b4c2000-01-19 15:04:41 +0000967
Erik Andersen5e1189e2000-04-15 16:34:54 +0000968Shows a list of all currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000969
970-------------------------------
971
972=item makedevs
973
Erik Andersen5e1189e2000-04-15 16:34:54 +0000974Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
975
976Creates a range of block or character special files
977
978TYPEs include:
979
980 b: Make a block (buffered) device.
981 c or u: Make a character (un-buffered) device.
982 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
983
984FIRST specifies the number appended to NAME to create the first device.
985LAST specifies the number of the last item that should be created.
986If 's' is the last argument, the base device is created as well.
987
988Example:
989
990 $ makedevs /dev/ttyS c 4 66 2 63
991 [creates ttyS2-ttyS63]
992 $ makedevs /dev/hda b 3 0 0 8 s
993 [creates hda,hda1-hda8]
994
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000995-------------------------------
996
997=item math
998
Erik Andersen5e1189e2000-04-15 16:34:54 +0000999Usage: math expression ...
1000
1001This is a Tiny RPN calculator that understands the
1002following operations: +, -, /, *, and, or, not, eor.
1003
1004Example:
1005
1006 $ math 2 2 add
1007 4
1008 $ math 8 8 \* 2 2 + /
1009 16
1010 $ math 0 1 and
1011 0
1012 $ math 0 1 or
1013 1
1014
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001015-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001016
John Beppu46a4e762000-01-18 22:33:11 +00001017=item mkdir
1018
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001019Usage: mkdir [OPTION] DIRECTORY...
1020
John Beppu4581b4c2000-01-19 15:04:41 +00001021Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001022
John Beppu4581b4c2000-01-19 15:04:41 +00001023Options:
1024
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001025 -m set permission mode (as in chmod), not rwxrwxrwx - umask
1026 -p no error if dir exists, make parent directories as needed
1027
1028Example:
1029
1030 $ mkdir /tmp/foo
1031 $ mkdir /tmp/foo
1032 /tmp/foo: File exists
1033 $ mkdir /tmp/foo/bar/baz
1034 /tmp/foo/bar/baz: No such file or directory
1035 $ mkdir -p /tmp/foo/bar/baz
1036
1037-------------------------------
1038
1039=item mkfifo
1040
Erik Andersen5e1189e2000-04-15 16:34:54 +00001041Usage: mkfifo [OPTIONS] name
1042
1043Creates a named pipe (identical to 'mknod name p')
1044
1045Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001046
Erik Andersen5e1189e2000-04-15 16:34:54 +00001047 -m create the pipe using the specified mode (default a=rw)
1048
1049-------------------------------
1050
1051=item mkfs.minix
1052
1053Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1054
1055Make a MINIX filesystem.
1056
1057OPTIONS:
1058
1059 -c Check the device for bad blocks
1060 -n [14|30] Specify the maximum length of filenames
1061 -i Specify the number of inodes for the filesystem
1062 -l FILENAME Read the bad blocks list from FILENAME
1063 -v Make a Minix version 2 filesystem
1064
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001065-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001066
John Beppu46a4e762000-01-18 22:33:11 +00001067=item mknod
1068
Erik Andersen5e1189e2000-04-15 16:34:54 +00001069Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001070
Erik Andersen5e1189e2000-04-15 16:34:54 +00001071Create a special file (block, character, or pipe).
1072
1073Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001074
Erik Andersen5e1189e2000-04-15 16:34:54 +00001075 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001076
1077TYPEs include:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001078 b: Make a block (buffered) device.
1079 c or u: Make a character (un-buffered) device.
1080 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001081
1082Example:
1083
1084 $ mknod /dev/fd0 b 2 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00001085 $ mknod -m 644 /tmp/pipe p
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001086
1087-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001088
John Beppu46a4e762000-01-18 22:33:11 +00001089=item mkswap
1090
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001091Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1092
John Beppu4581b4c2000-01-19 15:04:41 +00001093Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001094
John Beppu4581b4c2000-01-19 15:04:41 +00001095Options:
1096
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001097 -c Check for read-ability.
1098 -v0 Make version 0 swap [max 128 Megs].
1099 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1100 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001101
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001102-------------------------------
1103
Erik Andersen227a59b2000-04-25 23:24:55 +00001104=item mktemp
1105
Erik Andersene31c0662000-05-02 05:32:07 +00001106Usage: mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001107
1108Creates a temporary file with its name based on TEMPLATE.
1109TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1110
1111Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001112
Erik Andersen227a59b2000-04-25 23:24:55 +00001113 $ mktemp /tmp/temp.XXXXXX
1114 /tmp/temp.mWiLjM
1115 $ ls -la /tmp/temp.mWiLjM
1116 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1117
1118-------------------------------
1119
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001120=item nc
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001121
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001122Usage: nc [IP] [port]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001123
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001124Netcat opens a pipe to IP:port
Erik Andersen5e1189e2000-04-15 16:34:54 +00001125
1126Example:
1127
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001128 $ nc foobar.somedomain.com 25
Erik Andersen5e1189e2000-04-15 16:34:54 +00001129 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1130 help
1131 214-Commands supported:
1132 214- HELO EHLO MAIL RCPT DATA AUTH
1133 214 NOOP QUIT RSET HELP
1134 quit
1135 221 foobar closing connection
1136
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001137-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001138
John Beppu46a4e762000-01-18 22:33:11 +00001139=item more
1140
John Beppu4581b4c2000-01-19 15:04:41 +00001141Usage: more [file ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001142
1143More is a filter for paging through text one screenful at a time.
1144
1145Example:
1146
1147 $ dmesg | more
John Beppu50ed0672000-04-13 23:44:04 +00001148
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 mount
1152
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001153Usage: mount [flags]
1154 mount [flags] device directory [B<-o> options,more-options]
John Beppu4581b4c2000-01-19 15:04:41 +00001155
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001156Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001157
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001158 -a: Mount all file systems in fstab.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001159 -o option: One of many filesystem options, listed below.
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001160 -r: Mount the filesystem read-only.
1161 -t fs-type: Specify the filesystem type.
1162 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001163
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001164Options for use with the "B<-o>" flag:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001165
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001166 async/sync: Writes are asynchronous / synchronous.
1167 atime/noatime: Enable / disable updates to inode access times.
1168 dev/nodev: Allow use of special device files / disallow them.
1169 exec/noexec: Allow use of executable files / disallow them.
1170 loop: Mounts a file via loop device.
1171 suid/nosuid: Allow set-user-id-root programs / disallow them.
1172 remount: Re-mount a currently-mounted filesystem, changing its flags.
1173 ro/rw: Mount for read-only / read-write.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001174 There are EVEN MORE flags that are specific to each filesystem.
1175 You'll have to see the written documentation for those.
1176
1177Example:
1178
1179 $ mount
1180 /dev/hda3 on / type minix (rw)
1181 proc on /proc type proc (rw)
1182 devpts on /dev/pts type devpts (rw)
1183 $ mount /dev/fd0 /mnt -t msdos -o ro
1184 $ mount /tmp/diskimage /opt -t ext2 -o loop
John Beppu50ed0672000-04-13 23:44:04 +00001185
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001186-------------------------------
1187
1188=item mt
1189
John Beppu9057b6a2000-04-16 10:22:28 +00001190Usage: mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001191
1192Control magnetic tape drive operation
1193
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001194-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001195
John Beppu46a4e762000-01-18 22:33:11 +00001196=item mv
1197
John Beppu4581b4c2000-01-19 15:04:41 +00001198Usage: mv SOURCE DEST
1199
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001200 or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001201
1202Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001203
1204Example:
1205
1206 $ mv /tmp/foo /bin/bar
John Beppu50ed0672000-04-13 23:44:04 +00001207
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001208-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001209
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001210=item nslookup
John Beppu46a4e762000-01-18 22:33:11 +00001211
Erik Andersen5e1189e2000-04-15 16:34:54 +00001212Usage: nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001213
Erik Andersen5e1189e2000-04-15 16:34:54 +00001214Queries the nameserver for the IP address of the given HOST
1215
1216Example:
1217
1218 $ nslookup localhost
1219 Server: default
1220 Address: default
1221
1222 Name: debian
1223 Address: 127.0.0.1
John Beppu46a4e762000-01-18 22:33:11 +00001224
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001225-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001226
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001227=item ping
1228
1229Usage: ping [OPTION]... host
1230
1231Send ICMP ECHO_REQUEST packets to network hosts.
1232
1233Options:
1234
1235 -c COUNT Send only COUNT pings.
1236 -q Quiet mode, only displays output at start
1237 and when finished.
1238Example:
1239
1240 $ ping localhost
1241 PING slag (127.0.0.1): 56 data bytes
1242 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1243
1244 --- debian ping statistics ---
1245 1 packets transmitted, 1 packets received, 0% packet loss
1246 round-trip min/avg/max = 20.1/20.1/20.1 ms
1247
1248-------------------------------
1249
Erik Andersen5e1189e2000-04-15 16:34:54 +00001250=item poweroff
1251
1252Shuts down the system, and requests that the kernel turn off power upon halting.
1253
1254-------------------------------
1255
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001256=item printf
1257
Erik Andersen5e1189e2000-04-15 16:34:54 +00001258Usage: printf format [argument...]
1259
1260Formats and prints the given data in a manner similar to the C printf command.
1261
1262Example:
1263
1264 $ printf "Val=%d\n" 5
1265 Val=5
1266
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001267-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001268
John Beppu46a4e762000-01-18 22:33:11 +00001269=item ps
1270
Erik Andersen5e1189e2000-04-15 16:34:54 +00001271Usage: ps
1272
1273Report process status
1274
1275This version of ps accepts no options.
1276
1277Example:
1278
1279 $ ps
1280 PID Uid Gid State Command
1281 1 root root S init
1282 2 root root S [kflushd]
1283 3 root root S [kupdate]
1284 4 root root S [kpiod]
1285 5 root root S [kswapd]
1286 742 andersen andersen S [bash]
1287 743 andersen andersen S -bash
1288 745 root root S [getty]
1289 2990 andersen andersen R ps
1290
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001291-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001292
John Beppu46a4e762000-01-18 22:33:11 +00001293=item pwd
1294
Erik Andersen5e1189e2000-04-15 16:34:54 +00001295Prints the full filename of the current working directory.
1296
1297Example:
1298
1299 $ pwd
1300 /root
1301
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001302-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001303
John Beppu46a4e762000-01-18 22:33:11 +00001304=item reboot
1305
Erik Andersen5e1189e2000-04-15 16:34:54 +00001306Instructs the kernel to reboot the system.
1307
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001308-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001309
John Beppu46a4e762000-01-18 22:33:11 +00001310=item rm
1311
Erik Andersen5e1189e2000-04-15 16:34:54 +00001312Usage: rm [OPTION]... FILE...
1313
1314Remove (unlink) the FILE(s).
1315
1316Options:
1317
1318 -f remove existing destinations, never prompt
1319 -r or -R remove the contents of directories recursively
1320
1321Example:
1322
1323 $ rm -rf /tmp/foo
1324
1325-------------------------------
1326
1327=item rmdir
1328
1329Usage: rmdir [OPTION]... DIRECTORY...
1330
1331Remove the DIRECTORY(ies), if they are empty.
1332
1333Example:
1334
1335 # rmdir /tmp/foo
1336
1337-------------------------------
1338
1339=item rmmod
1340
1341Usage: rmmod [OPTION]... [MODULE]...
1342
1343Unloads the specified kernel modules from the kernel.
1344
1345Options:
1346
1347 -a Try to remove all unused kernel modules.
1348
1349Example:
1350
1351 $ rmmod tulip
1352
1353-------------------------------
1354
1355=item sed
1356
John Beppu9057b6a2000-04-16 10:22:28 +00001357Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001358
1359Allowed sed scripts come in the following form:
1360
1361 'ADDR [!] COMMAND'
1362
1363 where address ADDR can be:
1364 NUMBER Match specified line number
1365 $ Match last line
1366 /REGEXP/ Match specified regexp
1367 (! inverts the meaning of the match)
1368
1369 and COMMAND can be:
1370 s/regexp/replacement/[igp]
1371 which attempt to match regexp against the pattern space
1372 and if successful replaces the matched portion with replacement.
1373
1374 aTEXT
1375 which appends TEXT after the pattern space
1376
1377Options:
1378
1379 -e add the script to the commands to be executed
1380 -n suppress automatic printing of pattern space
1381
1382This version of sed matches full regular expresions.
1383
1384Example:
1385
1386 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1387 bar
1388
1389-------------------------------
1390
Erik Andersen4f3f7572000-04-28 00:18:56 +00001391=item setkeycodes
1392
1393Usage: setkeycodes SCANCODE KEYCODE ...
1394
1395Set entries into the kernel's scancode-to-keycode map,
1396allowing unusual keyboards to generate usable keycodes.
1397
1398SCANCODE may be either xx or e0xx (hexadecimal),
1399and KEYCODE is given in decimal
1400
1401Example:
1402
1403 # setkeycodes e030 127
1404
1405-------------------------------
1406
Erik Andersen5e1189e2000-04-15 16:34:54 +00001407=item sh
1408
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001409Usage: sh
1410
1411lash -- the BusyBox LAme SHell (command interpreter)
1412
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001413This command does not yet have proper documentation.
1414
1415Use lash just as you would use any other shell. It properly handles pipes,
1416redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1417has a sufficient set of builtins to do what is needed. It does not (yet)
1418support Bourne Shell syntax. If you need things like "if-then-else", "while",
1419and such, use ash or bash. If you just need a very simple and extremely small
1420shell, this will do the job.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001421
1422-------------------------------
1423
1424=item sfdisk
1425
1426Usage: sfdisk [options] device ...
1427
1428device: something like /dev/hda or /dev/sda
1429
1430useful options:
1431
1432 -s [or --show-size]: list size of a partition
1433 -c [or --id]: print or change partition Id
1434 -l [or --list]: list partitions of each device
1435 -d [or --dump]: idem, but in a format suitable for later input
1436 -i [or --increment]: number cylinders etc. from 1 instead of from 0
1437 -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB
1438 -T [or --list-types]:list the known partition types
1439 -D [or --DOS]: for DOS-compatibility: waste a little space
1440 -R [or --re-read]: make kernel reread partition table
1441 -N# : change only the partition with number #
1442 -n : do not actually write to disk
1443 -O file : save the sectors that will be overwritten to file
1444 -I file : restore these sectors again
1445 -v [or --version]: print version
1446 -? [or --help]: print this message
1447
1448dangerous options:
1449
1450 -g [or --show-geometry]: print the kernel's idea of the geometry
1451 -x [or --show-extended]: also list extended partitions on output
1452
1453 or expect descriptors for them on input
1454 -L [or --Linux]: do not complain about things irrelevant for Linux
1455 -q [or --quiet]: suppress warning messages
1456 You can override the detected geometry using:
1457 -C# [or --cylinders #]:set the number of cylinders to use
1458 -H# [or --heads #]: set the number of heads to use
1459 -S# [or --sectors #]: set the number of sectors to use
1460
1461You can disable all consistency checking with:
1462
1463 -f [or --force]: do what I say, even if it is stupid
1464
1465-------------------------------
1466
1467=item sleep
1468
1469Usage: sleep N
1470
1471Pause for N seconds.
1472
1473Example:
1474
1475 $ sleep 2
1476 [2 second delay results]
1477
1478-------------------------------
1479
1480=item sort
1481
John Beppu9057b6a2000-04-16 10:22:28 +00001482Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001483
1484Sorts lines of text in the specified files
1485
1486Example:
1487
1488 $ echo -e "e\nf\nb\nd\nc\na" | sort
1489 a
1490 b
1491 c
1492 d
1493 e
1494 f
1495
1496-------------------------------
1497
1498=item sync
1499
1500Usage: sync
1501
1502Write all buffered filesystem blocks to disk.
1503
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001504-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001505
John Beppu46a4e762000-01-18 22:33:11 +00001506=item syslogd
1507
Erik Andersen5e1189e2000-04-15 16:34:54 +00001508Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001509
Erik Andersen5e1189e2000-04-15 16:34:54 +00001510Linux system and kernel (provides klogd) logging utility.
1511Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001512
Erik Andersen5e1189e2000-04-15 16:34:54 +00001513Options:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001514
Erik Andersen5e1189e2000-04-15 16:34:54 +00001515 -m Change the mark timestamp interval. default=20min. 0=off
1516 -n Do not fork into the background (for when run by init)
1517 -K Do not start up the klogd process (by default syslogd spawns klogd).
1518 -O Specify an alternate log file. default=/var/log/messages
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001519
1520-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001521
John Beppu46a4e762000-01-18 22:33:11 +00001522=item swapon
1523
Erik Andersen5e1189e2000-04-15 16:34:54 +00001524Usage: swapon [OPTION] [device]
1525
1526Start swapping virtual memory pages on the given device.
1527
1528Options:
1529
1530 -a Start swapping on all swap devices
1531
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001532-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001533
John Beppu46a4e762000-01-18 22:33:11 +00001534=item swapoff
1535
Erik Andersen5e1189e2000-04-15 16:34:54 +00001536Usage: swapoff [OPTION] [device]
1537
1538Stop swapping virtual memory pages on the given device.
1539
1540Options:
1541
1542 -a Stop swapping on all swap devices
1543
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001544-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001545
John Beppu46a4e762000-01-18 22:33:11 +00001546=item tail
1547
Erik Andersen5e1189e2000-04-15 16:34:54 +00001548Usage: tail [OPTION] [FILE]...
1549
1550Print last 10 lines of each FILE to standard output.
1551With more than one FILE, precede each with a header giving the
1552file name. With no FILE, or when FILE is -, read standard input.
1553
1554Options:
1555
1556 -n NUM Print last NUM lines instead of first 10
1557 -f Output data as the file grows. This version
1558 of 'tail -f' supports only one file at a time.
1559
1560Example:
1561
1562 $ tail -n 1 /etc/resolv.conf
1563 nameserver 10.0.0.1
1564
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001565-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001566
John Beppu46a4e762000-01-18 22:33:11 +00001567=item tar
1568
John Beppu9057b6a2000-04-16 10:22:28 +00001569Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001570
1571Create, extract, or list files from a tar file. Note that
1572this version of tar treats hard links as separate files.
1573
1574Main operation mode:
1575
1576 c create
1577 x extract
1578 t list
1579
1580File selection:
1581
1582 f name of tarfile or "-" for stdin
1583 O extract to stdout
1584 --exclude file to exclude
1585
1586Informative output:
1587
1588 v verbosely list files processed
1589
1590Example:
1591
1592 $ zcat /tmp/tarball.tar.gz | tar -xf -
1593 $ tar -cf /tmp/tarball.tar /usr/local
1594
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001595-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001596
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001597=item test, [
1598
Erik Andersen5e1189e2000-04-15 16:34:54 +00001599Usage: test EXPRESSION
1600or [ EXPRESSION ]
1601
1602Checks file types and compares values returning an exit
1603code determined by the value of EXPRESSION.
1604
1605Example:
1606
1607 $ test 1 -eq 2
1608 $ echo $?
1609 1
1610 $ test 1 -eq 1
1611 $ echo $?
1612 0
1613 $ [ -d /etc ]
1614 $ echo $?
1615 0
1616 $ [ -d /junk ]
1617 $ echo $?
1618 1
1619
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001620-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001621
John Beppu46a4e762000-01-18 22:33:11 +00001622=item tee
1623
Erik Andersen5e1189e2000-04-15 16:34:54 +00001624Usage: tee [OPTION]... [FILE]...
1625
1626Copy standard input to each FILE, and also to standard output.
1627
1628Options:
1629
1630 -a append to the given FILEs, do not overwrite
1631
1632Example:
1633
1634 $ echo "Hello" | tee /tmp/foo
1635 $ cat /tmp/foo
1636 Hello
1637
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001638-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001639
John Beppu46a4e762000-01-18 22:33:11 +00001640=item touch
1641
John Beppu9057b6a2000-04-16 10:22:28 +00001642Usage: touch [B<-c>] file [file ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001643
1644Update the last-modified date on (or create) the selected file[s].
1645
1646Example:
1647
1648 $ ls -l /tmp/foo
1649 /bin/ls: /tmp/foo: No such file or directory
1650 $ touch /tmp/foo
1651 $ ls -l /tmp/foo
1652 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1653
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001654-------------------------------
1655
1656=item tr
Erik Andersena19bc642000-05-02 06:40:02 +00001657
Erik Andersen3c1217c2000-05-01 22:34:24 +00001658Usage: tr [-cds] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001659
Erik Andersen3c1217c2000-05-01 22:34:24 +00001660Translate, squeeze, and/or delete characters from
1661standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001662
Erik Andersen3c1217c2000-05-01 22:34:24 +00001663Options:
1664
1665 -c take complement of STRING1
1666 -d delete input characters coded STRING1
1667 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00001668
1669Example:
1670
1671 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1672 hello world
1673
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001674-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001675
John Beppu46a4e762000-01-18 22:33:11 +00001676=item true
1677
Erik Andersen5e1189e2000-04-15 16:34:54 +00001678Returns an exit code of TRUE (0)
1679
1680Example:
1681
1682 $ true
1683 $ echo $?
1684 0
1685
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001686-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001687
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001688=item tty
John Beppu4581b4c2000-01-19 15:04:41 +00001689
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001690Usage: tty
1691
1692Print the file name of the terminal connected to standard input.
1693
1694Options:
1695
1696 -s print nothing, only return an exit status
1697
1698Example:
1699
1700 $ tty
1701 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00001702
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001703-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001704
John Beppu46a4e762000-01-18 22:33:11 +00001705=item umount
1706
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001707Usage: umount [flags] filesystem|directory
1708
1709Flags:
1710
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001711 -a: Unmount all file systems
1712 -r: Try to remount devices as read-only if mount is busy
1713 -f: Force filesystem umount (i.e. unreachable NFS server)
1714 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001715
1716Example:
1717
1718 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001719
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001720-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001721
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001722=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001723
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001724Usage: uname [OPTION]...
1725
Erik Andersen26702fe2000-04-17 16:44:46 +00001726Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001727
1728Options:
1729
1730 -a print all information
1731 -m the machine (hardware) type
1732 -n print the machine's network node hostname
1733 -r print the operating system release
1734 -s print the operating system name
1735 -p print the host processor type
1736 -v print the operating system version
1737
1738Example:
1739
1740 $ uname -a
1741 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001742
1743-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001744
John Beppu46a4e762000-01-18 22:33:11 +00001745=item uniq
1746
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001747Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1748
1749Discard all but one of successive identical lines from INPUT
1750(or standard input), writing to OUTPUT (or standard output).
1751
1752Example:
1753
1754 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1755 a
1756 b
1757 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001758
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001759-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001760
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001761=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001762
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001763Usage: update [options]
1764
1765Periodically flushes filesystem buffers.
1766
1767Options:
1768
1769 -S force use of sync(2) instead of flushing
1770 -s SECS call sync this often (default 30)
1771 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001772
1773-------------------------------
1774
1775=item uptime
1776
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001777Usage: uptime
1778
1779Tells how long the system has been running since boot.
1780
1781Example:
1782
1783 $ uptime
1784 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001785
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001786-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001787
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001788=item usleep
1789
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001790Usage: usleep N
1791
1792Pauses for N microseconds.
1793
1794Example:
1795
1796 $ usleep 1000000
1797 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001798
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001799-------------------------------
1800
1801=item wc
1802
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001803Usage: wc [OPTION]... [FILE]...
1804
1805Print line, word, and byte counts for each FILE, and a total line if
1806more than one FILE is specified. With no FILE, read standard input.
1807
1808Options:
1809
1810 -c print the byte counts
1811 -l print the newline counts
1812 -L print the length of the longest line
1813 -w print the word counts
1814
1815Example:
1816
1817 $ wc /etc/passwd
1818 31 46 1365 /etc/passwd
Erik Andersen5e1189e2000-04-15 16:34:54 +00001819
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001820-------------------------------
1821
1822=item whoami
1823
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001824Usage: whoami
1825
1826Prints the user name associated with the current effective user id.
1827
1828Example:
1829
1830 $ whoami
1831 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00001832
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001833-------------------------------
1834
1835=item yes
1836
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001837Usage: yes [OPTION]... [STRING]...
1838
1839Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001840
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001841-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00001842
1843=item zcat
1844
Erik Andersen26702fe2000-04-17 16:44:46 +00001845This is essentially an alias for invoking "gunzip B<-c>", where
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001846it decompresses the file inquestion and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001847
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001848-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001849
John Beppu46a4e762000-01-18 22:33:11 +00001850=back
John Beppu3a1b6be2000-01-18 15:45:59 +00001851
Erik Andersena19bc642000-05-02 06:40:02 +00001852=head1 LIBC NSS
1853
1854GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
1855library for the local environment, and to configure how it reads system data,
1856such as passwords and group information. BusyBox has made it Policy that it
1857will never use NSS, and will never use and libc calls that make use of NSS.
1858This allows you to run an embedded system without the need for installing an
1859/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
1860
1861If you are using a system that is using a remote LDAP server for authentication
1862via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
1863BusyBox source. Chances are though, that if you have enough space to install
1864of that stuff on your system, then you probably want the full GNU utilities.
1865
John Beppu3a1b6be2000-01-18 15:45:59 +00001866=head1 SEE ALSO
1867
1868textutils(1), shellutils(1), etc...
1869
1870=head1 MAINTAINER
1871
Erik Andersen1101d232000-04-19 05:15:12 +00001872Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001873
1874=head1 AUTHORS
1875
John Beppu08fe43d2000-01-19 12:39:16 +00001876The following people have contributed code to BusyBox whether
1877they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00001878
Erik Andersen1101d232000-04-19 05:15:12 +00001879Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001880
John Beppu08fe43d2000-01-19 12:39:16 +00001881=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001882
John Beppu08fe43d2000-01-19 12:39:16 +00001883John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001884
John Beppu08fe43d2000-01-19 12:39:16 +00001885=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001886
John Beppu08fe43d2000-01-19 12:39:16 +00001887Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001888
John Beppu08fe43d2000-01-19 12:39:16 +00001889=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001890
John Beppu08fe43d2000-01-19 12:39:16 +00001891Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001892
John Beppu08fe43d2000-01-19 12:39:16 +00001893=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001894
John Beppu08fe43d2000-01-19 12:39:16 +00001895Dave Cinege <dcinege@psychosis.com>
1896
1897=for html <br>
1898
John Beppu50ed0672000-04-13 23:44:04 +00001899Karl M. Hegbloom <karlheg@debian.org>
1900
1901=for html <br>
1902
John Beppu4fd10fc2000-04-17 05:13:59 +00001903John Lombardo <john@deltanet.com>
1904
1905=for html <br>
1906
John Beppu08fe43d2000-01-19 12:39:16 +00001907Bruce Perens <bruce@perens.com>
1908
1909=for html <br>
1910
1911Linus Torvalds <torvalds@transmeta.com>
1912
1913=for html <br>
1914
1915Charles P. Wright <cpwright@villagenet.com>
1916
1917=for html <br>
1918
1919Enrique Zanardi <ezanardi@ull.es>
1920
1921=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00001922
1923=cut
John Beppu08fe43d2000-01-19 12:39:16 +00001924
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001925# $Id: busybox.pod,v 1.31 2000/05/13 05:36:13 erik Exp $