blob: 8d8e198c58b1841cc642c6ae4c238e1ad7fc14f8 [file] [log] [blame]
John Beppu3a1b6be2000-01-18 15:45:59 +00001=head1 NAME
2
John Beppu46a4e762000-01-18 22:33:11 +00003busybox - I am BusyBox of Borg. Unix will be assimilated.
John Beppu3a1b6be2000-01-18 15:45:59 +00004
5=head1 SYNOPSIS
6
John Beppu46a4e762000-01-18 22:33:11 +00007 busybox <function> [arguments...] # or
8
9 <function> [arguments...] # if symlinked
John Beppu3a1b6be2000-01-18 15:45:59 +000010
11=head1 DESCRIPTION
12
John Beppu08fe43d2000-01-19 12:39:16 +000013BusyBox is a multi-call binary that combines many common Unix utilities into a
14single executable. Most people will create a symlink to busybox for each
15function name, and BusyBox will act like whatever you invoke it as.
16
17BusyBox has been written with size-optimization in mind. It is very easy to
18include or exclude the commands you want installed. BusyBox tries to make
19itself useful to small systems with limited resources.
John Beppu46a4e762000-01-18 22:33:11 +000020
21=head1 COMMANDS
22
23Currently defined functions:
24busybox, cat, chmod, chown, chgrp, chroot, clear, chvt, cp, date,
25dd, df, dmesg, du, fbset, find, free, deallocvt, fsck.minix, mkfs.minix,
26grep, head, hostname, init, linuxrc, kill, ln, ls, lsmod, mkdir,
27mknod, mkswap, more, mount, mv, ping, poweroff, ps, pwd, reboot,
28rm, rmdir, sed, sleep, sort, sync, syslogd, swapon, swapoff, tail,
29tar, tee, touch, true, false, uname, umount, uniq, update, zcat,
30gunzip, gzip
31
John Beppu46a4e762000-01-18 22:33:11 +000032=over 4
33
John Beppu46a4e762000-01-18 22:33:11 +000034=item cat
35
John Beppu4581b4c2000-01-19 15:04:41 +000036Usage: cat [file ...]
37
38
John Beppu46a4e762000-01-18 22:33:11 +000039=item chmod
40
John Beppu4581b4c2000-01-19 15:04:41 +000041Usage: chmod [-R] MODE[,MODE]... FILE...
42
43Each MODE is one or more of the letters ugoa, one of the symbols +-= and
44one or more of the letters rwxst.
45
46Options:
47
48 -R change files and directories recursively.
49
50
John Beppu46a4e762000-01-18 22:33:11 +000051=item chown
52
John Beppu4581b4c2000-01-19 15:04:41 +000053Usage: chown [OPTION]... OWNER[.[GROUP] FILE...
54
55Change the owner and/or group of each FILE to OWNER and/or GROUP.
56
57Options:
58
59 -R change files and directories recursively
60
61
John Beppu46a4e762000-01-18 22:33:11 +000062=item chgrp
63
John Beppu4581b4c2000-01-19 15:04:41 +000064Usage: chgrp [OPTION]... GROUP FILE...
65
66Change the group membership of each FILE to GROUP.
67
68Options:
69
70 -R change files and directories recursively
71
72
John Beppu46a4e762000-01-18 22:33:11 +000073=item chroot
74
John Beppu4581b4c2000-01-19 15:04:41 +000075Usage: chroot NEWROOT [COMMAND...]
76
77Run COMMAND with root directory set to NEWROOT.
78
79
John Beppu46a4e762000-01-18 22:33:11 +000080=item clear
81
John Beppu4581b4c2000-01-19 15:04:41 +000082
83
John Beppu46a4e762000-01-18 22:33:11 +000084=item chvt
85
John Beppu4581b4c2000-01-19 15:04:41 +000086Usage: chvt N
87
88Change foreground virtual terminal to /dev/ttyN
89
90
John Beppu46a4e762000-01-18 22:33:11 +000091=item cp
92
John Beppu4581b4c2000-01-19 15:04:41 +000093Usage: cp [OPTION]... SOURCE DEST
94
95or: cp [OPTION]... SOURCE... DIRECTORY
96
97Copy 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
John Beppu46a4e762000-01-18 22:33:11 +0000105=item date
106
John Beppu4581b4c2000-01-19 15:04:41 +0000107
108
John Beppu46a4e762000-01-18 22:33:11 +0000109=item dd
110
John Beppu4581b4c2000-01-19 15:04:41 +0000111Usage: dd [if=name] [of=name] [bs=n] [count=n]
112
113Copy 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
John Beppu46a4e762000-01-18 22:33:11 +0000122=item df
123
John Beppu4581b4c2000-01-19 15:04:41 +0000124Usage: df
125
John Beppu46a4e762000-01-18 22:33:11 +0000126=item dmesg
127
John Beppu4581b4c2000-01-19 15:04:41 +0000128Usage: dmesg [-c] [-n level] [-s bufsize]
129
130
John Beppu46a4e762000-01-18 22:33:11 +0000131=item du
132
John Beppu4581b4c2000-01-19 15:04:41 +0000133Usage: Usage: du [OPTION]... [FILE]...
134
135 -s display only a total for each argument
136
137
John Beppu46a4e762000-01-18 22:33:11 +0000138=item fbset
139
John Beppu4581b4c2000-01-19 15:04:41 +0000140Usage: fbset [options] [mode]
141
142Options:
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
John Beppu46a4e762000-01-18 22:33:11 +0000158=item find
159
John Beppu4581b4c2000-01-19 15:04:41 +0000160Usage: find [PATH...] [EXPRESSION]
161
162Search for files in a directory hierarchy. The default PATH is
163the current directory; default EXPRESSION is '-print'
164
165EXPRESSION 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
John Beppu46a4e762000-01-18 22:33:11 +0000175=item free
176
John Beppu4581b4c2000-01-19 15:04:41 +0000177Usage: free
178
John Beppu46a4e762000-01-18 22:33:11 +0000179=item deallocvt
180
John Beppu4581b4c2000-01-19 15:04:41 +0000181Usage: deallocvt N
182
183Deallocate unused virtual terminal /dev/ttyN
184
185
John Beppu46a4e762000-01-18 22:33:11 +0000186=item fsck.minix
187
John Beppu4581b4c2000-01-19 15:04:41 +0000188Usage: fsck.minix [-larvsmf] /dev/name
189
190Performs a consistency check for MINIX filesystems.
191
192Options:
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
John Beppu46a4e762000-01-18 22:33:11 +0000203=item mkfs.minix
204
John Beppu4581b4c2000-01-19 15:04:41 +0000205Usage: mkfs.minix [-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]
206
207Make a MINIX filesystem.
208
209Options:
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
John Beppu46a4e762000-01-18 22:33:11 +0000218=item grep
219
John Beppu4581b4c2000-01-19 15:04:41 +0000220
221
John Beppu46a4e762000-01-18 22:33:11 +0000222=item head
223
John Beppu4581b4c2000-01-19 15:04:41 +0000224Usage: Usage: head [FILE]...
225
226Print first 10 lines of each FILE to standard output.
227With more than one FILE, precede each with a header giving the
228file name. With no FILE, or when FILE is -, read standard input.
229
230
John Beppu46a4e762000-01-18 22:33:11 +0000231=item hostname
232
John Beppu4581b4c2000-01-19 15:04:41 +0000233Usage: hostname [OPTION] {hostname | -F file}
John Beppu46a4e762000-01-18 22:33:11 +0000234
John Beppu4581b4c2000-01-19 15:04:41 +0000235Get 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
238Options:
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
John Beppu46a4e762000-01-18 22:33:11 +0000245
246=item kill
247
John Beppu4581b4c2000-01-19 15:04:41 +0000248
249
John Beppu46a4e762000-01-18 22:33:11 +0000250=item ln
251
John Beppu4581b4c2000-01-19 15:04:41 +0000252Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
253Create a link named LINK_NAME or DIRECTORY to the specified TARGET
254
255Options:
256
257 -s make symbolic links instead of hard links
258 -f remove existing destination files
259
260
John Beppu46a4e762000-01-18 22:33:11 +0000261=item ls
262
John Beppu4581b4c2000-01-19 15:04:41 +0000263Usage: ls [-1acdelnpuxACF] [filenames...]
264
265
John Beppu46a4e762000-01-18 22:33:11 +0000266=item lsmod
267
John Beppu4581b4c2000-01-19 15:04:41 +0000268
269
John Beppu46a4e762000-01-18 22:33:11 +0000270=item mkdir
271
John Beppu4581b4c2000-01-19 15:04:41 +0000272Usage: Usage: mkdir [OPTION] DIRECTORY...
273Create the DIRECTORY(ies), if they do not already exist
274
275Options:
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
John Beppu46a4e762000-01-18 22:33:11 +0000281=item mknod
282
John Beppu4581b4c2000-01-19 15:04:41 +0000283Usage: mknod NAME TYPE MAJOR MINOR
284Make block or character special files.
285
286TYPEs 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
John Beppu46a4e762000-01-18 22:33:11 +0000293=item mkswap
294
John Beppu4581b4c2000-01-19 15:04:41 +0000295Usage: mkswap [-c] [-v0|-v1] device [block-count]
296Prepare a disk partition to be used as a swap partition.
297
298Options:
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
John Beppu46a4e762000-01-18 22:33:11 +0000306=item more
307
John Beppu4581b4c2000-01-19 15:04:41 +0000308Usage: more [file ...]
309
310
John Beppu46a4e762000-01-18 22:33:11 +0000311=item mount
312
John Beppu4581b4c2000-01-19 15:04:41 +0000313Usage: mount [flags]
314
315mount [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
332There are EVEN MORE flags that are specific to each filesystem.
333You'll have to see the written documentation for those.
334
335
John Beppu46a4e762000-01-18 22:33:11 +0000336=item mv
337
John Beppu4581b4c2000-01-19 15:04:41 +0000338Usage: mv SOURCE DEST
339
340or: mv SOURCE... DIRECTORY
341
342Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
343
344
John Beppu46a4e762000-01-18 22:33:11 +0000345=item ping
346
John Beppu4581b4c2000-01-19 15:04:41 +0000347
348
John Beppu46a4e762000-01-18 22:33:11 +0000349=item poweroff
350
John Beppu4581b4c2000-01-19 15:04:41 +0000351
352
John Beppu46a4e762000-01-18 22:33:11 +0000353=item ps
354
John Beppu4581b4c2000-01-19 15:04:41 +0000355Usage: ps
356
357Report process status.
358This version of ps accepts no options.
359
360
John Beppu46a4e762000-01-18 22:33:11 +0000361=item pwd
362
John Beppu4581b4c2000-01-19 15:04:41 +0000363
364
John Beppu46a4e762000-01-18 22:33:11 +0000365=item reboot
366
John Beppu4581b4c2000-01-19 15:04:41 +0000367
368
John Beppu46a4e762000-01-18 22:33:11 +0000369=item rm
370
John Beppu4581b4c2000-01-19 15:04:41 +0000371Usage: rm [OPTION]... FILE...
372Remove (unlink) the FILE(s).
373
374Options:
375
376 -f remove existing destinations, never prompt
377 -r or -R remove the contents of directories recursively
378
379
John Beppu46a4e762000-01-18 22:33:11 +0000380=item rmdir
381
John Beppu4581b4c2000-01-19 15:04:41 +0000382Usage: rmdir [OPTION]... DIRECTORY...
383Remove the DIRECTORY(ies), if they are empty.
384
385
John Beppu46a4e762000-01-18 22:33:11 +0000386=item sed
387
John Beppu4581b4c2000-01-19 15:04:41 +0000388Usage: sed [-n] -e script [file...]
389Allowed 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
404Options:
405
406-e add the script to the commands to be executed
407-n suppress automatic printing of pattern space
408
409This version of sed matches full regular expresions.
410
411
John Beppu46a4e762000-01-18 22:33:11 +0000412=item sleep
413
John Beppu4581b4c2000-01-19 15:04:41 +0000414Usage: sleep N
415
416Pause for N seconds.
417
418
John Beppu46a4e762000-01-18 22:33:11 +0000419=item sort
420
John Beppu4581b4c2000-01-19 15:04:41 +0000421Usage: Usage: sort [OPTION]... [FILE]...
422
423
John Beppu46a4e762000-01-18 22:33:11 +0000424=item sync
425
John Beppu4581b4c2000-01-19 15:04:41 +0000426Usage: sync
427
428Write all buffered filesystem blocks to disk.
429
430
John Beppu46a4e762000-01-18 22:33:11 +0000431=item syslogd
432
John Beppu4581b4c2000-01-19 15:04:41 +0000433Usage: syslogd [OPTION]...
434
435Linux system and kernel (provides klogd) logging utility.
436Note that this version of syslogd/klogd ignores /etc/syslog.conf.
437
438Options:
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
John Beppu46a4e762000-01-18 22:33:11 +0000446=item swapon
447
John Beppu4581b4c2000-01-19 15:04:41 +0000448Usage: swapon device
449
450Start swapping virtual memory pages on the given device.
451
452
John Beppu46a4e762000-01-18 22:33:11 +0000453=item swapoff
454
John Beppu4581b4c2000-01-19 15:04:41 +0000455Usage: swapoff device
456
457Stop swapping virtual memory pages on the given device.
458
459
John Beppu46a4e762000-01-18 22:33:11 +0000460=item tail
461
John Beppu4581b4c2000-01-19 15:04:41 +0000462Usage: tail [OPTION]... [FILE]...
463
464Print last 10 lines of each FILE to standard output.
465With more than one FILE, precede each with a header giving the file name.
466With 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
475If the first character of N (bytes or lines) is a `+', output begins with
476the Nth item from the start of each file, otherwise, print the last N items
477in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2).
478
479
John Beppu46a4e762000-01-18 22:33:11 +0000480=item tar
481
John Beppu4581b4c2000-01-19 15:04:41 +0000482
483
John Beppu46a4e762000-01-18 22:33:11 +0000484=item tee
485
John Beppu4581b4c2000-01-19 15:04:41 +0000486Usage: tee [OPTION]... [FILE]...
487Copy standard input to each FILE, and also to standard output.
488
489Options:
490
491 -a append to the given FILEs, do not overwrite
492
493
John Beppu46a4e762000-01-18 22:33:11 +0000494=item touch
495
John Beppu4581b4c2000-01-19 15:04:41 +0000496Usage: touch [-c] file [file ...]
497 Update the last-modified date on the given file[s].
498
499
John Beppu46a4e762000-01-18 22:33:11 +0000500=item true
501
John Beppu4581b4c2000-01-19 15:04:41 +0000502
503
John Beppu46a4e762000-01-18 22:33:11 +0000504=item false
505
John Beppu4581b4c2000-01-19 15:04:41 +0000506
507
John Beppu46a4e762000-01-18 22:33:11 +0000508=item uname
509
John Beppu4581b4c2000-01-19 15:04:41 +0000510Usage: uname [OPTION]...
511 Print certain system information. With no OPTION, same as -s.
512
513Options:
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
John Beppu46a4e762000-01-18 22:33:11 +0000524=item umount
525
John Beppu4581b4c2000-01-19 15:04:41 +0000526Usage: Usage: umount [flags] filesystem|directory
527 Flags:
528 -a: Unmount all file systems
529
530
John Beppu46a4e762000-01-18 22:33:11 +0000531=item uniq
532
John Beppu4581b4c2000-01-19 15:04:41 +0000533Usage: Usage: uniq [OPTION]... [INPUT [OUTPUT]]
534
535Discard all but one of successive identical lines from INPUT (or
536standard input), writing to OUTPUT (or standard output).
537
538 -h display this help and exit
539
540A field is a run of whitespace, then non-whitespace characters.
541Fields are skipped before chars.
542
John Beppu46a4e762000-01-18 22:33:11 +0000543
544=item zcat
545
John Beppu4581b4c2000-01-19 15:04:41 +0000546Usage: gunzip [OPTION]... FILE
547
548Uncompress FILE (or standard input if FILE is '-').
549
550Options:
551
552 -c Write output to standard output
553 -t Test compressed file integrity
554
555
John Beppu46a4e762000-01-18 22:33:11 +0000556=item gunzip
557
John Beppu4581b4c2000-01-19 15:04:41 +0000558Usage: gunzip [OPTION]... FILE
559
560Uncompress FILE (or standard input if FILE is '-').
561
562Options:
563
564 -c Write output to standard output
565 -t Test compressed file integrity
566
567
John Beppu46a4e762000-01-18 22:33:11 +0000568=item gzip
569
John Beppu4581b4c2000-01-19 15:04:41 +0000570Usage: gzip [OPTION]... FILE
571
572Compress FILE with maximum compression.
573When FILE is -, reads standard input. Implies -c.
574
575Options:
576
577 -c Write output to standard output instead of FILE.gz
578
579
580
John Beppu46a4e762000-01-18 22:33:11 +0000581=back
John Beppu3a1b6be2000-01-18 15:45:59 +0000582
583=head1 SEE ALSO
584
585textutils(1), shellutils(1), etc...
586
587=head1 MAINTAINER
588
589Erik Andersen <erik@lineo.com>
590
591=head1 AUTHORS
592
John Beppu08fe43d2000-01-19 12:39:16 +0000593The following people have contributed code to BusyBox whether
594they know it or not.
John Beppu3a1b6be2000-01-18 15:45:59 +0000595
John Beppu08fe43d2000-01-19 12:39:16 +0000596Erik Andersen <erik@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +0000597
John Beppu08fe43d2000-01-19 12:39:16 +0000598=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +0000599
John Beppu08fe43d2000-01-19 12:39:16 +0000600John Beppu <beppu@lineo.com>
John Beppu3a1b6be2000-01-18 15:45:59 +0000601
John Beppu08fe43d2000-01-19 12:39:16 +0000602=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +0000603
John Beppu08fe43d2000-01-19 12:39:16 +0000604Brian Candler <B.Candler@pobox.com>
John Beppu3a1b6be2000-01-18 15:45:59 +0000605
John Beppu08fe43d2000-01-19 12:39:16 +0000606=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +0000607
John Beppu08fe43d2000-01-19 12:39:16 +0000608Randolph Chung <tausq@debian.org>
John Beppu3a1b6be2000-01-18 15:45:59 +0000609
John Beppu08fe43d2000-01-19 12:39:16 +0000610=for html <br>
John Beppu46a4e762000-01-18 22:33:11 +0000611
John Beppu08fe43d2000-01-19 12:39:16 +0000612Dave Cinege <dcinege@psychosis.com>
613
614=for html <br>
615
616Bruce Perens <bruce@perens.com>
617
618=for html <br>
619
620Linus Torvalds <torvalds@transmeta.com>
621
622=for html <br>
623
624Charles P. Wright <cpwright@villagenet.com>
625
626=for html <br>
627
628Enrique Zanardi <ezanardi@ull.es>
629
630=for html <br>
John Beppu3a1b6be2000-01-18 15:45:59 +0000631
632=cut
John Beppu08fe43d2000-01-19 12:39:16 +0000633