Making note of my changes
[oweals/busybox.git] / docs / busybox.pod
1 =head1 NAME
2
3 busybox - I am BusyBox of Borg.  Unix will be assimilated.
4
5 =head1 SYNOPSIS
6
7  busybox <function> [arguments...]  # or
8
9  <function> [arguments...]          # if symlinked
10
11 =head1 DESCRIPTION
12
13 BusyBox is a multi-call binary that combines many common Unix utilities into a
14 single executable.  Most people will create a symlink to busybox for each
15 function name, and BusyBox will act like whatever you invoke it as.
16
17 BusyBox has been written with size-optimization in mind.  It is very easy to
18 include or exclude the commands you want installed.  BusyBox tries to make
19 itself useful to small systems with limited resources.
20
21 =head1 COMMANDS
22
23 Currently defined functions:
24 busybox, cat, chmod, chown, chgrp, chroot, clear, chvt, cp, date,
25 dd, df, dmesg, du, fbset, find, free, deallocvt, fsck.minix, mkfs.minix,
26 grep, head, hostname, init, linuxrc, kill, ln, ls, lsmod, mkdir,
27 mknod, mkswap, more, mount, mv, ping, poweroff, ps, pwd, reboot,
28 rm, rmdir, sed, sleep, sort, sync, syslogd, swapon, swapoff, tail,
29 tar, tee, touch, true, false, uname, umount, uniq, update, zcat,
30 gunzip, gzip
31
32 =over 4
33
34 =item cat
35
36 Usage: cat [file ...]
37  
38
39 =item chmod
40
41 Usage: chmod [-R] MODE[,MODE]... FILE...
42
43 Each MODE is one or more of the letters ugoa, one of the symbols +-= and
44 one or more of the letters rwxst.
45   
46 Options:
47
48  -R     change files and directories recursively.
49  
50
51 =item chown
52
53 Usage: chown [OPTION]...  OWNER[.[GROUP] FILE...
54
55 Change the owner and/or group of each FILE to OWNER and/or GROUP.
56  
57 Options:
58
59  -R     change files and directories recursively
60  
61
62 =item chgrp
63
64 Usage: chgrp [OPTION]... GROUP FILE...
65
66 Change the group membership of each FILE to GROUP.
67  
68 Options:
69
70  -R     change files and directories recursively
71  
72
73 =item chroot
74
75 Usage: chroot NEWROOT [COMMAND...]
76
77 Run COMMAND with root directory set to NEWROOT.
78  
79
80 =item clear
81
82
83
84 =item chvt
85
86 Usage: chvt N
87
88 Change foreground virtual terminal to /dev/ttyN
89  
90
91 =item cp
92
93 Usage: cp [OPTION]... SOURCE DEST
94
95 or: cp [OPTION]... SOURCE... DIRECTORY
96
97 Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.
98
99  -a     same as -dpR
100  -d     preserve links
101  -p     preserve file attributes if possible
102  -R     copy directories recursively
103  
104
105 =item date
106
107
108
109 =item dd
110
111 Usage: dd [if=name] [of=name] [bs=n] [count=n]
112
113 Copy a file, converting and formatting according to options
114
115  if=FILE        read from FILE instead of stdin
116  of=FILE        write to FILE instead of stout
117  bs=n           read and write N BYTES at a time
118  count=n        copy only n input blocks
119  BYTES may be suffixed by w (x2), k (x1024), b (x512), or m (x1024^2).
120  
121
122 =item df
123
124 Usage: df
125
126 =item dmesg
127
128 Usage: dmesg [-c] [-n level] [-s bufsize]
129  
130
131 =item du
132
133 Usage: Usage: du [OPTION]... [FILE]...
134
135   -s    display only a total for each argument
136  
137
138 =item fbset
139
140 Usage: fbset [options] [mode]
141
142 Options:
143
144  -h
145  -fb
146  -db
147  -a
148  -i
149  -g
150  -t
151  -accel
152  -hsync
153  -vsync
154  -laced
155  -double
156
157
158 =item find
159
160 Usage: find [PATH...] [EXPRESSION]
161
162 Search for files in a directory hierarchy.  The default PATH is
163 the current directory; default EXPRESSION is '-print'
164
165 EXPRESSION may consist of:
166
167  -follow
168  Dereference symbolic links.
169  -name PATTERN
170  File name (with leading directories removed) matches PATTERN.
171  -print
172  print the full file name followed by a newline to stdout.
173  This version of find matches full regular expresions.
174
175 =item free
176
177 Usage: free
178
179 =item deallocvt
180
181 Usage: deallocvt N
182
183 Deallocate unused virtual terminal /dev/ttyN
184  
185
186 =item fsck.minix
187
188 Usage: fsck.minix [-larvsmf] /dev/name
189
190 Performs a consistency check for MINIX filesystems.
191
192 Options:
193
194  -l     Lists all filenames
195  -r     Perform interactive repairs
196  -a     Perform automatic repairs
197  -v     verbose
198  -s     Outputs super-block information
199  -m     Activates MINIX-like "mode not cleared" warnings
200  -f     Force file system check.
201  
202
203 =item mkfs.minix
204
205 Usage: mkfs.minix [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]
206
207 Make a MINIX filesystem.
208
209 Options:
210
211  -c             Check the device for bad blocks
212  -n [14|30]     Specify the maximum length of filenames
213  -i             Specify the number of inodes for the filesystem
214  -l FILENAME    Read the bad blocks list from FILENAME
215  -v             Make a Minix version 2 filesystem
216  
217
218 =item grep
219
220
221
222 =item head
223
224 Usage: Usage: head [FILE]...
225
226 Print first 10 lines of each FILE to standard output.
227 With more than one FILE, precede each with a header giving the
228 file name. With no FILE, or when FILE is -, read standard input.
229  
230
231 =item hostname
232
233 Usage: hostname [OPTION] {hostname | -F file}
234
235 Get or set the hostname or DNS domain name. If a hostname is given
236 (or a file with the -F parameter), the host name will be set.
237  
238 Options:
239
240  -s             Short
241  -i             Addresses for the hostname
242  -d             DNS domain name
243  -F FILE                Use the contents of FILE to specify the hostname
244  
245
246 =item kill
247
248
249
250 =item ln
251
252 Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
253 Create a link named LINK_NAME or DIRECTORY to the specified TARGET
254  
255 Options:
256
257  -s     make symbolic links instead of hard links
258  -f     remove existing destination files
259  
260
261 =item ls
262
263 Usage: ls [-1acdelnpuxACF] [filenames...]
264  
265
266 =item lsmod
267
268
269
270 =item mkdir
271
272 Usage: Usage: mkdir [OPTION] DIRECTORY...
273 Create the DIRECTORY(ies), if they do not already exist
274  
275 Options:
276
277  -m     set permission mode (as in chmod), not rwxrwxrwx - umask
278  -p     no error if existing, make parent directories as needed
279  
280
281 =item mknod
282
283 Usage: mknod NAME TYPE MAJOR MINOR
284 Make block or character special files.
285
286 TYPEs include:
287
288  b:     Make a block (buffered) device.
289  c or u:        Make a character (un-buffered) device.
290  p:     Make a named pipe. Major and minor are ignored for named pipes.
291  
292
293 =item mkswap
294
295 Usage: mkswap [-c] [-v0|-v1] device [block-count]
296 Prepare a disk partition to be used as a swap partition.
297  
298 Options:
299
300  -c             Check for read-ability.
301  -v0            Make version 0 swap [max 128 Megs].
302  -v1            Make version 1 swap [big!] (default for kernels > 2.1.117).
303  block-count    Number of block to use (default is entire partition).
304  
305
306 =item more
307
308 Usage: more [file ...]
309  
310
311 =item mount
312
313 Usage:  mount [flags]
314
315 mount [flags] device directory [-o options,more-options]
316
317  Flags:
318  -a:    Mount all file systems in fstab.
319  -o option:     One of many filesystem options, listed below.
320  -r:    Mount the filesystem read-only.
321  -t filesystem-type:    Specify the filesystem type.
322  -w:    Mount for reading and writing (default).
323  Options for use with the "-o" flag:
324  async / sync:  Writes are asynchronous / synchronous.
325  dev / nodev:   Allow use of special device files / disallow them.
326  exec / noexec: Allow use of executable files / disallow them.
327  loop: Mounts a file via loop device.
328  suid / nosuid: Allow set-user-id-root programs / disallow them.
329  remount: Re-mount a currently-mounted filesystem, changing its flags.
330  ro / rw: Mount for read-only / read-write.
331
332 There are EVEN MORE flags that are specific to each filesystem.
333 You'll have to see the written documentation for those.
334  
335
336 =item mv
337
338 Usage: mv SOURCE DEST
339
340 or: mv SOURCE... DIRECTORY
341
342 Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
343  
344
345 =item ping
346
347
348
349 =item poweroff
350
351
352
353 =item ps
354
355 Usage: ps
356
357 Report process status.
358 This version of ps accepts no options.
359  
360
361 =item pwd
362
363
364
365 =item reboot
366
367
368
369 =item rm
370
371 Usage: rm [OPTION]... FILE...
372 Remove (unlink) the FILE(s).
373  
374 Options:
375
376  -f             remove existing destinations, never prompt
377  -r or -R       remove the contents of directories recursively
378  
379
380 =item rmdir
381
382 Usage: rmdir [OPTION]... DIRECTORY...
383 Remove the DIRECTORY(ies), if they are empty.
384  
385
386 =item sed
387
388 Usage: sed [-n] -e script [file...]
389 Allowed sed scripts come in the following form:
390
391  'ADDR [!] COMMAND'
392   where address ADDR can be:
393  NUMBER    Match specified line number
394  $         Match last line
395  /REGEXP/  Match specified regexp
396  (! inverts the meaning of the match)
397   and COMMAND can be:
398  s/regexp/replacement/[igp]
399  which attempt to match regexp against the pattern space
400  and if successful replaces the matched portion with replacement.
401   aTEXT
402  which appends TEXT after the pattern space
403
404 Options:
405
406 -e      add the script to the commands to be executed
407 -n      suppress automatic printing of pattern space
408
409 This version of sed matches full regular expresions.
410  
411
412 =item sleep
413
414 Usage: sleep N
415
416 Pause for N seconds.
417  
418
419 =item sort
420
421 Usage: Usage: sort [OPTION]... [FILE]...
422   
423
424 =item sync
425
426 Usage: sync
427
428 Write all buffered filesystem blocks to disk.
429  
430
431 =item syslogd
432
433 Usage: syslogd [OPTION]...
434
435 Linux system and kernel (provides klogd) logging utility.
436 Note that this version of syslogd/klogd ignores /etc/syslog.conf.
437  
438 Options:
439
440  -m     Change the mark timestamp interval. default=20min. 0=off
441  -n     Do not fork into the background (for when run by init)
442  -K     Do not start up the klogd process (by default syslogd spawns klogd).
443  -O     Specify an alternate log file.  default=/var/log/messages
444  
445
446 =item swapon
447
448 Usage: swapon device
449
450 Start swapping virtual memory pages on the given device.
451  
452
453 =item swapoff
454
455 Usage: swapoff device
456
457 Stop swapping virtual memory pages on the given device.
458  
459
460 =item tail
461
462 Usage: tail [OPTION]... [FILE]...
463
464 Print last 10 lines of each FILE to standard output.
465 With more than one FILE, precede each with a header giving the file name.
466 With no FILE, or when FILE is -, read standard input.
467
468  -c=N[kbm]       output the last N bytes
469  -f              output appended data as the file grows
470  -n=N            output the last N lines, instead of last 10
471  -q              never output headers giving file names
472  -v              always output headers giving file names
473  --help          display this help and exit
474
475 If the first character of N (bytes or lines) is a `+', output begins with 
476 the Nth item from the start of each file, otherwise, print the last N items
477 in the file.  N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).
478   
479
480 =item tar
481
482
483
484 =item tee
485
486 Usage: tee [OPTION]... [FILE]...
487 Copy standard input to each FILE, and also to standard output.
488  
489 Options:
490
491  -a     append to the given FILEs, do not overwrite
492  
493
494 =item touch
495
496 Usage: touch [-c] file [file ...]
497  Update the last-modified date on the given file[s].
498  
499
500 =item true
501
502
503
504 =item false
505
506
507
508 =item uname
509
510 Usage: uname [OPTION]...
511  Print certain system information.  With no OPTION, same as -s.
512  
513 Options:
514
515  -a     print all information
516  -m     the machine (hardware) type
517  -n     print the machine's network node hostname
518  -r     print the operating system release
519  -s     print the operating system name
520  -p     print the host processor type
521  -v     print the operating system version
522  
523
524 =item umount
525
526 Usage: Usage: umount [flags] filesystem|directory
527  Flags:
528  -a:    Unmount all file systems
529  
530
531 =item uniq
532
533 Usage: Usage: uniq [OPTION]... [INPUT [OUTPUT]]
534
535 Discard all but one of successive identical lines from INPUT (or
536 standard input), writing to OUTPUT (or standard output).
537
538  -h     display this help and exit
539
540 A field is a run of whitespace, then non-whitespace characters.
541 Fields are skipped before chars.
542  
543
544 =item zcat
545
546 Usage: gunzip [OPTION]... FILE
547
548 Uncompress FILE (or standard input if FILE is '-').
549  
550 Options:
551
552  -c     Write output to standard output
553  -t     Test compressed file integrity
554  
555
556 =item gunzip
557
558 Usage: gunzip [OPTION]... FILE
559
560 Uncompress FILE (or standard input if FILE is '-').
561  
562 Options:
563
564  -c     Write output to standard output
565  -t     Test compressed file integrity
566  
567
568 =item gzip
569
570 Usage: gzip [OPTION]... FILE
571
572 Compress FILE with maximum compression.
573 When FILE is -, reads standard input.  Implies -c.
574  
575 Options:
576
577  -c     Write output to standard output instead of FILE.gz
578  
579
580
581 =back
582
583 =head1 SEE ALSO
584
585 textutils(1), shellutils(1), etc...
586
587 =head1 MAINTAINER
588
589 Erik Andersen <erik@lineo.com>
590
591 =head1 AUTHORS
592
593 The following people have contributed code to BusyBox whether
594 they know it or not.
595
596 Erik Andersen <erik@lineo.com>
597
598 =for html <br>
599
600 John Beppu <beppu@lineo.com>
601
602 =for html <br>
603
604 Brian Candler <B.Candler@pobox.com>
605
606 =for html <br>
607
608 Randolph Chung <tausq@debian.org>
609
610 =for html <br>
611
612 Dave Cinege <dcinege@psychosis.com>     
613
614 =for html <br>
615
616 Bruce Perens <bruce@perens.com>
617
618 =for html <br>
619
620 Linus Torvalds <torvalds@transmeta.com>
621
622 =for html <br>
623
624 Charles P. Wright <cpwright@villagenet.com>
625
626 =for html <br>
627
628 Enrique Zanardi <ezanardi@ull.es>
629
630 =for html <br>
631
632 =cut
633