blob: ff054086e16d8d067c9b8595dbbc567f5220a422 [file] [log] [blame]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001# vi: set sw=4 ts=4:
John Beppu08e7f752000-04-13 03:22:20 +00002
John Beppu3a1b6be2000-01-18 15:45:59 +00003=head1 NAME
4
Erik Andersencf8d38a2000-04-21 01:23:36 +00005BusyBox - The Swiss Army Knife of Embedded Linux
John Beppu3a1b6be2000-01-18 15:45:59 +00006
Erik Andersencf8d38a2000-04-21 01:23:36 +00007=head1 SYNTAX
John Beppu3a1b6be2000-01-18 15:45:59 +00008
Erik Andersencf8d38a2000-04-21 01:23:36 +00009 BusyBox <function> [arguments...] # or
John Beppu46a4e762000-01-18 22:33:11 +000010
11 <function> [arguments...] # if symlinked
John Beppu3a1b6be2000-01-18 15:45:59 +000012
13=head1 DESCRIPTION
14
Erik Andersencf8d38a2000-04-21 01:23:36 +000015BusyBox combines tiny versions of many common UNIX utilities into a single
16small executable. It provides minimalist replacements for most of the utilities
17you usually find in fileutils, shellutils, findutils, textutils, grep, gzip,
18tar, etc. BusyBox provides a fairly complete POSIX environment for any small
Eric Andersenf2fffef2000-06-05 17:23:06 +000019or emdedded system. The utilities in BusyBox generally have fewer options than
20their full-featured GNU cousins; however, the options that are included provide
Erik Andersene90f4042000-04-21 21:53:58 +000021the expected functionality and behave very much like their GNU counterparts.
Erik Andersen62dc17a2000-04-13 01:18:23 +000022
Erik Andersencf8d38a2000-04-21 01:23:36 +000023BusyBox has been written with size-optimization and limited resources in mind.
24It is also extremely modular so you can easily include or exclude commands (or
25features) at compile time. This makes it easy to customize your embedded
26systems. To create a working system, just add a kernel, a shell (such as ash),
27and an editor (such as elvis-tiny or ae).
28
29=head1 USAGE
30
31When you create a link to BusyBox for the function you wish to use, when BusyBox
32is called using that link it will behave as if the command itself has been invoked.
33
34For example, entering
35
36 ln -s ./BusyBox ls
Erik Andersen62dc17a2000-04-13 01:18:23 +000037 ./ls
38
39will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
Erik Andersencf8d38a2000-04-21 01:23:36 +000040into BusyBox).
Erik Andersen62dc17a2000-04-13 01:18:23 +000041
Erik Andersencf8d38a2000-04-21 01:23:36 +000042You can also invoke BusyBox by issuing the command as an argument on the
43command line. For example, entering
44
45 ./BusyBox ls
Erik Andersen62dc17a2000-04-13 01:18:23 +000046
47will also cause BusyBox to behave as 'ls'.
John Beppu08fe43d2000-01-19 12:39:16 +000048
Erik Anderseneef65802000-04-19 05:12:02 +000049=head1 COMMON OPTIONS
50
51Most BusyBox commands support the B<--help> option to provide a
52terse runtime description of their behavior.
53
John Beppu46a4e762000-01-18 22:33:11 +000054=head1 COMMANDS
55
Erik Andersen62dc17a2000-04-13 01:18:23 +000056Currently defined functions include:
57
Eric Andersen86ab8a32000-06-02 03:21:42 +000058ar, basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, cut, date, dd,
59df, dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
Erik Andersen5e1189e2000-04-15 16:34:54 +000060freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
Erik Andersen73c8c9c2000-05-13 05:36:13 +000061hostname, id, init, kill, killall, length, ln, loadacm, loadfont, loadkmap,
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
Eric Andersen86ab8a32000-06-02 03:21:42 +000072=item ar
73
74Usage: ar [optxvV] archive [filenames]
75
76Extract or list files from an ar archive.
77
78Options:
79
80 o preserve original dates
81 p extract to stdout
82 t list
83 x extract
84 v verbosely list files processed
85
86-------------------------------
87
Erik Andersen62dc17a2000-04-13 01:18:23 +000088=item basename
89
Erik Andersenac130e12000-05-10 05:00:31 +000090Usage: basename FILE [SUFFIX]
Erik Andersen62dc17a2000-04-13 01:18:23 +000091
Erik Andersenac130e12000-05-10 05:00:31 +000092Strips directory path and suffixes from FILE.
93If specified, also removes any trailing SUFFIX.
Erik Andersen62dc17a2000-04-13 01:18:23 +000094
95Example:
96
97 $ basename /usr/local/bin/foo
98 foo
99 $ basename /usr/local/bin/
100 bin
Erik Andersenac130e12000-05-10 05:00:31 +0000101 $ basename /foo/bar.txt .txt
102 bar
Erik Andersen62dc17a2000-04-13 01:18:23 +0000103
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000104-------------------------------
105
Erik Andersena6c75222000-04-18 00:00:52 +0000106=item cat
John Beppu46a4e762000-01-18 22:33:11 +0000107
Erik Andersencf8d38a2000-04-21 01:23:36 +0000108Usage: cat [FILE ...]
Erik Andersen62dc17a2000-04-13 01:18:23 +0000109
Erik Andersencf8d38a2000-04-21 01:23:36 +0000110Concatenates FILE(s) and prints them to the standard output.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000111
112Example:
113
114 $ cat /proc/uptime
115 110716.72 17.67
John Beppu4581b4c2000-01-19 15:04:41 +0000116
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000117-------------------------------
118
Erik Andersen5e1189e2000-04-15 16:34:54 +0000119=item chgrp
120
121Usage: chgrp [OPTION]... GROUP FILE...
122
123Change the group membership of each FILE to GROUP.
Erik Andersen26702fe2000-04-17 16:44:46 +0000124
Erik Andersen5e1189e2000-04-15 16:34:54 +0000125Options:
126
127 -R change files and directories recursively
Erik Andersen26702fe2000-04-17 16:44:46 +0000128
Erik Andersen5e1189e2000-04-15 16:34:54 +0000129Example:
130
131 $ ls -l /tmp/foo
132 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
133 $ chgrp root /tmp/foo
134 $ ls -l /tmp/foo
135 -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo
136
137-------------------------------
138
John Beppu46a4e762000-01-18 22:33:11 +0000139=item chmod
140
John Beppuf17792c2000-04-13 03:16:01 +0000141Usage: chmod [B<-R>] MODE[,MODE]... FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000142
Erik Andersencf8d38a2000-04-21 01:23:36 +0000143Changes file access permissions for the specified FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000144Each MODE is defined by combining the letters for WHO has access to the file,
145an OPERATOR for selecting how the permissions should be changed, and a
Erik Andersencf8d38a2000-04-21 01:23:36 +0000146PERISSION for FILE(s) (or directories).
Erik Andersen62dc17a2000-04-13 01:18:23 +0000147
Erik Andersencf8d38a2000-04-21 01:23:36 +0000148WHO may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000149
Erik Andersencf8d38a2000-04-21 01:23:36 +0000150 u User who owns the file
151 g Users in the file's Group
Erik Andersen62dc17a2000-04-13 01:18:23 +0000152 o Other users not in the file's group
153 a All users
154
Erik Andersencf8d38a2000-04-21 01:23:36 +0000155OPERATOR may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000156
Erik Andersencf8d38a2000-04-21 01:23:36 +0000157 + Add a permission
158 - Remove a permission
159 = Assign a permission
Erik Andersen62dc17a2000-04-13 01:18:23 +0000160
Erik Andersencf8d38a2000-04-21 01:23:36 +0000161PERMISSION may be chosen from
Erik Andersen62dc17a2000-04-13 01:18:23 +0000162
Erik Andersencf8d38a2000-04-21 01:23:36 +0000163 r Read
Erik Andersen62dc17a2000-04-13 01:18:23 +0000164 w Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000165 x Execute (or access for directories)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000166 s Set user (or group) ID bit
Erik Andersencf8d38a2000-04-21 01:23:36 +0000167 t Stickey bit (for directories prevents removing files by non-owners)
Erik Andersen62dc17a2000-04-13 01:18:23 +0000168
Erik Andersencf8d38a2000-04-21 01:23:36 +0000169Alternately, permissions can be set numerically where the first three
170numbers are calculated by adding the octal values, such as
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000171
Erik Andersen62dc17a2000-04-13 01:18:23 +0000172 4 Read
173 2 Write
Erik Andersencf8d38a2000-04-21 01:23:36 +0000174 1 Execute
Erik Andersen62dc17a2000-04-13 01:18:23 +0000175
Erik Andersencf8d38a2000-04-21 01:23:36 +0000176An optional fourth digit can also be used to specify
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000177
Erik Andersen62dc17a2000-04-13 01:18:23 +0000178 4 Set user ID
179 2 Set group ID
Erik Andersencf8d38a2000-04-21 01:23:36 +0000180 1 Stickey bit
Erik Andersen62dc17a2000-04-13 01:18:23 +0000181
John Beppu4581b4c2000-01-19 15:04:41 +0000182Options:
183
Erik Andersencf8d38a2000-04-21 01:23:36 +0000184 -R Change files and directories recursively.
John Beppu4581b4c2000-01-19 15:04:41 +0000185
Erik Andersen62dc17a2000-04-13 01:18:23 +0000186Example:
187
188 $ ls -l /tmp/foo
189 -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo
190 $ chmod u+x /tmp/foo
191 $ ls -l /tmp/foo
192 -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*
193 $ chmod 444 /tmp/foo
194 $ ls -l /tmp/foo
195 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000196
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000197-------------------------------
198
John Beppu46a4e762000-01-18 22:33:11 +0000199=item chown
200
Erik Andersencf8d38a2000-04-21 01:23:36 +0000201Usage: chown [OPTION]... OWNER[<.|:>[GROUP] FILE...
John Beppu4581b4c2000-01-19 15:04:41 +0000202
Erik Andersen62dc17a2000-04-13 01:18:23 +0000203Changes the owner and/or group of each FILE to OWNER and/or GROUP.
John Beppu5a50def2000-04-17 17:46:46 +0000204
John Beppu4581b4c2000-01-19 15:04:41 +0000205Options:
206
Erik Andersencf8d38a2000-04-21 01:23:36 +0000207 -R Changes files and directories recursively
Erik Andersen62dc17a2000-04-13 01:18:23 +0000208
209Example:
210
211 $ ls -l /tmp/foo
212 -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo
213 $ chown root /tmp/foo
214 $ ls -l /tmp/foo
215 -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo
216 $ chown root.root /tmp/foo
217 ls -l /tmp/foo
218 -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo
John Beppu4581b4c2000-01-19 15:04:41 +0000219
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000220-------------------------------
221
John Beppu46a4e762000-01-18 22:33:11 +0000222=item chroot
223
John Beppu4581b4c2000-01-19 15:04:41 +0000224Usage: chroot NEWROOT [COMMAND...]
225
226Run COMMAND with root directory set to NEWROOT.
227
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000228Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000229
230 $ ls -l /bin/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000231 lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox
Erik Andersen62dc17a2000-04-13 01:18:23 +0000232 $ mount /dev/hdc1 /mnt -t minix
233 $ chroot /mnt
234 $ ls -l /bin/ls
235 -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*
John Beppu4581b4c2000-01-19 15:04:41 +0000236
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000237-------------------------------
238
John Beppu46a4e762000-01-18 22:33:11 +0000239=item clear
240
Erik Andersen62dc17a2000-04-13 01:18:23 +0000241Clears the screen.
John Beppu4581b4c2000-01-19 15:04:41 +0000242
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000243-------------------------------
244
John Beppu46a4e762000-01-18 22:33:11 +0000245=item chvt
246
John Beppu4581b4c2000-01-19 15:04:41 +0000247Usage: chvt N
248
Erik Andersencf8d38a2000-04-21 01:23:36 +0000249Changes the foreground virtual terminal to /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000250
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000251-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000252
John Beppu46a4e762000-01-18 22:33:11 +0000253=item cp
254
John Beppu4581b4c2000-01-19 15:04:41 +0000255Usage: cp [OPTION]... SOURCE DEST
256
Erik Andersen62dc17a2000-04-13 01:18:23 +0000257 or: cp [OPTION]... SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +0000258
Erik Andersencf8d38a2000-04-21 01:23:36 +0000259Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
John Beppu4581b4c2000-01-19 15:04:41 +0000260
Erik Andersene31c0662000-05-02 05:32:07 +0000261Options:
262
Erik Andersencf8d38a2000-04-21 01:23:36 +0000263 -a Same as -dpR
264 -d Preserves links
265 -p Preserves file attributes if possable
266 -R Copies directories recursively
John Beppu4581b4c2000-01-19 15:04:41 +0000267
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000268-------------------------------
269
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000270=item cut
271
272Usage: cut [OPTION]... [FILE]...
273
274Prints selected fields from each input FILE to standard output.
275
276Options:
277
278 -b LIST Output only bytes from LIST
279 -c LIST Output only characters from LIST
280 -d DELIM Use DELIM instead of tab as the field delimiter
281 -f N Print only these fields
282 -n Ignored
283
284Example:
285
286 $ echo "Hello world" | cut -f 1 -d ' '
287 Hello
288 $ echo "Hello world" | cut -f 2 -d ' '
289 world
290
291
292-------------------------------
293
John Beppu46a4e762000-01-18 22:33:11 +0000294=item date
295
Erik Andersen62dc17a2000-04-13 01:18:23 +0000296Usage: date [OPTION]... [+FORMAT]
John Beppu4581b4c2000-01-19 15:04:41 +0000297
Erik Andersen62dc17a2000-04-13 01:18:23 +0000298 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
299
Erik Andersencf8d38a2000-04-21 01:23:36 +0000300Displays the current time in the given FORMAT, or sets the system date.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000301
302Options:
Erik Andersene31c0662000-05-02 05:32:07 +0000303
Erik Andersencf8d38a2000-04-21 01:23:36 +0000304 -R Outputs RFC-822 compliant date string
305 -s Sets time described by STRING
306 -u Prints or sets Coordinated Universal Time
Erik Andersen62dc17a2000-04-13 01:18:23 +0000307
308Example:
John Beppuf17792c2000-04-13 03:16:01 +0000309
Erik Andersen62dc17a2000-04-13 01:18:23 +0000310 $ date
311 Wed Apr 12 18:52:41 MDT 2000
John Beppu4581b4c2000-01-19 15:04:41 +0000312
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000313-------------------------------
314
John Beppu46a4e762000-01-18 22:33:11 +0000315=item dd
316
Erik Andersen62dc17a2000-04-13 01:18:23 +0000317Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
John Beppu4581b4c2000-01-19 15:04:41 +0000318
319Copy a file, converting and formatting according to options
320
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000321 if=FILE read from FILE instead of stdin
322 of=FILE write to FILE instead of stdout
323 bs=n read and write n bytes at a time
324 count=n copy only n input blocks
325 skip=n skip n input blocks
326 seek=n skip n output blocks
Erik Andersen62dc17a2000-04-13 01:18:23 +0000327
328Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
John Beppu4581b4c2000-01-19 15:04:41 +0000329
Erik Andersen62dc17a2000-04-13 01:18:23 +0000330Example:
331
332 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
333 4+0 records in
334 4+0 records out
335
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000336-------------------------------
337
John Beppu46a4e762000-01-18 22:33:11 +0000338=item df
339
Erik Andersen62dc17a2000-04-13 01:18:23 +0000340Usage: df [filesystem ...]
341
342Prints the filesystem space used and space available.
343
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000344Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000345
346 $ df
347 Filesystem 1k-blocks Used Available Use% Mounted on
348 /dev/sda3 8690864 8553540 137324 98% /
349 /dev/sda1 64216 36364 27852 57% /boot
350 $ df /dev/sda3
351 Filesystem 1k-blocks Used Available Use% Mounted on
352 /dev/sda3 8690864 8553540 137324 98% /
John Beppu4581b4c2000-01-19 15:04:41 +0000353
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000354-------------------------------
355
356=item dirname
357
358Usage: dirname NAME
359
360Strip non-directory suffix from file name
361
362Example:
363
364 $ dirname /tmp/foo
365 /tmp
366 $ dirname /tmp/foo/
367 /tmp
368
369-------------------------------
370
John Beppu46a4e762000-01-18 22:33:11 +0000371=item dmesg
372
John Beppuf17792c2000-04-13 03:16:01 +0000373Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
John Beppu4581b4c2000-01-19 15:04:41 +0000374
Erik Andersen62dc17a2000-04-13 01:18:23 +0000375Print or controls the kernel ring buffer.
John Beppu4581b4c2000-01-19 15:04:41 +0000376
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000377-------------------------------
378
John Beppu46a4e762000-01-18 22:33:11 +0000379=item du
380
Erik Andersen62dc17a2000-04-13 01:18:23 +0000381Usage: du [OPTION]... [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000382
Erik Andersen62dc17a2000-04-13 01:18:23 +0000383Summarize disk space used for each FILE and/or directory.
384Disk space is printed in units of 1k (i.e. 1024 bytes).
385
386Options:
John Beppuf17792c2000-04-13 03:16:01 +0000387
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000388 -l count sizes many times if hard linked
389 -s display only a total for each argument
Erik Andersen62dc17a2000-04-13 01:18:23 +0000390
391Example:
392
Erik Andersencf8d38a2000-04-21 01:23:36 +0000393 $ ./BusyBox du
Erik Andersen62dc17a2000-04-13 01:18:23 +0000394 16 ./CVS
395 12 ./kernel-patches/CVS
396 80 ./kernel-patches
397 12 ./tests/CVS
398 36 ./tests
399 12 ./scripts/CVS
400 16 ./scripts
401 12 ./docs/CVS
402 104 ./docs
403 2417 .
404
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000405-------------------------------
406
407=item dutmp
408
409Usage: dutmp [FILE]
410
411Dump utmp file format (pipe delimited) from FILE
412or stdin to stdout.
413
414Example:
415
416 $ dutmp /var/run/utmp
417 8|7||si|||0|0|0|955637625|760097|0
418 2|0|~|~~|reboot||0|0|0|955637625|782235|0
419 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
420 8|125||l4|||0|0|0|955637629|998367|0
421 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
422 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
423 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
424
425-------------------------------
426
427=item echo
428
429Usage: echo [-neE] [ARG ...]
430
431Prints the specified ARGs to stdout
432
433Options:
434
435 -n suppress trailing newline
436 -e interpret backslash-escaped characters (i.e. \t=tab etc)
437 -E disable interpretation of backslash-escaped characters
438
439Example:
440
441 $ echo "Erik is cool"
442 Erik is cool
443 $ echo -e "Erik\nis\ncool"
444 Erik
445 is
446 cool
447 $ echo "Erik\nis\ncool"
448 Erik\nis\ncool
449
450-------------------------------
451
452=item false
453
Erik Andersen5e1189e2000-04-15 16:34:54 +0000454Returns an exit code of FALSE (1)
455
456Example:
457
458 $ false
459 $ echo $?
460 1
461
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000462-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000463
John Beppu46a4e762000-01-18 22:33:11 +0000464=item fbset
465
John Beppu4581b4c2000-01-19 15:04:41 +0000466Usage: fbset [options] [mode]
467
Erik Andersen62dc17a2000-04-13 01:18:23 +0000468Show and modify frame buffer device settings
469
John Beppu4581b4c2000-01-19 15:04:41 +0000470Options:
471
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000472 -h
473 -fb
474 -db
475 -a
476 -i
477 -g
478 -t
479 -accel
480 -hsync
481 -vsync
482 -laced
483 -double
John Beppu4581b4c2000-01-19 15:04:41 +0000484
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000485Example:
486
487 $ fbset
488 mode "1024x768-76"
489 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
490 geometry 1024 768 1024 768 16
491 timings 12714 128 32 16 4 128 4
492 accel false
493 rgba 5/11,6/5,5/0,0/0
494 endmode
495
496-------------------------------
497
498=item fdflush
499
500Usage: fdflush device
501
502Force floppy disk drive to detect disk change
503
504-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000505
John Beppu46a4e762000-01-18 22:33:11 +0000506=item find
507
John Beppu4581b4c2000-01-19 15:04:41 +0000508Usage: find [PATH...] [EXPRESSION]
509
510Search for files in a directory hierarchy. The default PATH is
511the current directory; default EXPRESSION is '-print'
512
John Beppu4581b4c2000-01-19 15:04:41 +0000513
Erik Andersen62dc17a2000-04-13 01:18:23 +0000514EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000515
516 -follow Dereference symbolic links.
517 -name PATTERN File name (leading directories removed) matches PATTERN.
518 -print print the full file name followed by a newline to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000519
520Example:
521
522 $ find / -name /etc/passwd
523 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000524
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000525-------------------------------
526
John Beppu46a4e762000-01-18 22:33:11 +0000527=item free
528
John Beppu4581b4c2000-01-19 15:04:41 +0000529Usage: free
530
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000531Displays the amount of free and used system memory.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000532
533Example:
534
535 $ free
Erik Andersen5e1189e2000-04-15 16:34:54 +0000536 total used free shared buffers
Erik Andersen62dc17a2000-04-13 01:18:23 +0000537 Mem: 257628 248724 8904 59644 93124
538 Swap: 128516 8404 120112
539 Total: 386144 257128 129016
540
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000541-------------------------------
542
543=item freeramdisk
544
545Usage: freeramdisk DEVICE
546
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000547Frees all memory used by the specified ramdisk.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000548
549Example:
550
551 $ freeramdisk /dev/ram2
552
553-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000554
John Beppu46a4e762000-01-18 22:33:11 +0000555=item deallocvt
556
John Beppu4581b4c2000-01-19 15:04:41 +0000557Usage: deallocvt N
558
Erik Andersen62dc17a2000-04-13 01:18:23 +0000559Deallocates unused virtual terminal /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000560
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000561-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000562
John Beppu46a4e762000-01-18 22:33:11 +0000563=item fsck.minix
564
John Beppuf17792c2000-04-13 03:16:01 +0000565Usage: fsck.minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000566
567Performs a consistency check for MINIX filesystems.
568
Erik Andersen62dc17a2000-04-13 01:18:23 +0000569OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000570
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000571 -l Lists all filenames
572 -r Perform interactive repairs
573 -a Perform automatic repairs
574 -v verbose
575 -s Outputs super-block information
576 -m Activates MINIX-like "mode not cleared" warnings
577 -f Force file system check.
578
579-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000580
John Beppu46a4e762000-01-18 22:33:11 +0000581=item grep
582
Erik Andersen62dc17a2000-04-13 01:18:23 +0000583Usage: grep [OPTIONS]... PATTERN [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000584
Erik Andersen62dc17a2000-04-13 01:18:23 +0000585Search for PATTERN in each FILE or standard input.
586
587OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000588
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000589 -h suppress the prefixing filename on output
590 -i ignore case distinctions
591 -n print line number with output lines
592 -q be quiet. Returns 0 if result was found, 1 otherwise
Erik Andersena19bc642000-05-02 06:40:02 +0000593 -v select non-matching lines
Erik Andersen62dc17a2000-04-13 01:18:23 +0000594
595This version of grep matches full regular expresions.
596
Erik Andersen62dc17a2000-04-13 01:18:23 +0000597Example:
598
599 $ grep root /etc/passwd
600 root:x:0:0:root:/root:/bin/bash
601 $ grep ^[rR]oo. /etc/passwd
602 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000603
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000604-------------------------------
605
606=item gunzip
607
Erik Andersen5e1189e2000-04-15 16:34:54 +0000608Usage: gunzip [OPTION]... FILE
609
610Uncompress FILE (or standard input if FILE is '-').
611
612Options:
613
614 -c Write output to standard output
615 -t Test compressed file integrity
616
617Example:
618
Erik Andersencf8d38a2000-04-21 01:23:36 +0000619 $ ls -la /tmp/BusyBox*
620 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
621 $ gunzip /tmp/BusyBox-0.43.tar.gz
622 $ ls -la /tmp/BusyBox*
623 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000624
625-------------------------------
626
627=item gzip
628
Erik Andersen5e1189e2000-04-15 16:34:54 +0000629Usage: gzip [OPTION]... FILE
630
631Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000632When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000633
634Options:
635
636 -c Write output to standard output instead of FILE.gz
637
638Example:
639
Erik Andersencf8d38a2000-04-21 01:23:36 +0000640 $ ls -la /tmp/BusyBox*
641 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
642 $ gzip /tmp/BusyBox-0.43.tar
643 $ ls -la /tmp/BusyBox*
644 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen5e1189e2000-04-15 16:34:54 +0000645
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000646
647-------------------------------
648
649=item halt
650
Erik Andersen5e1189e2000-04-15 16:34:54 +0000651Usage: halt
652
653This comand halts the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000654
655-------------------------------
656
John Beppu46a4e762000-01-18 22:33:11 +0000657=item head
658
Erik Andersen62dc17a2000-04-13 01:18:23 +0000659Usage: head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000660
661Print first 10 lines of each FILE to standard output.
662With more than one FILE, precede each with a header giving the
663file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000664
665Options:
John Beppuf17792c2000-04-13 03:16:01 +0000666
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000667 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000668
669Example:
670
671 $ head -n 2 /etc/passwd
672 root:x:0:0:root:/root:/bin/bash
673 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000674
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000675-------------------------------
676
677=item hostid
678
Erik Andersen5e1189e2000-04-15 16:34:54 +0000679Usage: hostid
680
681Prints out a unique 32-bit identifier for the current
682machine. The 32-bit identifier is intended to be unique
683among all UNIX systems in existence.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000684
685-------------------------------
686
John Beppu46a4e762000-01-18 22:33:11 +0000687=item hostname
688
John Beppuf17792c2000-04-13 03:16:01 +0000689Usage: hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000690
John Beppu4581b4c2000-01-19 15:04:41 +0000691Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000692(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000693
Erik Andersen62dc17a2000-04-13 01:18:23 +0000694Options:
John Beppuf17792c2000-04-13 03:16:01 +0000695
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000696 -s Short
697 -i Addresses for the hostname
698 -d DNS domain name
699 -F FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000700
701Example:
702
703 $ hostname
704 slag
John Beppu46a4e762000-01-18 22:33:11 +0000705
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000706-------------------------------
707
Erik Andersen73c8c9c2000-05-13 05:36:13 +0000708=item id
709
710Print information for USERNAME or the current user
711
712Options:
713
714 -g prints only the group ID
715 -u prints only the user ID
716 -r prints the real user ID instead of the effective ID (with -ug)
717
718Example:
719
720 $ id
721 uid=1000(andersen) gid=1000(andersen)
722
723-------------------------------
724
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000725=item init
726
Erik Andersen5e1189e2000-04-15 16:34:54 +0000727Usage: init
728
729Init is the parent of all processes.
730
731This version of init is designed to be run only by the kernel.
732
733BusyBox init doesn't support multiple runlevels. The runlevels field of
734the /etc/inittab file is completely ignored by BusyBox init. If you want
735runlevels, use sysvinit.
736
737BusyBox init works just fine without an inittab. If no inittab is found,
738it has the following default behavior:
739
740 ::sysinit:/etc/init.d/rcS
741 ::askfirst:/bin/sh
742
743if it detects that /dev/console is _not_ a serial console, it will also run:
744
745 tty2::askfirst:/bin/sh
746
747If you choose to use an /etc/inittab file, the inittab entry format is as follows:
748
749 <id>:<runlevels>:<action>:<process>
750
751 <id>:
752
753 WARNING: This field has a non-traditional meaning for BusyBox init!
754 The id field is used by BusyBox init to specify the controlling tty for
755 the specified process to run on. The contents of this field are
756 appended to "/dev/" and used as-is. There is no need for this field to
757 be unique, although if it isn't you may have strange results. If this
758 field is left blank, it is completely ignored. Also note that if
759 BusyBox detects that a serial console is in use, then all entries
760 containing non-empty id fields will _not_ be run. BusyBox init does
761 nothing with utmp. We don't need no stinkin' utmp.
762
763 <runlevels>:
764
765 The runlevels field is completely ignored.
766
767 <action>:
768
769 Valid actions include: sysinit, respawn, askfirst, wait,
770 once, and ctrlaltdel.
771
772 askfirst acts just like respawn, but before running the specified
773 process it displays the line "Please press Enter to activate this
774 console." and then waits for the user to press enter before starting
775 the specified process.
776
777 Unrecognised actions (like initdefault) will cause init to emit
778 an error message, and then go along with its business.
779
780 <process>:
781
782 Specifies the process to be executed and it's command line.
783
784
785Example /etc/inittab file:
786
787 # This is run first except when booting in single-user mode.
788 #
789 ::sysinit:/etc/init.d/rcS
790
791 # /bin/sh invocations on selected ttys
792 #
793 # Start an "askfirst" shell on the console (whatever that may be)
794 ::askfirst:/bin/sh
795 # Start an "askfirst" shell on /dev/tty2
796 tty2::askfirst:/bin/sh
797
798 # /sbin/getty invocations for selected ttys
799 #
800 tty4::respawn:/sbin/getty 38400 tty4
801 tty5::respawn:/sbin/getty 38400 tty5
802
803
804 # Example of how to put a getty on a serial line (for a terminal)
805 #
806 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
807 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
808 #
809 # Example how to put a getty on a modem line.
810 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
811
812 # Stuff to do before rebooting
813 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
814 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000815
816-------------------------------
817
John Beppu46a4e762000-01-18 22:33:11 +0000818=item kill
819
John Beppuf17792c2000-04-13 03:16:01 +0000820Usage: kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000821
Erik Andersen62dc17a2000-04-13 01:18:23 +0000822Send a signal (default is SIGTERM) to the specified process(es).
823
824Options:
John Beppuf17792c2000-04-13 03:16:01 +0000825
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000826 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000827
828Example:
829
830 $ ps | grep apache
831 252 root root S [apache]
832 263 www-data www-data S [apache]
833 264 www-data www-data S [apache]
834 265 www-data www-data S [apache]
835 266 www-data www-data S [apache]
836 267 www-data www-data S [apache]
837 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +0000838
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000839-------------------------------
840
841=item killall
842
John Beppu9057b6a2000-04-16 10:22:28 +0000843Usage: killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +0000844
845Send a signal (default is SIGTERM) to the specified process(es).
846
847Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000848
Erik Andersen5e1189e2000-04-15 16:34:54 +0000849 -l List all signal names and numbers.
850
851Example:
852
853 $ killall apache
854
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000855-------------------------------
856
857=item length
858
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000859Usage: length STRING
Erik Andersen5e1189e2000-04-15 16:34:54 +0000860
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000861Prints out the length of the specified STRING.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000862
863Example:
Erik Andersena19bc642000-05-02 06:40:02 +0000864
Erik Andersen5e1189e2000-04-15 16:34:54 +0000865 $ length "Hello"
866 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000867
868-------------------------------
869
John Beppu46a4e762000-01-18 22:33:11 +0000870=item ln
871
John Beppu4581b4c2000-01-19 15:04:41 +0000872Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +0000873
John Beppu4581b4c2000-01-19 15:04:41 +0000874Create a link named LINK_NAME or DIRECTORY to the specified TARGET
875
876Options:
877
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000878 -s make symbolic links instead of hard links
879 -f remove existing destination files
John Beppu4581b4c2000-01-19 15:04:41 +0000880
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000881Example:
882
Erik Andersencf8d38a2000-04-21 01:23:36 +0000883 $ ln -s BusyBox /tmp/ls
Erik Andersena19bc642000-05-02 06:40:02 +0000884 $ ls -l /tmp/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000885 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000886
887-------------------------------
888
889=item loadacm
890
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000891Usage: loadacm
892
893Loads an acm from standard input.
894
895Example:
896
897 $ loadacm < /etc/i18n/acmname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000898
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000899-------------------------------
900
901=item loadfont
902
Erik Andersena6c75222000-04-18 00:00:52 +0000903Usage: loadfont
904
905Loads a console font from standard input.
906
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000907Example:
908
909 $ loadfont < /etc/i18n/fontname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000910
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000911-------------------------------
912
913=item loadkmap
914
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000915Usage: loadkmap
916
917Loads a binary keyboard translation table from standard input.
918
919Example:
920
921 $ loadkmap < /etc/i18n/lang-keymap
Erik Andersen5e1189e2000-04-15 16:34:54 +0000922
923-------------------------------
924
925=item logger
926
927Usage: logger [OPTION]... [MESSAGE]
928
929Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
930
931Options:
932
933 -s Log to stderr as well as the system log.
934 -t Log using the specified tag (defaults to user name).
935 -p Enter the message with the specified priority.
936 This may be numerical or a ``facility.level'' pair.
937
938Example:
939
940 $ logger "hello"
941
942-------------------------------
943
944=item logname
945
946Usage: logname
947
948Print the name of the current user.
949
950Example:
951
952 $ logname
953 root
954
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000955-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000956
John Beppu46a4e762000-01-18 22:33:11 +0000957=item ls
958
Eric Andersena42982e2000-06-07 17:28:53 +0000959Usage: ls [B<-1acdelnpuxACFR>] [filenames...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000960
961Options:
962
963 -a do not hide entries starting with .
964 -c with -l: show ctime (the time of last
965 modification of file status information)
966 -d list directory entries instead of contents
967 -e list both full date and full time
968 -l use a long listing format
969 -n list numeric UIDs and GIDs instead of names
970 -p append indicator (one of /=@|) to entries
971 -u with -l: show access time (the time of last
972 access of the file)
973 -x list entries by lines instead of by columns
974 -A do not list implied . and ..
975 -C list entries by columns
976 -F append indicator (one of */=@|) to entries
Eric Andersena42982e2000-06-07 17:28:53 +0000977 -R list subdirectories recursively
John Beppu50ed0672000-04-13 23:44:04 +0000978
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000979-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000980
John Beppu46a4e762000-01-18 22:33:11 +0000981=item lsmod
982
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000983Usage: lsmod
John Beppu4581b4c2000-01-19 15:04:41 +0000984
Erik Andersen5e1189e2000-04-15 16:34:54 +0000985Shows a list of all currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000986
987-------------------------------
988
989=item makedevs
990
Erik Andersen5e1189e2000-04-15 16:34:54 +0000991Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
992
993Creates a range of block or character special files
994
995TYPEs include:
996
997 b: Make a block (buffered) device.
998 c or u: Make a character (un-buffered) device.
999 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
1000
1001FIRST specifies the number appended to NAME to create the first device.
1002LAST specifies the number of the last item that should be created.
1003If 's' is the last argument, the base device is created as well.
1004
1005Example:
1006
1007 $ makedevs /dev/ttyS c 4 66 2 63
1008 [creates ttyS2-ttyS63]
1009 $ makedevs /dev/hda b 3 0 0 8 s
1010 [creates hda,hda1-hda8]
1011
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001012-------------------------------
1013
1014=item math
1015
Erik Andersen5e1189e2000-04-15 16:34:54 +00001016Usage: math expression ...
1017
1018This is a Tiny RPN calculator that understands the
1019following operations: +, -, /, *, and, or, not, eor.
1020
1021Example:
1022
1023 $ math 2 2 add
1024 4
1025 $ math 8 8 \* 2 2 + /
1026 16
1027 $ math 0 1 and
1028 0
1029 $ math 0 1 or
1030 1
1031
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001032-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001033
John Beppu46a4e762000-01-18 22:33:11 +00001034=item mkdir
1035
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001036Usage: mkdir [OPTION] DIRECTORY...
1037
John Beppu4581b4c2000-01-19 15:04:41 +00001038Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001039
John Beppu4581b4c2000-01-19 15:04:41 +00001040Options:
1041
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001042 -m set permission mode (as in chmod), not rwxrwxrwx - umask
1043 -p no error if dir exists, make parent directories as needed
1044
1045Example:
1046
1047 $ mkdir /tmp/foo
1048 $ mkdir /tmp/foo
1049 /tmp/foo: File exists
1050 $ mkdir /tmp/foo/bar/baz
1051 /tmp/foo/bar/baz: No such file or directory
1052 $ mkdir -p /tmp/foo/bar/baz
1053
1054-------------------------------
1055
1056=item mkfifo
1057
Erik Andersen5e1189e2000-04-15 16:34:54 +00001058Usage: mkfifo [OPTIONS] name
1059
1060Creates a named pipe (identical to 'mknod name p')
1061
1062Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001063
Erik Andersen5e1189e2000-04-15 16:34:54 +00001064 -m create the pipe using the specified mode (default a=rw)
1065
1066-------------------------------
1067
1068=item mkfs.minix
1069
1070Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1071
1072Make a MINIX filesystem.
1073
1074OPTIONS:
1075
1076 -c Check the device for bad blocks
1077 -n [14|30] Specify the maximum length of filenames
1078 -i Specify the number of inodes for the filesystem
1079 -l FILENAME Read the bad blocks list from FILENAME
1080 -v Make a Minix version 2 filesystem
1081
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001082-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001083
John Beppu46a4e762000-01-18 22:33:11 +00001084=item mknod
1085
Erik Andersen5e1189e2000-04-15 16:34:54 +00001086Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001087
Erik Andersen5e1189e2000-04-15 16:34:54 +00001088Create a special file (block, character, or pipe).
1089
1090Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001091
Erik Andersen5e1189e2000-04-15 16:34:54 +00001092 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001093
1094TYPEs include:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001095 b: Make a block (buffered) device.
1096 c or u: Make a character (un-buffered) device.
1097 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001098
1099Example:
1100
1101 $ mknod /dev/fd0 b 2 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00001102 $ mknod -m 644 /tmp/pipe p
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001103
1104-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001105
John Beppu46a4e762000-01-18 22:33:11 +00001106=item mkswap
1107
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001108Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1109
John Beppu4581b4c2000-01-19 15:04:41 +00001110Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001111
John Beppu4581b4c2000-01-19 15:04:41 +00001112Options:
1113
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001114 -c Check for read-ability.
1115 -v0 Make version 0 swap [max 128 Megs].
1116 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1117 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001118
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001119-------------------------------
1120
Erik Andersen227a59b2000-04-25 23:24:55 +00001121=item mktemp
1122
Erik Andersene31c0662000-05-02 05:32:07 +00001123Usage: mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001124
1125Creates a temporary file with its name based on TEMPLATE.
1126TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1127
1128Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001129
Erik Andersen227a59b2000-04-25 23:24:55 +00001130 $ mktemp /tmp/temp.XXXXXX
1131 /tmp/temp.mWiLjM
1132 $ ls -la /tmp/temp.mWiLjM
1133 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1134
1135-------------------------------
1136
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001137=item nc
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001138
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001139Usage: nc [IP] [port]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001140
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001141Netcat opens a pipe to IP:port
Erik Andersen5e1189e2000-04-15 16:34:54 +00001142
1143Example:
1144
Erik Andersen73c8c9c2000-05-13 05:36:13 +00001145 $ nc foobar.somedomain.com 25
Erik Andersen5e1189e2000-04-15 16:34:54 +00001146 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1147 help
1148 214-Commands supported:
1149 214- HELO EHLO MAIL RCPT DATA AUTH
1150 214 NOOP QUIT RSET HELP
1151 quit
1152 221 foobar closing connection
1153
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001154-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001155
John Beppu46a4e762000-01-18 22:33:11 +00001156=item more
1157
John Beppu4581b4c2000-01-19 15:04:41 +00001158Usage: more [file ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001159
1160More is a filter for paging through text one screenful at a time.
1161
1162Example:
1163
1164 $ dmesg | more
John Beppu50ed0672000-04-13 23:44:04 +00001165
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001166-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001167
John Beppu46a4e762000-01-18 22:33:11 +00001168=item mount
1169
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001170Usage: mount [flags]
1171 mount [flags] device directory [B<-o> options,more-options]
John Beppu4581b4c2000-01-19 15:04:41 +00001172
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001173Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001174
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001175 -a: Mount all file systems in fstab.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001176 -o option: One of many filesystem options, listed below.
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001177 -r: Mount the filesystem read-only.
1178 -t fs-type: Specify the filesystem type.
1179 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001180
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001181Options for use with the "B<-o>" flag:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001182
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001183 async/sync: Writes are asynchronous / synchronous.
1184 atime/noatime: Enable / disable updates to inode access times.
1185 dev/nodev: Allow use of special device files / disallow them.
1186 exec/noexec: Allow use of executable files / disallow them.
1187 loop: Mounts a file via loop device.
1188 suid/nosuid: Allow set-user-id-root programs / disallow them.
1189 remount: Re-mount a currently-mounted filesystem, changing its flags.
1190 ro/rw: Mount for read-only / read-write.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001191 There are EVEN MORE flags that are specific to each filesystem.
1192 You'll have to see the written documentation for those.
1193
1194Example:
1195
1196 $ mount
1197 /dev/hda3 on / type minix (rw)
1198 proc on /proc type proc (rw)
1199 devpts on /dev/pts type devpts (rw)
1200 $ mount /dev/fd0 /mnt -t msdos -o ro
1201 $ mount /tmp/diskimage /opt -t ext2 -o loop
John Beppu50ed0672000-04-13 23:44:04 +00001202
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001203-------------------------------
1204
1205=item mt
1206
John Beppu9057b6a2000-04-16 10:22:28 +00001207Usage: mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001208
1209Control magnetic tape drive operation
1210
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001211-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001212
John Beppu46a4e762000-01-18 22:33:11 +00001213=item mv
1214
John Beppu4581b4c2000-01-19 15:04:41 +00001215Usage: mv SOURCE DEST
1216
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001217 or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001218
1219Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001220
1221Example:
1222
1223 $ mv /tmp/foo /bin/bar
John Beppu50ed0672000-04-13 23:44:04 +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 nslookup
John Beppu46a4e762000-01-18 22:33:11 +00001228
Erik Andersen5e1189e2000-04-15 16:34:54 +00001229Usage: nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001230
Erik Andersen5e1189e2000-04-15 16:34:54 +00001231Queries the nameserver for the IP address of the given HOST
1232
1233Example:
1234
1235 $ nslookup localhost
1236 Server: default
1237 Address: default
1238
1239 Name: debian
1240 Address: 127.0.0.1
John Beppu46a4e762000-01-18 22:33:11 +00001241
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001242-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001243
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001244=item ping
1245
1246Usage: ping [OPTION]... host
1247
1248Send ICMP ECHO_REQUEST packets to network hosts.
1249
1250Options:
1251
1252 -c COUNT Send only COUNT pings.
Pavel Roskin0024abc2000-06-07 20:38:15 +00001253 -s SIZE Send SIZE data bytes in packets (default=56).
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001254 -q Quiet mode, only displays output at start
1255 and when finished.
1256Example:
1257
1258 $ ping localhost
1259 PING slag (127.0.0.1): 56 data bytes
1260 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1261
1262 --- debian ping statistics ---
1263 1 packets transmitted, 1 packets received, 0% packet loss
1264 round-trip min/avg/max = 20.1/20.1/20.1 ms
1265
1266-------------------------------
1267
Erik Andersen5e1189e2000-04-15 16:34:54 +00001268=item poweroff
1269
1270Shuts down the system, and requests that the kernel turn off power upon halting.
1271
1272-------------------------------
1273
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001274=item printf
1275
Erik Andersen5e1189e2000-04-15 16:34:54 +00001276Usage: printf format [argument...]
1277
1278Formats and prints the given data in a manner similar to the C printf command.
1279
1280Example:
1281
1282 $ printf "Val=%d\n" 5
1283 Val=5
1284
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001285-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001286
John Beppu46a4e762000-01-18 22:33:11 +00001287=item ps
1288
Erik Andersen5e1189e2000-04-15 16:34:54 +00001289Usage: ps
1290
1291Report process status
1292
1293This version of ps accepts no options.
1294
1295Example:
1296
1297 $ ps
1298 PID Uid Gid State Command
1299 1 root root S init
1300 2 root root S [kflushd]
1301 3 root root S [kupdate]
1302 4 root root S [kpiod]
1303 5 root root S [kswapd]
1304 742 andersen andersen S [bash]
1305 743 andersen andersen S -bash
1306 745 root root S [getty]
1307 2990 andersen andersen R ps
1308
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001309-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001310
John Beppu46a4e762000-01-18 22:33:11 +00001311=item pwd
1312
Erik Andersen5e1189e2000-04-15 16:34:54 +00001313Prints the full filename of the current working directory.
1314
1315Example:
1316
1317 $ pwd
1318 /root
1319
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001320-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001321
John Beppu46a4e762000-01-18 22:33:11 +00001322=item reboot
1323
Erik Andersen5e1189e2000-04-15 16:34:54 +00001324Instructs the kernel to reboot the system.
1325
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001326-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001327
John Beppu46a4e762000-01-18 22:33:11 +00001328=item rm
1329
Erik Andersen5e1189e2000-04-15 16:34:54 +00001330Usage: rm [OPTION]... FILE...
1331
Eric Andersen815e9042000-06-06 16:15:23 +00001332Remove (unlink) the FILE(s). You may use '--' to
1333indicate that all following arguments are non-options.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001334
1335Options:
1336
1337 -f remove existing destinations, never prompt
1338 -r or -R remove the contents of directories recursively
1339
1340Example:
1341
1342 $ rm -rf /tmp/foo
1343
1344-------------------------------
1345
1346=item rmdir
1347
1348Usage: rmdir [OPTION]... DIRECTORY...
1349
1350Remove the DIRECTORY(ies), if they are empty.
1351
1352Example:
1353
1354 # rmdir /tmp/foo
1355
1356-------------------------------
1357
1358=item rmmod
1359
1360Usage: rmmod [OPTION]... [MODULE]...
1361
1362Unloads the specified kernel modules from the kernel.
1363
1364Options:
1365
1366 -a Try to remove all unused kernel modules.
1367
1368Example:
1369
1370 $ rmmod tulip
1371
1372-------------------------------
1373
1374=item sed
1375
John Beppu9057b6a2000-04-16 10:22:28 +00001376Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001377
1378Allowed sed scripts come in the following form:
1379
1380 'ADDR [!] COMMAND'
1381
1382 where address ADDR can be:
1383 NUMBER Match specified line number
1384 $ Match last line
1385 /REGEXP/ Match specified regexp
1386 (! inverts the meaning of the match)
1387
1388 and COMMAND can be:
1389 s/regexp/replacement/[igp]
1390 which attempt to match regexp against the pattern space
1391 and if successful replaces the matched portion with replacement.
1392
1393 aTEXT
1394 which appends TEXT after the pattern space
1395
1396Options:
1397
1398 -e add the script to the commands to be executed
1399 -n suppress automatic printing of pattern space
1400
1401This version of sed matches full regular expresions.
1402
1403Example:
1404
1405 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1406 bar
1407
1408-------------------------------
1409
Erik Andersen4f3f7572000-04-28 00:18:56 +00001410=item setkeycodes
1411
1412Usage: setkeycodes SCANCODE KEYCODE ...
1413
1414Set entries into the kernel's scancode-to-keycode map,
1415allowing unusual keyboards to generate usable keycodes.
1416
1417SCANCODE may be either xx or e0xx (hexadecimal),
1418and KEYCODE is given in decimal
1419
1420Example:
1421
1422 # setkeycodes e030 127
1423
1424-------------------------------
1425
Erik Andersen5e1189e2000-04-15 16:34:54 +00001426=item sh
1427
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001428Usage: sh
1429
1430lash -- the BusyBox LAme SHell (command interpreter)
1431
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001432This command does not yet have proper documentation.
1433
1434Use lash just as you would use any other shell. It properly handles pipes,
1435redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1436has a sufficient set of builtins to do what is needed. It does not (yet)
1437support Bourne Shell syntax. If you need things like "if-then-else", "while",
1438and such, use ash or bash. If you just need a very simple and extremely small
1439shell, this will do the job.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001440
1441-------------------------------
1442
1443=item sfdisk
1444
1445Usage: sfdisk [options] device ...
1446
1447device: something like /dev/hda or /dev/sda
1448
1449useful options:
1450
1451 -s [or --show-size]: list size of a partition
1452 -c [or --id]: print or change partition Id
1453 -l [or --list]: list partitions of each device
1454 -d [or --dump]: idem, but in a format suitable for later input
1455 -i [or --increment]: number cylinders etc. from 1 instead of from 0
1456 -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB
1457 -T [or --list-types]:list the known partition types
1458 -D [or --DOS]: for DOS-compatibility: waste a little space
1459 -R [or --re-read]: make kernel reread partition table
1460 -N# : change only the partition with number #
1461 -n : do not actually write to disk
1462 -O file : save the sectors that will be overwritten to file
1463 -I file : restore these sectors again
1464 -v [or --version]: print version
1465 -? [or --help]: print this message
1466
1467dangerous options:
1468
1469 -g [or --show-geometry]: print the kernel's idea of the geometry
1470 -x [or --show-extended]: also list extended partitions on output
1471
1472 or expect descriptors for them on input
1473 -L [or --Linux]: do not complain about things irrelevant for Linux
1474 -q [or --quiet]: suppress warning messages
1475 You can override the detected geometry using:
1476 -C# [or --cylinders #]:set the number of cylinders to use
1477 -H# [or --heads #]: set the number of heads to use
1478 -S# [or --sectors #]: set the number of sectors to use
1479
1480You can disable all consistency checking with:
1481
1482 -f [or --force]: do what I say, even if it is stupid
1483
1484-------------------------------
1485
1486=item sleep
1487
1488Usage: sleep N
1489
1490Pause for N seconds.
1491
1492Example:
1493
1494 $ sleep 2
1495 [2 second delay results]
1496
1497-------------------------------
1498
1499=item sort
1500
John Beppu9057b6a2000-04-16 10:22:28 +00001501Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001502
1503Sorts lines of text in the specified files
1504
1505Example:
1506
1507 $ echo -e "e\nf\nb\nd\nc\na" | sort
1508 a
1509 b
1510 c
1511 d
1512 e
1513 f
1514
1515-------------------------------
1516
1517=item sync
1518
1519Usage: sync
1520
1521Write all buffered filesystem blocks to disk.
1522
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001523-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001524
John Beppu46a4e762000-01-18 22:33:11 +00001525=item syslogd
1526
Erik Andersen5e1189e2000-04-15 16:34:54 +00001527Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001528
Erik Andersen5e1189e2000-04-15 16:34:54 +00001529Linux system and kernel (provides klogd) logging utility.
1530Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001531
Erik Andersen5e1189e2000-04-15 16:34:54 +00001532Options:
Pavel Roskin049b7062000-06-07 21:19:49 +00001533
Pavel Roskinda10ec02000-06-07 21:08:25 +00001534 -m NUM Interval between MARK lines (default=20min, 0=off)
1535 -n Run as a foreground process
1536 -K Do not start up the klogd process
1537 -O FILE Use an alternate log file (default=/var/log/messages)
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001538
1539-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001540
John Beppu46a4e762000-01-18 22:33:11 +00001541=item swapon
1542
Erik Andersen5e1189e2000-04-15 16:34:54 +00001543Usage: swapon [OPTION] [device]
1544
1545Start swapping virtual memory pages on the given device.
1546
1547Options:
1548
1549 -a Start swapping on all swap devices
1550
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001551-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001552
John Beppu46a4e762000-01-18 22:33:11 +00001553=item swapoff
1554
Erik Andersen5e1189e2000-04-15 16:34:54 +00001555Usage: swapoff [OPTION] [device]
1556
1557Stop swapping virtual memory pages on the given device.
1558
1559Options:
1560
1561 -a Stop swapping on all swap devices
1562
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001563-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001564
John Beppu46a4e762000-01-18 22:33:11 +00001565=item tail
1566
Erik Andersen5e1189e2000-04-15 16:34:54 +00001567Usage: tail [OPTION] [FILE]...
1568
1569Print last 10 lines of each FILE to standard output.
1570With more than one FILE, precede each with a header giving the
1571file name. With no FILE, or when FILE is -, read standard input.
1572
1573Options:
1574
1575 -n NUM Print last NUM lines instead of first 10
1576 -f Output data as the file grows. This version
1577 of 'tail -f' supports only one file at a time.
1578
1579Example:
1580
1581 $ tail -n 1 /etc/resolv.conf
1582 nameserver 10.0.0.1
1583
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001584-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001585
John Beppu46a4e762000-01-18 22:33:11 +00001586=item tar
1587
John Beppu9057b6a2000-04-16 10:22:28 +00001588Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001589
1590Create, extract, or list files from a tar file. Note that
1591this version of tar treats hard links as separate files.
1592
1593Main operation mode:
1594
1595 c create
1596 x extract
1597 t list
1598
1599File selection:
1600
1601 f name of tarfile or "-" for stdin
1602 O extract to stdout
1603 --exclude file to exclude
1604
1605Informative output:
1606
1607 v verbosely list files processed
1608
1609Example:
1610
1611 $ zcat /tmp/tarball.tar.gz | tar -xf -
1612 $ tar -cf /tmp/tarball.tar /usr/local
1613
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001614-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001615
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001616=item test, [
1617
Erik Andersen5e1189e2000-04-15 16:34:54 +00001618Usage: test EXPRESSION
1619or [ EXPRESSION ]
1620
1621Checks file types and compares values returning an exit
1622code determined by the value of EXPRESSION.
1623
1624Example:
1625
1626 $ test 1 -eq 2
1627 $ echo $?
1628 1
1629 $ test 1 -eq 1
1630 $ echo $?
1631 0
1632 $ [ -d /etc ]
1633 $ echo $?
1634 0
1635 $ [ -d /junk ]
1636 $ echo $?
1637 1
1638
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001639-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001640
John Beppu46a4e762000-01-18 22:33:11 +00001641=item tee
1642
Erik Andersen5e1189e2000-04-15 16:34:54 +00001643Usage: tee [OPTION]... [FILE]...
1644
1645Copy standard input to each FILE, and also to standard output.
1646
1647Options:
1648
1649 -a append to the given FILEs, do not overwrite
1650
1651Example:
1652
1653 $ echo "Hello" | tee /tmp/foo
1654 $ cat /tmp/foo
1655 Hello
1656
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001657-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001658
John Beppu46a4e762000-01-18 22:33:11 +00001659=item touch
1660
John Beppu9057b6a2000-04-16 10:22:28 +00001661Usage: touch [B<-c>] file [file ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001662
1663Update the last-modified date on (or create) the selected file[s].
1664
1665Example:
1666
1667 $ ls -l /tmp/foo
1668 /bin/ls: /tmp/foo: No such file or directory
1669 $ touch /tmp/foo
1670 $ ls -l /tmp/foo
1671 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1672
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001673-------------------------------
1674
1675=item tr
Erik Andersena19bc642000-05-02 06:40:02 +00001676
Erik Andersen3c1217c2000-05-01 22:34:24 +00001677Usage: tr [-cds] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001678
Erik Andersen3c1217c2000-05-01 22:34:24 +00001679Translate, squeeze, and/or delete characters from
1680standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001681
Erik Andersen3c1217c2000-05-01 22:34:24 +00001682Options:
1683
1684 -c take complement of STRING1
1685 -d delete input characters coded STRING1
1686 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00001687
1688Example:
1689
1690 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1691 hello world
1692
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001693-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001694
John Beppu46a4e762000-01-18 22:33:11 +00001695=item true
1696
Erik Andersen5e1189e2000-04-15 16:34:54 +00001697Returns an exit code of TRUE (0)
1698
1699Example:
1700
1701 $ true
1702 $ echo $?
1703 0
1704
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001705-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001706
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001707=item tty
John Beppu4581b4c2000-01-19 15:04:41 +00001708
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001709Usage: tty
1710
1711Print the file name of the terminal connected to standard input.
1712
1713Options:
1714
1715 -s print nothing, only return an exit status
1716
1717Example:
1718
1719 $ tty
1720 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00001721
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001722-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001723
John Beppu46a4e762000-01-18 22:33:11 +00001724=item umount
1725
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001726Usage: umount [flags] filesystem|directory
1727
1728Flags:
1729
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001730 -a: Unmount all file systems
1731 -r: Try to remount devices as read-only if mount is busy
1732 -f: Force filesystem umount (i.e. unreachable NFS server)
1733 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001734
1735Example:
1736
1737 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001738
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001739-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001740
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001741=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001742
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001743Usage: uname [OPTION]...
1744
Erik Andersen26702fe2000-04-17 16:44:46 +00001745Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001746
1747Options:
1748
1749 -a print all information
1750 -m the machine (hardware) type
1751 -n print the machine's network node hostname
1752 -r print the operating system release
1753 -s print the operating system name
1754 -p print the host processor type
1755 -v print the operating system version
1756
1757Example:
1758
1759 $ uname -a
1760 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001761
1762-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001763
John Beppu46a4e762000-01-18 22:33:11 +00001764=item uniq
1765
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001766Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1767
1768Discard all but one of successive identical lines from INPUT
1769(or standard input), writing to OUTPUT (or standard output).
1770
1771Example:
1772
1773 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1774 a
1775 b
1776 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001777
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001778-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001779
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001780=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001781
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001782Usage: update [options]
1783
1784Periodically flushes filesystem buffers.
1785
1786Options:
1787
1788 -S force use of sync(2) instead of flushing
1789 -s SECS call sync this often (default 30)
1790 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001791
1792-------------------------------
1793
1794=item uptime
1795
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001796Usage: uptime
1797
1798Tells how long the system has been running since boot.
1799
1800Example:
1801
1802 $ uptime
1803 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001804
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001805-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001806
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001807=item usleep
1808
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001809Usage: usleep N
1810
1811Pauses for N microseconds.
1812
1813Example:
1814
1815 $ usleep 1000000
1816 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001817
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001818-------------------------------
1819
1820=item wc
1821
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001822Usage: wc [OPTION]... [FILE]...
1823
1824Print line, word, and byte counts for each FILE, and a total line if
1825more than one FILE is specified. With no FILE, read standard input.
1826
1827Options:
1828
1829 -c print the byte counts
1830 -l print the newline counts
1831 -L print the length of the longest line
1832 -w print the word counts
1833
1834Example:
1835
1836 $ wc /etc/passwd
1837 31 46 1365 /etc/passwd
Erik Andersen5e1189e2000-04-15 16:34:54 +00001838
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001839-------------------------------
1840
1841=item whoami
1842
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001843Usage: whoami
1844
1845Prints the user name associated with the current effective user id.
1846
1847Example:
1848
1849 $ whoami
1850 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00001851
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001852-------------------------------
1853
1854=item yes
1855
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001856Usage: yes [OPTION]... [STRING]...
1857
1858Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001859
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001860-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00001861
1862=item zcat
1863
Erik Andersen26702fe2000-04-17 16:44:46 +00001864This is essentially an alias for invoking "gunzip B<-c>", where
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001865it decompresses the file inquestion and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001866
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001867-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001868
John Beppu46a4e762000-01-18 22:33:11 +00001869=back
John Beppu3a1b6be2000-01-18 15:45:59 +00001870
Erik Andersena19bc642000-05-02 06:40:02 +00001871=head1 LIBC NSS
1872
1873GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
1874library for the local environment, and to configure how it reads system data,
1875such as passwords and group information. BusyBox has made it Policy that it
1876will never use NSS, and will never use and libc calls that make use of NSS.
1877This allows you to run an embedded system without the need for installing an
1878/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
1879
1880If you are using a system that is using a remote LDAP server for authentication
1881via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
1882BusyBox source. Chances are though, that if you have enough space to install
1883of that stuff on your system, then you probably want the full GNU utilities.
1884
John Beppu3a1b6be2000-01-18 15:45:59 +00001885=head1 SEE ALSO
1886
1887textutils(1), shellutils(1), etc...
1888
1889=head1 MAINTAINER
1890
Erik Andersen1101d232000-04-19 05:15:12 +00001891Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001892
1893=head1 AUTHORS
1894
John Beppu08fe43d2000-01-19 12:39:16 +00001895The following people have contributed code to BusyBox whether
1896they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00001897
Erik Andersen1101d232000-04-19 05:15:12 +00001898Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001899
John Beppu08fe43d2000-01-19 12:39:16 +00001900=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001901
John Beppu08fe43d2000-01-19 12:39:16 +00001902John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001903
John Beppu08fe43d2000-01-19 12:39:16 +00001904=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001905
John Beppu08fe43d2000-01-19 12:39:16 +00001906Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001907
John Beppu08fe43d2000-01-19 12:39:16 +00001908=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001909
John Beppu08fe43d2000-01-19 12:39:16 +00001910Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001911
John Beppu08fe43d2000-01-19 12:39:16 +00001912=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001913
John Beppu08fe43d2000-01-19 12:39:16 +00001914Dave Cinege <dcinege@psychosis.com>
1915
1916=for html <br>
1917
John Beppu50ed0672000-04-13 23:44:04 +00001918Karl M. Hegbloom <karlheg@debian.org>
1919
1920=for html <br>
1921
John Beppu4fd10fc2000-04-17 05:13:59 +00001922John Lombardo <john@deltanet.com>
1923
1924=for html <br>
1925
Eric Andersen86ab8a32000-06-02 03:21:42 +00001926Glenn McGrath <bug1@netconnect.com.au>
1927
1928=for html <br>
1929
John Beppu08fe43d2000-01-19 12:39:16 +00001930Bruce Perens <bruce@perens.com>
1931
1932=for html <br>
1933
Eric Andersen08e92892000-06-02 03:21:36 +00001934Pavel Roskin <pavel_roskin@geocities.com>
1935
1936=for html <br>
1937
John Beppu08fe43d2000-01-19 12:39:16 +00001938Linus Torvalds <torvalds@transmeta.com>
1939
1940=for html <br>
1941
1942Charles P. Wright <cpwright@villagenet.com>
1943
1944=for html <br>
1945
1946Enrique Zanardi <ezanardi@ull.es>
1947
1948=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00001949
1950=cut
John Beppu08fe43d2000-01-19 12:39:16 +00001951
Pavel Roskin049b7062000-06-07 21:19:49 +00001952# $Id: busybox.pod,v 1.39 2000/06/07 21:19:49 proski Exp $