blob: 408bbfa72c035f28fd17bed06890a75600973824 [file] [log] [blame]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001# vi: set sw=4 ts=4:
John Beppu08e7f752000-04-13 03:22:20 +00002
John Beppu3a1b6be2000-01-18 15:45:59 +00003=head1 NAME
4
Erik Andersencf8d38a2000-04-21 01:23:36 +00005BusyBox - The Swiss Army Knife of Embedded Linux
John Beppu3a1b6be2000-01-18 15:45:59 +00006
Erik Andersencf8d38a2000-04-21 01:23:36 +00007=head1 SYNTAX
John Beppu3a1b6be2000-01-18 15:45:59 +00008
Erik Andersencf8d38a2000-04-21 01:23:36 +00009 BusyBox <function> [arguments...] # or
John Beppu46a4e762000-01-18 22:33:11 +000010
11 <function> [arguments...] # if symlinked
John Beppu3a1b6be2000-01-18 15:45:59 +000012
13=head1 DESCRIPTION
14
Erik Andersencf8d38a2000-04-21 01:23:36 +000015BusyBox combines tiny versions of many common UNIX utilities into a single
16small executable. It provides minimalist replacements for most of the utilities
17you usually find in fileutils, shellutils, findutils, textutils, grep, gzip,
18tar, etc. BusyBox provides a fairly complete POSIX environment for any small
Erik Andersene90f4042000-04-21 21:53:58 +000019or emdedded system. The utilities in BusyBox generally have fewer options then
20their full featured GNU cousins; however, the options that are included provide
21the expected functionality and behave very much like their GNU counterparts.
Erik Andersen62dc17a2000-04-13 01:18:23 +000022
Erik Andersencf8d38a2000-04-21 01:23:36 +000023BusyBox has been written with size-optimization and limited resources in mind.
24It is also extremely modular so you can easily include or exclude commands (or
25features) at compile time. This makes it easy to customize your embedded
26systems. To create a working system, just add a kernel, a shell (such as ash),
27and an editor (such as elvis-tiny or ae).
28
29=head1 USAGE
30
31When you create a link to BusyBox for the function you wish to use, when BusyBox
32is called using that link it will behave as if the command itself has been invoked.
33
34For example, entering
35
36 ln -s ./BusyBox ls
Erik Andersen62dc17a2000-04-13 01:18:23 +000037 ./ls
38
39will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
Erik Andersencf8d38a2000-04-21 01:23:36 +000040into BusyBox).
Erik Andersen62dc17a2000-04-13 01:18:23 +000041
Erik Andersencf8d38a2000-04-21 01:23:36 +000042You can also invoke BusyBox by issuing the command as an argument on the
43command line. For example, entering
44
45 ./BusyBox ls
Erik Andersen62dc17a2000-04-13 01:18:23 +000046
47will also cause BusyBox to behave as 'ls'.
John Beppu08fe43d2000-01-19 12:39:16 +000048
Erik Anderseneef65802000-04-19 05:12:02 +000049=head1 COMMON OPTIONS
50
51Most BusyBox commands support the B<--help> option to provide a
52terse runtime description of their behavior.
53
John Beppu46a4e762000-01-18 22:33:11 +000054=head1 COMMANDS
55
Erik Andersen62dc17a2000-04-13 01:18:23 +000056Currently defined functions include:
57
Erik Andersen5e1189e2000-04-15 16:34:54 +000058basename, cat, chgrp, chmod, chown, chroot, clear, chvt, cp, date, dd, df,
59dirname, dmesg, du, dutmp, echo, false, fbset, fdflush, find, free,
60freeramdisk, deallocvt, fsck.minix, grep, gunzip, gzip, halt, head, hostid,
61hostname, init, kill, killall, length, ln, loadacm, loadfont, loadkmap, logger,
62logname, ls, lsmod, makedevs, math, mkdir, mkfifo, mkfs.minix, mknod, mkswap,
Erik Andersen227a59b2000-04-25 23:24:55 +000063mktemp, mnc, more, mount, mt, mv, nslookup, ping, poweroff, printf, ps, pwd,
Erik Andersen4f3f7572000-04-28 00:18:56 +000064reboot, rm, rmdir, rmmod, sed, setkeycodes, sh, sfdisk, sleep, sort, sync,
65syslogd, swapon, swapoff, tail, tar, test, tee, touch, tr, true, tty, umount,
66uname, uniq, update, uptime, usleep, wc, whoami, yes, zcat, [
Erik Andersen62dc17a2000-04-13 01:18:23 +000067
Erik Andersena19bc642000-05-02 06:40:02 +000068-------------------------------
69
John Beppu46a4e762000-01-18 22:33:11 +000070=over 4
71
Erik Andersen62dc17a2000-04-13 01:18:23 +000072=item basename
73
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
John Beppu46a4e762000-01-18 22:33:11 +0000254=item date
255
Erik Andersen62dc17a2000-04-13 01:18:23 +0000256Usage: date [OPTION]... [+FORMAT]
John Beppu4581b4c2000-01-19 15:04:41 +0000257
Erik Andersen62dc17a2000-04-13 01:18:23 +0000258 or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
259
Erik Andersencf8d38a2000-04-21 01:23:36 +0000260Displays the current time in the given FORMAT, or sets the system date.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000261
262Options:
Erik Andersene31c0662000-05-02 05:32:07 +0000263
Erik Andersencf8d38a2000-04-21 01:23:36 +0000264 -R Outputs RFC-822 compliant date string
265 -s Sets time described by STRING
266 -u Prints or sets Coordinated Universal Time
Erik Andersen62dc17a2000-04-13 01:18:23 +0000267
268Example:
John Beppuf17792c2000-04-13 03:16:01 +0000269
Erik Andersen62dc17a2000-04-13 01:18:23 +0000270 $ date
271 Wed Apr 12 18:52:41 MDT 2000
John Beppu4581b4c2000-01-19 15:04:41 +0000272
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000273-------------------------------
274
John Beppu46a4e762000-01-18 22:33:11 +0000275=item dd
276
Erik Andersen62dc17a2000-04-13 01:18:23 +0000277Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n]
John Beppu4581b4c2000-01-19 15:04:41 +0000278
279Copy a file, converting and formatting according to options
280
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000281 if=FILE read from FILE instead of stdin
282 of=FILE write to FILE instead of stdout
283 bs=n read and write n bytes at a time
284 count=n copy only n input blocks
285 skip=n skip n input blocks
286 seek=n skip n output blocks
Erik Andersen62dc17a2000-04-13 01:18:23 +0000287
288Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2)
John Beppu4581b4c2000-01-19 15:04:41 +0000289
Erik Andersen62dc17a2000-04-13 01:18:23 +0000290Example:
291
292 $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
293 4+0 records in
294 4+0 records out
295
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000296-------------------------------
297
John Beppu46a4e762000-01-18 22:33:11 +0000298=item df
299
Erik Andersen62dc17a2000-04-13 01:18:23 +0000300Usage: df [filesystem ...]
301
302Prints the filesystem space used and space available.
303
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000304Example:
Erik Andersen62dc17a2000-04-13 01:18:23 +0000305
306 $ df
307 Filesystem 1k-blocks Used Available Use% Mounted on
308 /dev/sda3 8690864 8553540 137324 98% /
309 /dev/sda1 64216 36364 27852 57% /boot
310 $ df /dev/sda3
311 Filesystem 1k-blocks Used Available Use% Mounted on
312 /dev/sda3 8690864 8553540 137324 98% /
John Beppu4581b4c2000-01-19 15:04:41 +0000313
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000314-------------------------------
315
316=item dirname
317
318Usage: dirname NAME
319
320Strip non-directory suffix from file name
321
322Example:
323
324 $ dirname /tmp/foo
325 /tmp
326 $ dirname /tmp/foo/
327 /tmp
328
329-------------------------------
330
John Beppu46a4e762000-01-18 22:33:11 +0000331=item dmesg
332
John Beppuf17792c2000-04-13 03:16:01 +0000333Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize]
John Beppu4581b4c2000-01-19 15:04:41 +0000334
Erik Andersen62dc17a2000-04-13 01:18:23 +0000335Print or controls the kernel ring buffer.
John Beppu4581b4c2000-01-19 15:04:41 +0000336
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000337-------------------------------
338
John Beppu46a4e762000-01-18 22:33:11 +0000339=item du
340
Erik Andersen62dc17a2000-04-13 01:18:23 +0000341Usage: du [OPTION]... [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000342
Erik Andersen62dc17a2000-04-13 01:18:23 +0000343Summarize disk space used for each FILE and/or directory.
344Disk space is printed in units of 1k (i.e. 1024 bytes).
345
346Options:
John Beppuf17792c2000-04-13 03:16:01 +0000347
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000348 -l count sizes many times if hard linked
349 -s display only a total for each argument
Erik Andersen62dc17a2000-04-13 01:18:23 +0000350
351Example:
352
Erik Andersencf8d38a2000-04-21 01:23:36 +0000353 $ ./BusyBox du
Erik Andersen62dc17a2000-04-13 01:18:23 +0000354 16 ./CVS
355 12 ./kernel-patches/CVS
356 80 ./kernel-patches
357 12 ./tests/CVS
358 36 ./tests
359 12 ./scripts/CVS
360 16 ./scripts
361 12 ./docs/CVS
362 104 ./docs
363 2417 .
364
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000365-------------------------------
366
367=item dutmp
368
369Usage: dutmp [FILE]
370
371Dump utmp file format (pipe delimited) from FILE
372or stdin to stdout.
373
374Example:
375
376 $ dutmp /var/run/utmp
377 8|7||si|||0|0|0|955637625|760097|0
378 2|0|~|~~|reboot||0|0|0|955637625|782235|0
379 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
380 8|125||l4|||0|0|0|955637629|998367|0
381 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
382 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
383 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
384
385-------------------------------
386
387=item echo
388
389Usage: echo [-neE] [ARG ...]
390
391Prints the specified ARGs to stdout
392
393Options:
394
395 -n suppress trailing newline
396 -e interpret backslash-escaped characters (i.e. \t=tab etc)
397 -E disable interpretation of backslash-escaped characters
398
399Example:
400
401 $ echo "Erik is cool"
402 Erik is cool
403 $ echo -e "Erik\nis\ncool"
404 Erik
405 is
406 cool
407 $ echo "Erik\nis\ncool"
408 Erik\nis\ncool
409
410-------------------------------
411
412=item false
413
Erik Andersen5e1189e2000-04-15 16:34:54 +0000414Returns an exit code of FALSE (1)
415
416Example:
417
418 $ false
419 $ echo $?
420 1
421
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000422-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000423
John Beppu46a4e762000-01-18 22:33:11 +0000424=item fbset
425
John Beppu4581b4c2000-01-19 15:04:41 +0000426Usage: fbset [options] [mode]
427
Erik Andersen62dc17a2000-04-13 01:18:23 +0000428Show and modify frame buffer device settings
429
John Beppu4581b4c2000-01-19 15:04:41 +0000430Options:
431
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000432 -h
433 -fb
434 -db
435 -a
436 -i
437 -g
438 -t
439 -accel
440 -hsync
441 -vsync
442 -laced
443 -double
John Beppu4581b4c2000-01-19 15:04:41 +0000444
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000445Example:
446
447 $ fbset
448 mode "1024x768-76"
449 # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
450 geometry 1024 768 1024 768 16
451 timings 12714 128 32 16 4 128 4
452 accel false
453 rgba 5/11,6/5,5/0,0/0
454 endmode
455
456-------------------------------
457
458=item fdflush
459
460Usage: fdflush device
461
462Force floppy disk drive to detect disk change
463
464-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000465
John Beppu46a4e762000-01-18 22:33:11 +0000466=item find
467
John Beppu4581b4c2000-01-19 15:04:41 +0000468Usage: find [PATH...] [EXPRESSION]
469
470Search for files in a directory hierarchy. The default PATH is
471the current directory; default EXPRESSION is '-print'
472
John Beppu4581b4c2000-01-19 15:04:41 +0000473
Erik Andersen62dc17a2000-04-13 01:18:23 +0000474EXPRESSION may consist of:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000475
476 -follow Dereference symbolic links.
477 -name PATTERN File name (leading directories removed) matches PATTERN.
478 -print print the full file name followed by a newline to stdout.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000479
480Example:
481
482 $ find / -name /etc/passwd
483 /etc/passwd
John Beppu4581b4c2000-01-19 15:04:41 +0000484
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000485-------------------------------
486
John Beppu46a4e762000-01-18 22:33:11 +0000487=item free
488
John Beppu4581b4c2000-01-19 15:04:41 +0000489Usage: free
490
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000491Displays the amount of free and used system memory.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000492
493Example:
494
495 $ free
Erik Andersen5e1189e2000-04-15 16:34:54 +0000496 total used free shared buffers
Erik Andersen62dc17a2000-04-13 01:18:23 +0000497 Mem: 257628 248724 8904 59644 93124
498 Swap: 128516 8404 120112
499 Total: 386144 257128 129016
500
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000501-------------------------------
502
503=item freeramdisk
504
505Usage: freeramdisk DEVICE
506
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000507Frees all memory used by the specified ramdisk.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000508
509Example:
510
511 $ freeramdisk /dev/ram2
512
513-------------------------------
Erik Andersen62dc17a2000-04-13 01:18:23 +0000514
John Beppu46a4e762000-01-18 22:33:11 +0000515=item deallocvt
516
John Beppu4581b4c2000-01-19 15:04:41 +0000517Usage: deallocvt N
518
Erik Andersen62dc17a2000-04-13 01:18:23 +0000519Deallocates unused virtual terminal /dev/ttyN
John Beppu50ed0672000-04-13 23:44:04 +0000520
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000521-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000522
John Beppu46a4e762000-01-18 22:33:11 +0000523=item fsck.minix
524
John Beppuf17792c2000-04-13 03:16:01 +0000525Usage: fsck.minix [B<-larvsmf>] /dev/name
John Beppu4581b4c2000-01-19 15:04:41 +0000526
527Performs a consistency check for MINIX filesystems.
528
Erik Andersen62dc17a2000-04-13 01:18:23 +0000529OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000530
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000531 -l Lists all filenames
532 -r Perform interactive repairs
533 -a Perform automatic repairs
534 -v verbose
535 -s Outputs super-block information
536 -m Activates MINIX-like "mode not cleared" warnings
537 -f Force file system check.
538
539-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000540
John Beppu46a4e762000-01-18 22:33:11 +0000541=item grep
542
Erik Andersen62dc17a2000-04-13 01:18:23 +0000543Usage: grep [OPTIONS]... PATTERN [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000544
Erik Andersen62dc17a2000-04-13 01:18:23 +0000545Search for PATTERN in each FILE or standard input.
546
547OPTIONS:
John Beppuf17792c2000-04-13 03:16:01 +0000548
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000549 -h suppress the prefixing filename on output
550 -i ignore case distinctions
551 -n print line number with output lines
552 -q be quiet. Returns 0 if result was found, 1 otherwise
Erik Andersena19bc642000-05-02 06:40:02 +0000553 -v select non-matching lines
Erik Andersen62dc17a2000-04-13 01:18:23 +0000554
555This version of grep matches full regular expresions.
556
Erik Andersen62dc17a2000-04-13 01:18:23 +0000557Example:
558
559 $ grep root /etc/passwd
560 root:x:0:0:root:/root:/bin/bash
561 $ grep ^[rR]oo. /etc/passwd
562 root:x:0:0:root:/root:/bin/bash
John Beppu4581b4c2000-01-19 15:04:41 +0000563
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000564-------------------------------
565
566=item gunzip
567
Erik Andersen5e1189e2000-04-15 16:34:54 +0000568Usage: gunzip [OPTION]... FILE
569
570Uncompress FILE (or standard input if FILE is '-').
571
572Options:
573
574 -c Write output to standard output
575 -t Test compressed file integrity
576
577Example:
578
Erik Andersencf8d38a2000-04-21 01:23:36 +0000579 $ ls -la /tmp/BusyBox*
580 -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
581 $ gunzip /tmp/BusyBox-0.43.tar.gz
582 $ ls -la /tmp/BusyBox*
583 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000584
585-------------------------------
586
587=item gzip
588
Erik Andersen5e1189e2000-04-15 16:34:54 +0000589Usage: gzip [OPTION]... FILE
590
591Compress FILE with maximum compression.
John Beppu9057b6a2000-04-16 10:22:28 +0000592When FILE is '-', reads standard input. Implies B<-c>.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000593
594Options:
595
596 -c Write output to standard output instead of FILE.gz
597
598Example:
599
Erik Andersencf8d38a2000-04-21 01:23:36 +0000600 $ ls -la /tmp/BusyBox*
601 -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
602 $ gzip /tmp/BusyBox-0.43.tar
603 $ ls -la /tmp/BusyBox*
604 -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
Erik Andersen5e1189e2000-04-15 16:34:54 +0000605
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000606
607-------------------------------
608
609=item halt
610
Erik Andersen5e1189e2000-04-15 16:34:54 +0000611Usage: halt
612
613This comand halts the system.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000614
615-------------------------------
616
John Beppu46a4e762000-01-18 22:33:11 +0000617=item head
618
Erik Andersen62dc17a2000-04-13 01:18:23 +0000619Usage: head [OPTION] [FILE]...
John Beppu4581b4c2000-01-19 15:04:41 +0000620
621Print first 10 lines of each FILE to standard output.
622With more than one FILE, precede each with a header giving the
623file name. With no FILE, or when FILE is -, read standard input.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000624
625Options:
John Beppuf17792c2000-04-13 03:16:01 +0000626
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000627 -n NUM Print first NUM lines instead of first 10
Erik Andersen62dc17a2000-04-13 01:18:23 +0000628
629Example:
630
631 $ head -n 2 /etc/passwd
632 root:x:0:0:root:/root:/bin/bash
633 daemon:x:1:1:daemon:/usr/sbin:/bin/sh
John Beppu4581b4c2000-01-19 15:04:41 +0000634
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000635-------------------------------
636
637=item hostid
638
Erik Andersen5e1189e2000-04-15 16:34:54 +0000639Usage: hostid
640
641Prints out a unique 32-bit identifier for the current
642machine. The 32-bit identifier is intended to be unique
643among all UNIX systems in existence.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000644
645-------------------------------
646
John Beppu46a4e762000-01-18 22:33:11 +0000647=item hostname
648
John Beppuf17792c2000-04-13 03:16:01 +0000649Usage: hostname [OPTION] {hostname | B<-F> file}
John Beppu46a4e762000-01-18 22:33:11 +0000650
John Beppu4581b4c2000-01-19 15:04:41 +0000651Get or set the hostname or DNS domain name. If a hostname is given
John Beppuf17792c2000-04-13 03:16:01 +0000652(or a file with the B<-F> parameter), the host name will be set.
John Beppu4581b4c2000-01-19 15:04:41 +0000653
Erik Andersen62dc17a2000-04-13 01:18:23 +0000654Options:
John Beppuf17792c2000-04-13 03:16:01 +0000655
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000656 -s Short
657 -i Addresses for the hostname
658 -d DNS domain name
659 -F FILE Use the contents of FILE to specify the hostname
Erik Andersen62dc17a2000-04-13 01:18:23 +0000660
661Example:
662
663 $ hostname
664 slag
John Beppu46a4e762000-01-18 22:33:11 +0000665
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000666-------------------------------
667
668=item init
669
Erik Andersen5e1189e2000-04-15 16:34:54 +0000670Usage: init
671
672Init is the parent of all processes.
673
674This version of init is designed to be run only by the kernel.
675
676BusyBox init doesn't support multiple runlevels. The runlevels field of
677the /etc/inittab file is completely ignored by BusyBox init. If you want
678runlevels, use sysvinit.
679
680BusyBox init works just fine without an inittab. If no inittab is found,
681it has the following default behavior:
682
683 ::sysinit:/etc/init.d/rcS
684 ::askfirst:/bin/sh
685
686if it detects that /dev/console is _not_ a serial console, it will also run:
687
688 tty2::askfirst:/bin/sh
689
690If you choose to use an /etc/inittab file, the inittab entry format is as follows:
691
692 <id>:<runlevels>:<action>:<process>
693
694 <id>:
695
696 WARNING: This field has a non-traditional meaning for BusyBox init!
697 The id field is used by BusyBox init to specify the controlling tty for
698 the specified process to run on. The contents of this field are
699 appended to "/dev/" and used as-is. There is no need for this field to
700 be unique, although if it isn't you may have strange results. If this
701 field is left blank, it is completely ignored. Also note that if
702 BusyBox detects that a serial console is in use, then all entries
703 containing non-empty id fields will _not_ be run. BusyBox init does
704 nothing with utmp. We don't need no stinkin' utmp.
705
706 <runlevels>:
707
708 The runlevels field is completely ignored.
709
710 <action>:
711
712 Valid actions include: sysinit, respawn, askfirst, wait,
713 once, and ctrlaltdel.
714
715 askfirst acts just like respawn, but before running the specified
716 process it displays the line "Please press Enter to activate this
717 console." and then waits for the user to press enter before starting
718 the specified process.
719
720 Unrecognised actions (like initdefault) will cause init to emit
721 an error message, and then go along with its business.
722
723 <process>:
724
725 Specifies the process to be executed and it's command line.
726
727
728Example /etc/inittab file:
729
730 # This is run first except when booting in single-user mode.
731 #
732 ::sysinit:/etc/init.d/rcS
733
734 # /bin/sh invocations on selected ttys
735 #
736 # Start an "askfirst" shell on the console (whatever that may be)
737 ::askfirst:/bin/sh
738 # Start an "askfirst" shell on /dev/tty2
739 tty2::askfirst:/bin/sh
740
741 # /sbin/getty invocations for selected ttys
742 #
743 tty4::respawn:/sbin/getty 38400 tty4
744 tty5::respawn:/sbin/getty 38400 tty5
745
746
747 # Example of how to put a getty on a serial line (for a terminal)
748 #
749 #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
750 #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
751 #
752 # Example how to put a getty on a modem line.
753 #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
754
755 # Stuff to do before rebooting
756 ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1
757 ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000758
759-------------------------------
760
John Beppu46a4e762000-01-18 22:33:11 +0000761=item kill
762
John Beppuf17792c2000-04-13 03:16:01 +0000763Usage: kill [B<-signal>] process-id [process-id ...]
John Beppu4581b4c2000-01-19 15:04:41 +0000764
Erik Andersen62dc17a2000-04-13 01:18:23 +0000765Send a signal (default is SIGTERM) to the specified process(es).
766
767Options:
John Beppuf17792c2000-04-13 03:16:01 +0000768
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000769 -l List all signal names and numbers.
Erik Andersen62dc17a2000-04-13 01:18:23 +0000770
771Example:
772
773 $ ps | grep apache
774 252 root root S [apache]
775 263 www-data www-data S [apache]
776 264 www-data www-data S [apache]
777 265 www-data www-data S [apache]
778 266 www-data www-data S [apache]
779 267 www-data www-data S [apache]
780 $ kill 252
John Beppu4581b4c2000-01-19 15:04:41 +0000781
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000782-------------------------------
783
784=item killall
785
John Beppu9057b6a2000-04-16 10:22:28 +0000786Usage: killall [B<-signal>] process-name [process-name ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +0000787
788Send a signal (default is SIGTERM) to the specified process(es).
789
790Options:
John Beppu9057b6a2000-04-16 10:22:28 +0000791
Erik Andersen5e1189e2000-04-15 16:34:54 +0000792 -l List all signal names and numbers.
793
794Example:
795
796 $ killall apache
797
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000798-------------------------------
799
800=item length
801
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000802Usage: length STRING
Erik Andersen5e1189e2000-04-15 16:34:54 +0000803
Erik Andersen7ab9c7e2000-05-12 19:41:47 +0000804Prints out the length of the specified STRING.
Erik Andersen5e1189e2000-04-15 16:34:54 +0000805
806Example:
Erik Andersena19bc642000-05-02 06:40:02 +0000807
Erik Andersen5e1189e2000-04-15 16:34:54 +0000808 $ length "Hello"
809 5
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000810
811-------------------------------
812
John Beppu46a4e762000-01-18 22:33:11 +0000813=item ln
814
John Beppu4581b4c2000-01-19 15:04:41 +0000815Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
Erik Andersena19bc642000-05-02 06:40:02 +0000816
John Beppu4581b4c2000-01-19 15:04:41 +0000817Create a link named LINK_NAME or DIRECTORY to the specified TARGET
818
819Options:
820
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000821 -s make symbolic links instead of hard links
822 -f remove existing destination files
John Beppu4581b4c2000-01-19 15:04:41 +0000823
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000824Example:
825
Erik Andersencf8d38a2000-04-21 01:23:36 +0000826 $ ln -s BusyBox /tmp/ls
Erik Andersena19bc642000-05-02 06:40:02 +0000827 $ ls -l /tmp/ls
Erik Andersencf8d38a2000-04-21 01:23:36 +0000828 lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000829
830-------------------------------
831
832=item loadacm
833
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000834Usage: loadacm
835
836Loads an acm from standard input.
837
838Example:
839
840 $ loadacm < /etc/i18n/acmname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000841
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000842-------------------------------
843
844=item loadfont
845
Erik Andersena6c75222000-04-18 00:00:52 +0000846Usage: loadfont
847
848Loads a console font from standard input.
849
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000850Example:
851
852 $ loadfont < /etc/i18n/fontname
Erik Andersen5e1189e2000-04-15 16:34:54 +0000853
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000854-------------------------------
855
856=item loadkmap
857
Erik Andersen3fe7f9f2000-04-19 03:59:10 +0000858Usage: loadkmap
859
860Loads a binary keyboard translation table from standard input.
861
862Example:
863
864 $ loadkmap < /etc/i18n/lang-keymap
Erik Andersen5e1189e2000-04-15 16:34:54 +0000865
866-------------------------------
867
868=item logger
869
870Usage: logger [OPTION]... [MESSAGE]
871
872Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
873
874Options:
875
876 -s Log to stderr as well as the system log.
877 -t Log using the specified tag (defaults to user name).
878 -p Enter the message with the specified priority.
879 This may be numerical or a ``facility.level'' pair.
880
881Example:
882
883 $ logger "hello"
884
885-------------------------------
886
887=item logname
888
889Usage: logname
890
891Print the name of the current user.
892
893Example:
894
895 $ logname
896 root
897
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000898-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000899
John Beppu46a4e762000-01-18 22:33:11 +0000900=item ls
901
John Beppuf17792c2000-04-13 03:16:01 +0000902Usage: ls [B<-1acdelnpuxACF>] [filenames...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000903
904Options:
905
906 -a do not hide entries starting with .
907 -c with -l: show ctime (the time of last
908 modification of file status information)
909 -d list directory entries instead of contents
910 -e list both full date and full time
911 -l use a long listing format
912 -n list numeric UIDs and GIDs instead of names
913 -p append indicator (one of /=@|) to entries
914 -u with -l: show access time (the time of last
915 access of the file)
916 -x list entries by lines instead of by columns
917 -A do not list implied . and ..
918 -C list entries by columns
919 -F append indicator (one of */=@|) to entries
John Beppu50ed0672000-04-13 23:44:04 +0000920
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000921-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000922
John Beppu46a4e762000-01-18 22:33:11 +0000923=item lsmod
924
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000925Usage: lsmod
John Beppu4581b4c2000-01-19 15:04:41 +0000926
Erik Andersen5e1189e2000-04-15 16:34:54 +0000927Shows a list of all currently loaded kernel modules.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000928
929-------------------------------
930
931=item makedevs
932
Erik Andersen5e1189e2000-04-15 16:34:54 +0000933Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
934
935Creates a range of block or character special files
936
937TYPEs include:
938
939 b: Make a block (buffered) device.
940 c or u: Make a character (un-buffered) device.
941 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
942
943FIRST specifies the number appended to NAME to create the first device.
944LAST specifies the number of the last item that should be created.
945If 's' is the last argument, the base device is created as well.
946
947Example:
948
949 $ makedevs /dev/ttyS c 4 66 2 63
950 [creates ttyS2-ttyS63]
951 $ makedevs /dev/hda b 3 0 0 8 s
952 [creates hda,hda1-hda8]
953
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000954-------------------------------
955
956=item math
957
Erik Andersen5e1189e2000-04-15 16:34:54 +0000958Usage: math expression ...
959
960This is a Tiny RPN calculator that understands the
961following operations: +, -, /, *, and, or, not, eor.
962
963Example:
964
965 $ math 2 2 add
966 4
967 $ math 8 8 \* 2 2 + /
968 16
969 $ math 0 1 and
970 0
971 $ math 0 1 or
972 1
973
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000974-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +0000975
John Beppu46a4e762000-01-18 22:33:11 +0000976=item mkdir
977
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000978Usage: mkdir [OPTION] DIRECTORY...
979
John Beppu4581b4c2000-01-19 15:04:41 +0000980Create the DIRECTORY(ies), if they do not already exist
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000981
John Beppu4581b4c2000-01-19 15:04:41 +0000982Options:
983
Erik Andersen9cf3bfa2000-04-13 18:49:43 +0000984 -m set permission mode (as in chmod), not rwxrwxrwx - umask
985 -p no error if dir exists, make parent directories as needed
986
987Example:
988
989 $ mkdir /tmp/foo
990 $ mkdir /tmp/foo
991 /tmp/foo: File exists
992 $ mkdir /tmp/foo/bar/baz
993 /tmp/foo/bar/baz: No such file or directory
994 $ mkdir -p /tmp/foo/bar/baz
995
996-------------------------------
997
998=item mkfifo
999
Erik Andersen5e1189e2000-04-15 16:34:54 +00001000Usage: mkfifo [OPTIONS] name
1001
1002Creates a named pipe (identical to 'mknod name p')
1003
1004Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001005
Erik Andersen5e1189e2000-04-15 16:34:54 +00001006 -m create the pipe using the specified mode (default a=rw)
1007
1008-------------------------------
1009
1010=item mkfs.minix
1011
1012Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks]
1013
1014Make a MINIX filesystem.
1015
1016OPTIONS:
1017
1018 -c Check the device for bad blocks
1019 -n [14|30] Specify the maximum length of filenames
1020 -i Specify the number of inodes for the filesystem
1021 -l FILENAME Read the bad blocks list from FILENAME
1022 -v Make a Minix version 2 filesystem
1023
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001024-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001025
John Beppu46a4e762000-01-18 22:33:11 +00001026=item mknod
1027
Erik Andersen5e1189e2000-04-15 16:34:54 +00001028Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001029
Erik Andersen5e1189e2000-04-15 16:34:54 +00001030Create a special file (block, character, or pipe).
1031
1032Options:
John Beppu9057b6a2000-04-16 10:22:28 +00001033
Erik Andersen5e1189e2000-04-15 16:34:54 +00001034 -m create the special file using the specified mode (default a=rw)
John Beppu4581b4c2000-01-19 15:04:41 +00001035
1036TYPEs include:
Erik Andersen5e1189e2000-04-15 16:34:54 +00001037 b: Make a block (buffered) device.
1038 c or u: Make a character (un-buffered) device.
1039 p: Make a named pipe. MAJOR and MINOR are ignored for named pipes.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001040
1041Example:
1042
1043 $ mknod /dev/fd0 b 2 0
Erik Andersen5e1189e2000-04-15 16:34:54 +00001044 $ mknod -m 644 /tmp/pipe p
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001045
1046-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001047
John Beppu46a4e762000-01-18 22:33:11 +00001048=item mkswap
1049
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001050Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count]
1051
John Beppu4581b4c2000-01-19 15:04:41 +00001052Prepare a disk partition to be used as a swap partition.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001053
John Beppu4581b4c2000-01-19 15:04:41 +00001054Options:
1055
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001056 -c Check for read-ability.
1057 -v0 Make version 0 swap [max 128 Megs].
1058 -v1 Make version 1 swap [big!] (default for kernels > 2.1.117).
1059 block-count Number of block to use (default is entire partition).
John Beppu50ed0672000-04-13 23:44:04 +00001060
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001061-------------------------------
1062
Erik Andersen227a59b2000-04-25 23:24:55 +00001063=item mktemp
1064
Erik Andersene31c0662000-05-02 05:32:07 +00001065Usage: mktemp [B<-q>] TEMPLATE
Erik Andersen227a59b2000-04-25 23:24:55 +00001066
1067Creates a temporary file with its name based on TEMPLATE.
1068TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX).
1069
1070Example:
Erik Andersena19bc642000-05-02 06:40:02 +00001071
Erik Andersen227a59b2000-04-25 23:24:55 +00001072 $ mktemp /tmp/temp.XXXXXX
1073 /tmp/temp.mWiLjM
1074 $ ls -la /tmp/temp.mWiLjM
1075 -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
1076
1077-------------------------------
1078
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001079=item mnc
1080
Erik Andersen5e1189e2000-04-15 16:34:54 +00001081Usage: mnc [IP] [port]
1082
1083mini-netcat opens a pipe to IP:port
1084
1085Example:
1086
1087 $ mnc foobar.somedomain.com 25
1088 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
1089 help
1090 214-Commands supported:
1091 214- HELO EHLO MAIL RCPT DATA AUTH
1092 214 NOOP QUIT RSET HELP
1093 quit
1094 221 foobar closing connection
1095
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001096-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001097
John Beppu46a4e762000-01-18 22:33:11 +00001098=item more
1099
John Beppu4581b4c2000-01-19 15:04:41 +00001100Usage: more [file ...]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001101
1102More is a filter for paging through text one screenful at a time.
1103
1104Example:
1105
1106 $ dmesg | more
John Beppu50ed0672000-04-13 23:44:04 +00001107
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001108-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001109
John Beppu46a4e762000-01-18 22:33:11 +00001110=item mount
1111
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001112Usage: mount [flags]
1113 mount [flags] device directory [B<-o> options,more-options]
John Beppu4581b4c2000-01-19 15:04:41 +00001114
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001115Flags:
John Beppu4581b4c2000-01-19 15:04:41 +00001116
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001117 -a: Mount all file systems in fstab.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001118 -o option: One of many filesystem options, listed below.
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001119 -r: Mount the filesystem read-only.
1120 -t fs-type: Specify the filesystem type.
1121 -w: Mount for reading and writing (default).
John Beppu4581b4c2000-01-19 15:04:41 +00001122
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001123Options for use with the "B<-o>" flag:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001124
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001125 async/sync: Writes are asynchronous / synchronous.
1126 atime/noatime: Enable / disable updates to inode access times.
1127 dev/nodev: Allow use of special device files / disallow them.
1128 exec/noexec: Allow use of executable files / disallow them.
1129 loop: Mounts a file via loop device.
1130 suid/nosuid: Allow set-user-id-root programs / disallow them.
1131 remount: Re-mount a currently-mounted filesystem, changing its flags.
1132 ro/rw: Mount for read-only / read-write.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001133 There are EVEN MORE flags that are specific to each filesystem.
1134 You'll have to see the written documentation for those.
1135
1136Example:
1137
1138 $ mount
1139 /dev/hda3 on / type minix (rw)
1140 proc on /proc type proc (rw)
1141 devpts on /dev/pts type devpts (rw)
1142 $ mount /dev/fd0 /mnt -t msdos -o ro
1143 $ mount /tmp/diskimage /opt -t ext2 -o loop
John Beppu50ed0672000-04-13 23:44:04 +00001144
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001145-------------------------------
1146
1147=item mt
1148
John Beppu9057b6a2000-04-16 10:22:28 +00001149Usage: mt [B<-f> device] opcode value
Erik Andersen5e1189e2000-04-15 16:34:54 +00001150
1151Control magnetic tape drive operation
1152
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001153-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001154
John Beppu46a4e762000-01-18 22:33:11 +00001155=item mv
1156
John Beppu4581b4c2000-01-19 15:04:41 +00001157Usage: mv SOURCE DEST
1158
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001159 or: mv SOURCE... DIRECTORY
John Beppu4581b4c2000-01-19 15:04:41 +00001160
1161Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001162
1163Example:
1164
1165 $ mv /tmp/foo /bin/bar
John Beppu50ed0672000-04-13 23:44:04 +00001166
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001167-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001168
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001169=item nslookup
John Beppu46a4e762000-01-18 22:33:11 +00001170
Erik Andersen5e1189e2000-04-15 16:34:54 +00001171Usage: nslookup [HOST]
John Beppu4581b4c2000-01-19 15:04:41 +00001172
Erik Andersen5e1189e2000-04-15 16:34:54 +00001173Queries the nameserver for the IP address of the given HOST
1174
1175Example:
1176
1177 $ nslookup localhost
1178 Server: default
1179 Address: default
1180
1181 Name: debian
1182 Address: 127.0.0.1
John Beppu46a4e762000-01-18 22:33:11 +00001183
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001184-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001185
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001186=item ping
1187
1188Usage: ping [OPTION]... host
1189
1190Send ICMP ECHO_REQUEST packets to network hosts.
1191
1192Options:
1193
1194 -c COUNT Send only COUNT pings.
1195 -q Quiet mode, only displays output at start
1196 and when finished.
1197Example:
1198
1199 $ ping localhost
1200 PING slag (127.0.0.1): 56 data bytes
1201 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
1202
1203 --- debian ping statistics ---
1204 1 packets transmitted, 1 packets received, 0% packet loss
1205 round-trip min/avg/max = 20.1/20.1/20.1 ms
1206
1207-------------------------------
1208
Erik Andersen5e1189e2000-04-15 16:34:54 +00001209=item poweroff
1210
1211Shuts down the system, and requests that the kernel turn off power upon halting.
1212
1213-------------------------------
1214
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001215=item printf
1216
Erik Andersen5e1189e2000-04-15 16:34:54 +00001217Usage: printf format [argument...]
1218
1219Formats and prints the given data in a manner similar to the C printf command.
1220
1221Example:
1222
1223 $ printf "Val=%d\n" 5
1224 Val=5
1225
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001226-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001227
John Beppu46a4e762000-01-18 22:33:11 +00001228=item ps
1229
Erik Andersen5e1189e2000-04-15 16:34:54 +00001230Usage: ps
1231
1232Report process status
1233
1234This version of ps accepts no options.
1235
1236Example:
1237
1238 $ ps
1239 PID Uid Gid State Command
1240 1 root root S init
1241 2 root root S [kflushd]
1242 3 root root S [kupdate]
1243 4 root root S [kpiod]
1244 5 root root S [kswapd]
1245 742 andersen andersen S [bash]
1246 743 andersen andersen S -bash
1247 745 root root S [getty]
1248 2990 andersen andersen R ps
1249
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001250-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001251
John Beppu46a4e762000-01-18 22:33:11 +00001252=item pwd
1253
Erik Andersen5e1189e2000-04-15 16:34:54 +00001254Prints the full filename of the current working directory.
1255
1256Example:
1257
1258 $ pwd
1259 /root
1260
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001261-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001262
John Beppu46a4e762000-01-18 22:33:11 +00001263=item reboot
1264
Erik Andersen5e1189e2000-04-15 16:34:54 +00001265Instructs the kernel to reboot the system.
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 rm
1270
Erik Andersen5e1189e2000-04-15 16:34:54 +00001271Usage: rm [OPTION]... FILE...
1272
1273Remove (unlink) the FILE(s).
1274
1275Options:
1276
1277 -f remove existing destinations, never prompt
1278 -r or -R remove the contents of directories recursively
1279
1280Example:
1281
1282 $ rm -rf /tmp/foo
1283
1284-------------------------------
1285
1286=item rmdir
1287
1288Usage: rmdir [OPTION]... DIRECTORY...
1289
1290Remove the DIRECTORY(ies), if they are empty.
1291
1292Example:
1293
1294 # rmdir /tmp/foo
1295
1296-------------------------------
1297
1298=item rmmod
1299
1300Usage: rmmod [OPTION]... [MODULE]...
1301
1302Unloads the specified kernel modules from the kernel.
1303
1304Options:
1305
1306 -a Try to remove all unused kernel modules.
1307
1308Example:
1309
1310 $ rmmod tulip
1311
1312-------------------------------
1313
1314=item sed
1315
John Beppu9057b6a2000-04-16 10:22:28 +00001316Usage: sed [B<-n>] B<-e> script [file...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001317
1318Allowed sed scripts come in the following form:
1319
1320 'ADDR [!] COMMAND'
1321
1322 where address ADDR can be:
1323 NUMBER Match specified line number
1324 $ Match last line
1325 /REGEXP/ Match specified regexp
1326 (! inverts the meaning of the match)
1327
1328 and COMMAND can be:
1329 s/regexp/replacement/[igp]
1330 which attempt to match regexp against the pattern space
1331 and if successful replaces the matched portion with replacement.
1332
1333 aTEXT
1334 which appends TEXT after the pattern space
1335
1336Options:
1337
1338 -e add the script to the commands to be executed
1339 -n suppress automatic printing of pattern space
1340
1341This version of sed matches full regular expresions.
1342
1343Example:
1344
1345 $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
1346 bar
1347
1348-------------------------------
1349
Erik Andersen4f3f7572000-04-28 00:18:56 +00001350=item setkeycodes
1351
1352Usage: setkeycodes SCANCODE KEYCODE ...
1353
1354Set entries into the kernel's scancode-to-keycode map,
1355allowing unusual keyboards to generate usable keycodes.
1356
1357SCANCODE may be either xx or e0xx (hexadecimal),
1358and KEYCODE is given in decimal
1359
1360Example:
1361
1362 # setkeycodes e030 127
1363
1364-------------------------------
1365
Erik Andersen5e1189e2000-04-15 16:34:54 +00001366=item sh
1367
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001368Usage: sh
1369
1370lash -- the BusyBox LAme SHell (command interpreter)
1371
Erik Andersen3fe7f9f2000-04-19 03:59:10 +00001372This command does not yet have proper documentation.
1373
1374Use lash just as you would use any other shell. It properly handles pipes,
1375redirects, job control, can be used as the shell for scripts (#!/bin/sh), and
1376has a sufficient set of builtins to do what is needed. It does not (yet)
1377support Bourne Shell syntax. If you need things like "if-then-else", "while",
1378and such, use ash or bash. If you just need a very simple and extremely small
1379shell, this will do the job.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001380
1381-------------------------------
1382
1383=item sfdisk
1384
1385Usage: sfdisk [options] device ...
1386
1387device: something like /dev/hda or /dev/sda
1388
1389useful options:
1390
1391 -s [or --show-size]: list size of a partition
1392 -c [or --id]: print or change partition Id
1393 -l [or --list]: list partitions of each device
1394 -d [or --dump]: idem, but in a format suitable for later input
1395 -i [or --increment]: number cylinders etc. from 1 instead of from 0
1396 -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB
1397 -T [or --list-types]:list the known partition types
1398 -D [or --DOS]: for DOS-compatibility: waste a little space
1399 -R [or --re-read]: make kernel reread partition table
1400 -N# : change only the partition with number #
1401 -n : do not actually write to disk
1402 -O file : save the sectors that will be overwritten to file
1403 -I file : restore these sectors again
1404 -v [or --version]: print version
1405 -? [or --help]: print this message
1406
1407dangerous options:
1408
1409 -g [or --show-geometry]: print the kernel's idea of the geometry
1410 -x [or --show-extended]: also list extended partitions on output
1411
1412 or expect descriptors for them on input
1413 -L [or --Linux]: do not complain about things irrelevant for Linux
1414 -q [or --quiet]: suppress warning messages
1415 You can override the detected geometry using:
1416 -C# [or --cylinders #]:set the number of cylinders to use
1417 -H# [or --heads #]: set the number of heads to use
1418 -S# [or --sectors #]: set the number of sectors to use
1419
1420You can disable all consistency checking with:
1421
1422 -f [or --force]: do what I say, even if it is stupid
1423
1424-------------------------------
1425
1426=item sleep
1427
1428Usage: sleep N
1429
1430Pause for N seconds.
1431
1432Example:
1433
1434 $ sleep 2
1435 [2 second delay results]
1436
1437-------------------------------
1438
1439=item sort
1440
John Beppu9057b6a2000-04-16 10:22:28 +00001441Usage: sort [B<-n>] [B<-r>] [FILE]...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001442
1443Sorts lines of text in the specified files
1444
1445Example:
1446
1447 $ echo -e "e\nf\nb\nd\nc\na" | sort
1448 a
1449 b
1450 c
1451 d
1452 e
1453 f
1454
1455-------------------------------
1456
1457=item sync
1458
1459Usage: sync
1460
1461Write all buffered filesystem blocks to disk.
1462
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001463-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001464
John Beppu46a4e762000-01-18 22:33:11 +00001465=item syslogd
1466
Erik Andersen5e1189e2000-04-15 16:34:54 +00001467Usage: syslogd [OPTION]...
John Beppu4581b4c2000-01-19 15:04:41 +00001468
Erik Andersen5e1189e2000-04-15 16:34:54 +00001469Linux system and kernel (provides klogd) logging utility.
1470Note that this version of syslogd/klogd ignores /etc/syslog.conf.
John Beppu4581b4c2000-01-19 15:04:41 +00001471
Erik Andersen5e1189e2000-04-15 16:34:54 +00001472Options:
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001473
Erik Andersen5e1189e2000-04-15 16:34:54 +00001474 -m Change the mark timestamp interval. default=20min. 0=off
1475 -n Do not fork into the background (for when run by init)
1476 -K Do not start up the klogd process (by default syslogd spawns klogd).
1477 -O Specify an alternate log file. default=/var/log/messages
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001478
1479-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001480
John Beppu46a4e762000-01-18 22:33:11 +00001481=item swapon
1482
Erik Andersen5e1189e2000-04-15 16:34:54 +00001483Usage: swapon [OPTION] [device]
1484
1485Start swapping virtual memory pages on the given device.
1486
1487Options:
1488
1489 -a Start swapping on all swap devices
1490
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001491-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001492
John Beppu46a4e762000-01-18 22:33:11 +00001493=item swapoff
1494
Erik Andersen5e1189e2000-04-15 16:34:54 +00001495Usage: swapoff [OPTION] [device]
1496
1497Stop swapping virtual memory pages on the given device.
1498
1499Options:
1500
1501 -a Stop swapping on all swap devices
1502
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001503-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001504
John Beppu46a4e762000-01-18 22:33:11 +00001505=item tail
1506
Erik Andersen5e1189e2000-04-15 16:34:54 +00001507Usage: tail [OPTION] [FILE]...
1508
1509Print last 10 lines of each FILE to standard output.
1510With more than one FILE, precede each with a header giving the
1511file name. With no FILE, or when FILE is -, read standard input.
1512
1513Options:
1514
1515 -n NUM Print last NUM lines instead of first 10
1516 -f Output data as the file grows. This version
1517 of 'tail -f' supports only one file at a time.
1518
1519Example:
1520
1521 $ tail -n 1 /etc/resolv.conf
1522 nameserver 10.0.0.1
1523
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001524-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001525
John Beppu46a4e762000-01-18 22:33:11 +00001526=item tar
1527
John Beppu9057b6a2000-04-16 10:22:28 +00001528Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ...
Erik Andersen5e1189e2000-04-15 16:34:54 +00001529
1530Create, extract, or list files from a tar file. Note that
1531this version of tar treats hard links as separate files.
1532
1533Main operation mode:
1534
1535 c create
1536 x extract
1537 t list
1538
1539File selection:
1540
1541 f name of tarfile or "-" for stdin
1542 O extract to stdout
1543 --exclude file to exclude
1544
1545Informative output:
1546
1547 v verbosely list files processed
1548
1549Example:
1550
1551 $ zcat /tmp/tarball.tar.gz | tar -xf -
1552 $ tar -cf /tmp/tarball.tar /usr/local
1553
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001554-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001555
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001556=item test, [
1557
Erik Andersen5e1189e2000-04-15 16:34:54 +00001558Usage: test EXPRESSION
1559or [ EXPRESSION ]
1560
1561Checks file types and compares values returning an exit
1562code determined by the value of EXPRESSION.
1563
1564Example:
1565
1566 $ test 1 -eq 2
1567 $ echo $?
1568 1
1569 $ test 1 -eq 1
1570 $ echo $?
1571 0
1572 $ [ -d /etc ]
1573 $ echo $?
1574 0
1575 $ [ -d /junk ]
1576 $ echo $?
1577 1
1578
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001579-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001580
John Beppu46a4e762000-01-18 22:33:11 +00001581=item tee
1582
Erik Andersen5e1189e2000-04-15 16:34:54 +00001583Usage: tee [OPTION]... [FILE]...
1584
1585Copy standard input to each FILE, and also to standard output.
1586
1587Options:
1588
1589 -a append to the given FILEs, do not overwrite
1590
1591Example:
1592
1593 $ echo "Hello" | tee /tmp/foo
1594 $ cat /tmp/foo
1595 Hello
1596
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001597-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001598
John Beppu46a4e762000-01-18 22:33:11 +00001599=item touch
1600
John Beppu9057b6a2000-04-16 10:22:28 +00001601Usage: touch [B<-c>] file [file ...]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001602
1603Update the last-modified date on (or create) the selected file[s].
1604
1605Example:
1606
1607 $ ls -l /tmp/foo
1608 /bin/ls: /tmp/foo: No such file or directory
1609 $ touch /tmp/foo
1610 $ ls -l /tmp/foo
1611 -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
1612
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001613-------------------------------
1614
1615=item tr
Erik Andersena19bc642000-05-02 06:40:02 +00001616
Erik Andersen3c1217c2000-05-01 22:34:24 +00001617Usage: tr [-cds] STRING1 [STRING2]
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001618
Erik Andersen3c1217c2000-05-01 22:34:24 +00001619Translate, squeeze, and/or delete characters from
1620standard input, writing to standard output.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001621
Erik Andersen3c1217c2000-05-01 22:34:24 +00001622Options:
1623
1624 -c take complement of STRING1
1625 -d delete input characters coded STRING1
1626 -s squeeze multiple output characters of STRING2 into one character
Erik Andersen5e1189e2000-04-15 16:34:54 +00001627
1628Example:
1629
1630 $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
1631 hello world
1632
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001633-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001634
John Beppu46a4e762000-01-18 22:33:11 +00001635=item true
1636
Erik Andersen5e1189e2000-04-15 16:34:54 +00001637Returns an exit code of TRUE (0)
1638
1639Example:
1640
1641 $ true
1642 $ echo $?
1643 0
1644
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001645-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001646
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001647=item tty
John Beppu4581b4c2000-01-19 15:04:41 +00001648
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001649Usage: tty
1650
1651Print the file name of the terminal connected to standard input.
1652
1653Options:
1654
1655 -s print nothing, only return an exit status
1656
1657Example:
1658
1659 $ tty
1660 /dev/tty2
Erik Andersen5e1189e2000-04-15 16:34:54 +00001661
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001662-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001663
John Beppu46a4e762000-01-18 22:33:11 +00001664=item umount
1665
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001666Usage: umount [flags] filesystem|directory
1667
1668Flags:
1669
Erik Andersen6c5f2c62000-05-05 19:49:33 +00001670 -a: Unmount all file systems
1671 -r: Try to remount devices as read-only if mount is busy
1672 -f: Force filesystem umount (i.e. unreachable NFS server)
1673 -l: Do not free loop device (if a loop device has been used)
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001674
1675Example:
1676
1677 $ umount /dev/hdc1
Erik Andersen5e1189e2000-04-15 16:34:54 +00001678
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001679-------------------------------
John Beppuf17792c2000-04-13 03:16:01 +00001680
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001681=item uname
John Beppuf17792c2000-04-13 03:16:01 +00001682
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001683Usage: uname [OPTION]...
1684
Erik Andersen26702fe2000-04-17 16:44:46 +00001685Print certain system information. With no OPTION, same as B<-s>.
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001686
1687Options:
1688
1689 -a print all information
1690 -m the machine (hardware) type
1691 -n print the machine's network node hostname
1692 -r print the operating system release
1693 -s print the operating system name
1694 -p print the host processor type
1695 -v print the operating system version
1696
1697Example:
1698
1699 $ uname -a
1700 Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001701
1702-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001703
John Beppu46a4e762000-01-18 22:33:11 +00001704=item uniq
1705
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001706Usage: uniq [OPTION]... [INPUT [OUTPUT]]
1707
1708Discard all but one of successive identical lines from INPUT
1709(or standard input), writing to OUTPUT (or standard output).
1710
1711Example:
1712
1713 $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
1714 a
1715 b
1716 c
Erik Andersen5e1189e2000-04-15 16:34:54 +00001717
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001718-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001719
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001720=item update
John Beppu4581b4c2000-01-19 15:04:41 +00001721
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001722Usage: update [options]
1723
1724Periodically flushes filesystem buffers.
1725
1726Options:
1727
1728 -S force use of sync(2) instead of flushing
1729 -s SECS call sync this often (default 30)
1730 -f SECS flush some buffers this often (default 5)
Erik Andersen5e1189e2000-04-15 16:34:54 +00001731
1732-------------------------------
1733
1734=item uptime
1735
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001736Usage: uptime
1737
1738Tells how long the system has been running since boot.
1739
1740Example:
1741
1742 $ uptime
1743 1:55pm up 2:30, load average: 0.09, 0.04, 0.00
Erik Andersen5e1189e2000-04-15 16:34:54 +00001744
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001745-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001746
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001747=item usleep
1748
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001749Usage: usleep N
1750
1751Pauses for N microseconds.
1752
1753Example:
1754
1755 $ usleep 1000000
1756 [pauses for 1 second]
Erik Andersen5e1189e2000-04-15 16:34:54 +00001757
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001758-------------------------------
1759
1760=item wc
1761
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001762Usage: wc [OPTION]... [FILE]...
1763
1764Print line, word, and byte counts for each FILE, and a total line if
1765more than one FILE is specified. With no FILE, read standard input.
1766
1767Options:
1768
1769 -c print the byte counts
1770 -l print the newline counts
1771 -L print the length of the longest line
1772 -w print the word counts
1773
1774Example:
1775
1776 $ wc /etc/passwd
1777 31 46 1365 /etc/passwd
Erik Andersen5e1189e2000-04-15 16:34:54 +00001778
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001779-------------------------------
1780
1781=item whoami
1782
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001783Usage: whoami
1784
1785Prints the user name associated with the current effective user id.
1786
1787Example:
1788
1789 $ whoami
1790 andersen
Erik Andersen5e1189e2000-04-15 16:34:54 +00001791
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001792-------------------------------
1793
1794=item yes
1795
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001796Usage: yes [OPTION]... [STRING]...
1797
1798Repeatedly outputs a line with all specified STRING(s), or `y'.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001799
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001800-------------------------------
John Beppu46a4e762000-01-18 22:33:11 +00001801
1802=item zcat
1803
Erik Andersen26702fe2000-04-17 16:44:46 +00001804This is essentially an alias for invoking "gunzip B<-c>", where
Erik Andersene5b6c7d2000-04-17 16:16:10 +00001805it decompresses the file inquestion and send the output to stdout.
Erik Andersen5e1189e2000-04-15 16:34:54 +00001806
Erik Andersen9cf3bfa2000-04-13 18:49:43 +00001807-------------------------------
John Beppu4581b4c2000-01-19 15:04:41 +00001808
John Beppu46a4e762000-01-18 22:33:11 +00001809=back
John Beppu3a1b6be2000-01-18 15:45:59 +00001810
Erik Andersena19bc642000-05-02 06:40:02 +00001811=head1 LIBC NSS
1812
1813GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
1814library for the local environment, and to configure how it reads system data,
1815such as passwords and group information. BusyBox has made it Policy that it
1816will never use NSS, and will never use and libc calls that make use of NSS.
1817This allows you to run an embedded system without the need for installing an
1818/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
1819
1820If you are using a system that is using a remote LDAP server for authentication
1821via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
1822BusyBox source. Chances are though, that if you have enough space to install
1823of that stuff on your system, then you probably want the full GNU utilities.
1824
John Beppu3a1b6be2000-01-18 15:45:59 +00001825=head1 SEE ALSO
1826
1827textutils(1), shellutils(1), etc...
1828
1829=head1 MAINTAINER
1830
Erik Andersen1101d232000-04-19 05:15:12 +00001831Erik Andersen <andersee@debian.org> <andersen@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001832
1833=head1 AUTHORS
1834
John Beppu08fe43d2000-01-19 12:39:16 +00001835The following people have contributed code to BusyBox whether
1836they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +00001837
Erik Andersen1101d232000-04-19 05:15:12 +00001838Erik Andersen <andersee@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001839
John Beppu08fe43d2000-01-19 12:39:16 +00001840=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001841
John Beppu08fe43d2000-01-19 12:39:16 +00001842John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001843
John Beppu08fe43d2000-01-19 12:39:16 +00001844=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001845
John Beppu08fe43d2000-01-19 12:39:16 +00001846Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +00001847
John Beppu08fe43d2000-01-19 12:39:16 +00001848=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001849
John Beppu08fe43d2000-01-19 12:39:16 +00001850Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +00001851
John Beppu08fe43d2000-01-19 12:39:16 +00001852=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +00001853
John Beppu08fe43d2000-01-19 12:39:16 +00001854Dave Cinege <dcinege@psychosis.com>
1855
1856=for html <br>
1857
John Beppu50ed0672000-04-13 23:44:04 +00001858Karl M. Hegbloom <karlheg@debian.org>
1859
1860=for html <br>
1861
John Beppu4fd10fc2000-04-17 05:13:59 +00001862John Lombardo <john@deltanet.com>
1863
1864=for html <br>
1865
John Beppu08fe43d2000-01-19 12:39:16 +00001866Bruce Perens <bruce@perens.com>
1867
1868=for html <br>
1869
1870Linus Torvalds <torvalds@transmeta.com>
1871
1872=for html <br>
1873
1874Charles P. Wright <cpwright@villagenet.com>
1875
1876=for html <br>
1877
1878Enrique Zanardi <ezanardi@ull.es>
1879
1880=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +00001881
1882=cut
John Beppu08fe43d2000-01-19 12:39:16 +00001883
Erik Andersen7ab9c7e2000-05-12 19:41:47 +00001884# $Id: busybox.pod,v 1.30 2000/05/12 19:41:47 erik Exp $