Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1 | # vi: set sw=4 ts=4: |
John Beppu | 08e7f75 | 2000-04-13 03:22:20 +0000 | [diff] [blame] | 2 | |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 3 | =head1 NAME |
| 4 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 5 | BusyBox - The Swiss Army Knife of Embedded Linux |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 6 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 7 | =head1 SYNTAX |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 8 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 9 | BusyBox <function> [arguments...] # or |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 10 | |
| 11 | <function> [arguments...] # if symlinked |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 12 | |
| 13 | =head1 DESCRIPTION |
| 14 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 15 | BusyBox combines tiny versions of many common UNIX utilities into a single |
| 16 | small executable. It provides minimalist replacements for most of the utilities |
| 17 | you usually find in fileutils, shellutils, findutils, textutils, grep, gzip, |
| 18 | tar, etc. BusyBox provides a fairly complete POSIX environment for any small |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 19 | or embedded system. The utilities in BusyBox generally have fewer options than |
Eric Andersen | f2fffef | 2000-06-05 17:23:06 +0000 | [diff] [blame] | 20 | their full-featured GNU cousins; however, the options that are included provide |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 21 | the expected functionality and behave very much like their GNU counterparts. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 22 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 23 | BusyBox has been written with size-optimization and limited resources in mind. |
| 24 | It is also extremely modular so you can easily include or exclude commands (or |
| 25 | features) at compile time. This makes it easy to customize your embedded |
| 26 | systems. To create a working system, just add a kernel, a shell (such as ash), |
| 27 | and an editor (such as elvis-tiny or ae). |
| 28 | |
| 29 | =head1 USAGE |
| 30 | |
| 31 | When you create a link to BusyBox for the function you wish to use, when BusyBox |
| 32 | is called using that link it will behave as if the command itself has been invoked. |
| 33 | |
| 34 | For example, entering |
| 35 | |
| 36 | ln -s ./BusyBox ls |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 37 | ./ls |
| 38 | |
| 39 | will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 40 | into BusyBox). |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 41 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 42 | You can also invoke BusyBox by issuing the command as an argument on the |
| 43 | command line. For example, entering |
| 44 | |
| 45 | ./BusyBox ls |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 46 | |
| 47 | will also cause BusyBox to behave as 'ls'. |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 48 | |
Erik Andersen | eef6580 | 2000-04-19 05:12:02 +0000 | [diff] [blame] | 49 | =head1 COMMON OPTIONS |
| 50 | |
| 51 | Most BusyBox commands support the B<--help> option to provide a |
| 52 | terse runtime description of their behavior. |
| 53 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 54 | =head1 COMMANDS |
| 55 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 56 | Currently defined functions include: |
| 57 | |
Pavel Roskin | f7a0195 | 2000-06-21 20:25:07 +0000 | [diff] [blame] | 58 | ar, basename, cat, chgrp, chmod, chown, chroot, chvt, clear, cp, cut, date, |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 59 | dc, dd, deallocvt, df, dirname, dmesg, du, dumpkmap, dutmp, echo, false, fbset, |
Pavel Roskin | f7a0195 | 2000-06-21 20:25:07 +0000 | [diff] [blame] | 60 | fdflush, find, free, freeramdisk, fsck.minix, grep, gunzip, gzip, halt, |
| 61 | head, hostid, hostname, id, init, insmod, kill, killall, length, ln, |
| 62 | loadacm, loadfont, loadkmap, logger, logname, ls, lsmod, makedevs, mkdir, |
| 63 | mkfifo, mkfs.minix, mknod, mkswap, mktemp, more, mount, mt, mv, nc, |
Eric Andersen | bf960f5 | 2000-07-21 21:32:12 +0000 | [diff] [blame^] | 64 | nslookup, ping, poweroff, printf, ps, pwd, reboot, renice, rm, rmdir, rmmod, sed, |
Eric Andersen | 9cf44e7 | 2000-07-08 00:09:30 +0000 | [diff] [blame] | 65 | setkeycodes, sh, sleep, sort, swapoff, swapon, sync, syslogd, tail, |
Pavel Roskin | f7a0195 | 2000-06-21 20:25:07 +0000 | [diff] [blame] | 66 | tar, tee, telnet, test, touch, tr, true, tty, umount, uname, uniq, update, |
| 67 | uptime, usleep, uudecode, uuencode, wc, which, whoami, yes, zcat, [ |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 68 | |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 69 | ------------------------------- |
| 70 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 71 | =over 4 |
| 72 | |
Eric Andersen | 86ab8a3 | 2000-06-02 03:21:42 +0000 | [diff] [blame] | 73 | =item ar |
| 74 | |
| 75 | Usage: ar [optxvV] archive [filenames] |
| 76 | |
| 77 | Extract or list files from an ar archive. |
| 78 | |
| 79 | Options: |
| 80 | |
| 81 | o preserve original dates |
| 82 | p extract to stdout |
| 83 | t list |
| 84 | x extract |
| 85 | v verbosely list files processed |
| 86 | |
| 87 | ------------------------------- |
| 88 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 89 | =item basename |
| 90 | |
Erik Andersen | ac130e1 | 2000-05-10 05:00:31 +0000 | [diff] [blame] | 91 | Usage: basename FILE [SUFFIX] |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 92 | |
Erik Andersen | ac130e1 | 2000-05-10 05:00:31 +0000 | [diff] [blame] | 93 | Strips directory path and suffixes from FILE. |
| 94 | If specified, also removes any trailing SUFFIX. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 95 | |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 96 | Example: |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 97 | |
| 98 | $ basename /usr/local/bin/foo |
| 99 | foo |
| 100 | $ basename /usr/local/bin/ |
| 101 | bin |
Erik Andersen | ac130e1 | 2000-05-10 05:00:31 +0000 | [diff] [blame] | 102 | $ basename /foo/bar.txt .txt |
| 103 | bar |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 104 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 105 | ------------------------------- |
| 106 | |
Erik Andersen | a6c7522 | 2000-04-18 00:00:52 +0000 | [diff] [blame] | 107 | =item cat |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 108 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 109 | Usage: cat [FILE ...] |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 110 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 111 | Concatenates FILE(s) and prints them to the standard output. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 112 | |
| 113 | Example: |
| 114 | |
| 115 | $ cat /proc/uptime |
| 116 | 110716.72 17.67 |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 117 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 118 | ------------------------------- |
| 119 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 120 | =item chgrp |
| 121 | |
| 122 | Usage: chgrp [OPTION]... GROUP FILE... |
| 123 | |
| 124 | Change the group membership of each FILE to GROUP. |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 125 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 126 | Options: |
| 127 | |
| 128 | -R change files and directories recursively |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 129 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 130 | Example: |
| 131 | |
| 132 | $ ls -l /tmp/foo |
| 133 | -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo |
| 134 | $ chgrp root /tmp/foo |
| 135 | $ ls -l /tmp/foo |
| 136 | -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo |
| 137 | |
| 138 | ------------------------------- |
| 139 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 140 | =item chmod |
| 141 | |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 142 | Usage: chmod [B<-R>] MODE[,MODE]... FILE... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 143 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 144 | Changes file access permissions for the specified FILE(s) (or directories). |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 145 | Each MODE is defined by combining the letters for WHO has access to the file, |
| 146 | an OPERATOR for selecting how the permissions should be changed, and a |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 147 | PERMISSION for FILE(s) (or directories). |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 148 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 149 | WHO may be chosen from |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 150 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 151 | u User who owns the file |
| 152 | g Users in the file's Group |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 153 | o Other users not in the file's group |
| 154 | a All users |
| 155 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 156 | OPERATOR may be chosen from |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 157 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 158 | + Add a permission |
| 159 | - Remove a permission |
| 160 | = Assign a permission |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 161 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 162 | PERMISSION may be chosen from |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 163 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 164 | r Read |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 165 | w Write |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 166 | x Execute (or access for directories) |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 167 | s Set user (or group) ID bit |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 168 | t Sticky bit (for directories prevents removing files by non-owners) |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 169 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 170 | Alternately, permissions can be set numerically where the first three |
| 171 | numbers are calculated by adding the octal values, such as |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 172 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 173 | 4 Read |
| 174 | 2 Write |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 175 | 1 Execute |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 176 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 177 | An optional fourth digit can also be used to specify |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 178 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 179 | 4 Set user ID |
| 180 | 2 Set group ID |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 181 | 1 Sticky bit |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 182 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 183 | Options: |
| 184 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 185 | -R Change files and directories recursively. |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 186 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 187 | Example: |
| 188 | |
| 189 | $ ls -l /tmp/foo |
| 190 | -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo |
| 191 | $ chmod u+x /tmp/foo |
| 192 | $ ls -l /tmp/foo |
| 193 | -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo* |
| 194 | $ chmod 444 /tmp/foo |
| 195 | $ ls -l /tmp/foo |
| 196 | -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 197 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 198 | ------------------------------- |
| 199 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 200 | =item chown |
| 201 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 202 | Usage: chown [OPTION]... OWNER[<.|:>[GROUP] FILE... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 203 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 204 | Changes the owner and/or group of each FILE to OWNER and/or GROUP. |
John Beppu | 5a50def | 2000-04-17 17:46:46 +0000 | [diff] [blame] | 205 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 206 | Options: |
| 207 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 208 | -R Changes files and directories recursively |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 209 | |
| 210 | Example: |
| 211 | |
| 212 | $ ls -l /tmp/foo |
| 213 | -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo |
| 214 | $ chown root /tmp/foo |
| 215 | $ ls -l /tmp/foo |
| 216 | -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo |
| 217 | $ chown root.root /tmp/foo |
| 218 | ls -l /tmp/foo |
| 219 | -r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 220 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 221 | ------------------------------- |
| 222 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 223 | =item chroot |
| 224 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 225 | Usage: chroot NEWROOT [COMMAND...] |
| 226 | |
| 227 | Run COMMAND with root directory set to NEWROOT. |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 228 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 229 | Example: |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 230 | |
| 231 | $ ls -l /bin/ls |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 232 | lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 233 | $ mount /dev/hdc1 /mnt -t minix |
| 234 | $ chroot /mnt |
| 235 | $ ls -l /bin/ls |
| 236 | -rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls* |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 237 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 238 | ------------------------------- |
| 239 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 240 | =item chvt |
| 241 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 242 | Usage: chvt N |
| 243 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 244 | Changes the foreground virtual terminal to /dev/ttyN |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 245 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 246 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 247 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 248 | =item clear |
| 249 | |
| 250 | Clears the screen. |
| 251 | |
| 252 | ------------------------------- |
| 253 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 254 | =item cp |
| 255 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 256 | Usage: cp [OPTION]... SOURCE DEST |
| 257 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 258 | or: cp [OPTION]... SOURCE... DIRECTORY |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 259 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 260 | Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 261 | |
Erik Andersen | e31c066 | 2000-05-02 05:32:07 +0000 | [diff] [blame] | 262 | Options: |
| 263 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 264 | -a Same as -dpR |
| 265 | -d Preserves links |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 266 | -p Preserves file attributes if possible |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 267 | -R Copies directories recursively |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 268 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 269 | ------------------------------- |
| 270 | |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 271 | =item cut |
| 272 | |
| 273 | Usage: cut [OPTION]... [FILE]... |
| 274 | |
| 275 | Prints selected fields from each input FILE to standard output. |
| 276 | |
| 277 | Options: |
| 278 | |
Eric Andersen | 1386e70 | 2000-06-26 12:14:30 +0000 | [diff] [blame] | 279 | -b LIST Output only bytes from LIST |
| 280 | -c LIST Output only characters from LIST |
| 281 | -d CHAR Use CHAR instead of tab as the field delimiter |
Pavel Roskin | 0010ee4 | 2000-07-21 15:10:57 +0000 | [diff] [blame] | 282 | -s Output only the lines containing delimiter |
Eric Andersen | 1386e70 | 2000-06-26 12:14:30 +0000 | [diff] [blame] | 283 | -f N Print only these fields |
| 284 | -n Ignored |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 285 | |
| 286 | Example: |
| 287 | |
| 288 | $ echo "Hello world" | cut -f 1 -d ' ' |
| 289 | Hello |
| 290 | $ echo "Hello world" | cut -f 2 -d ' ' |
| 291 | world |
| 292 | |
| 293 | |
| 294 | ------------------------------- |
| 295 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 296 | =item date |
| 297 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 298 | Usage: date [OPTION]... [+FORMAT] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 299 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 300 | or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]] |
| 301 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 302 | Displays the current time in the given FORMAT, or sets the system date. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 303 | |
| 304 | Options: |
Erik Andersen | e31c066 | 2000-05-02 05:32:07 +0000 | [diff] [blame] | 305 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 306 | -R Outputs RFC-822 compliant date string |
| 307 | -s Sets time described by STRING |
| 308 | -u Prints or sets Coordinated Universal Time |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 309 | |
| 310 | Example: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 311 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 312 | $ date |
| 313 | Wed Apr 12 18:52:41 MDT 2000 |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 314 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 315 | ------------------------------- |
| 316 | |
John Beppu | 0021679 | 2000-06-21 19:06:16 +0000 | [diff] [blame] | 317 | =item dc |
| 318 | |
| 319 | Usage: dc expression ... |
| 320 | |
| 321 | This is a Tiny RPN calculator that understands the |
| 322 | following operations: +, -, /, *, and, or, not, eor. |
| 323 | If no arguments are given, dc will process input from STDIN. |
| 324 | |
| 325 | The behaviour of BusyBox/dc deviates (just a little ;-) from |
| 326 | GNU/dc, but this will be remedied in the future. |
| 327 | |
| 328 | Example: |
| 329 | |
| 330 | $ dc 2 2 + |
| 331 | 4 |
| 332 | $ dc 8 8 \* 2 2 + / |
| 333 | 16 |
| 334 | $ dc 0 1 and |
| 335 | 0 |
| 336 | $ dc 0 1 or |
| 337 | 1 |
| 338 | $ echo 72 9 div 8 mul | dc |
| 339 | 64 |
| 340 | |
| 341 | ------------------------------- |
| 342 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 343 | =item dd |
| 344 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 345 | Usage: dd [if=name] [of=name] [bs=n] [count=n] [skip=n] [seek=n] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 346 | |
| 347 | Copy a file, converting and formatting according to options |
| 348 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 349 | if=FILE read from FILE instead of stdin |
| 350 | of=FILE write to FILE instead of stdout |
| 351 | bs=n read and write n bytes at a time |
| 352 | count=n copy only n input blocks |
| 353 | skip=n skip n input blocks |
| 354 | seek=n skip n output blocks |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 355 | |
| 356 | Numbers may be suffixed by w (x2), k (x1024), b (x512), or M (x1024^2) |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 357 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 358 | Example: |
| 359 | |
| 360 | $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4 |
| 361 | 4+0 records in |
| 362 | 4+0 records out |
| 363 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 364 | ------------------------------- |
| 365 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 366 | =item deallocvt |
| 367 | |
| 368 | Usage: deallocvt N |
| 369 | |
| 370 | Deallocates unused virtual terminal /dev/ttyN |
| 371 | |
| 372 | ------------------------------- |
| 373 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 374 | =item df |
| 375 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 376 | Usage: df [filesystem ...] |
| 377 | |
| 378 | Prints the filesystem space used and space available. |
| 379 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 380 | Example: |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 381 | |
| 382 | $ df |
| 383 | Filesystem 1k-blocks Used Available Use% Mounted on |
| 384 | /dev/sda3 8690864 8553540 137324 98% / |
| 385 | /dev/sda1 64216 36364 27852 57% /boot |
| 386 | $ df /dev/sda3 |
| 387 | Filesystem 1k-blocks Used Available Use% Mounted on |
| 388 | /dev/sda3 8690864 8553540 137324 98% / |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 389 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 390 | ------------------------------- |
| 391 | |
| 392 | =item dirname |
| 393 | |
| 394 | Usage: dirname NAME |
| 395 | |
| 396 | Strip non-directory suffix from file name |
| 397 | |
| 398 | Example: |
| 399 | |
| 400 | $ dirname /tmp/foo |
| 401 | /tmp |
| 402 | $ dirname /tmp/foo/ |
| 403 | /tmp |
| 404 | |
| 405 | ------------------------------- |
| 406 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 407 | =item dmesg |
| 408 | |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 409 | Usage: dmesg [B<-c>] [B<-n> level] [B<-s> bufsize] |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 410 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 411 | Print or controls the kernel ring buffer. |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 412 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 413 | ------------------------------- |
| 414 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 415 | =item du |
| 416 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 417 | Usage: du [OPTION]... [FILE]... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 418 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 419 | Summarize disk space used for each FILE and/or directory. |
| 420 | Disk space is printed in units of 1k (i.e. 1024 bytes). |
| 421 | |
| 422 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 423 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 424 | -l count sizes many times if hard linked |
| 425 | -s display only a total for each argument |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 426 | |
| 427 | Example: |
| 428 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 429 | $ ./BusyBox du |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 430 | 16 ./CVS |
| 431 | 12 ./kernel-patches/CVS |
| 432 | 80 ./kernel-patches |
| 433 | 12 ./tests/CVS |
| 434 | 36 ./tests |
| 435 | 12 ./scripts/CVS |
| 436 | 16 ./scripts |
| 437 | 12 ./docs/CVS |
| 438 | 104 ./docs |
| 439 | 2417 . |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 440 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 441 | ------------------------------- |
| 442 | |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 443 | =item dumpkmap |
| 444 | |
| 445 | Usage: dumpkmap |
| 446 | |
| 447 | Prints out a binary keyboard translation table to standard input. |
| 448 | |
| 449 | ------------------------------- |
| 450 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 451 | =item dutmp |
| 452 | |
| 453 | Usage: dutmp [FILE] |
| 454 | |
| 455 | Dump utmp file format (pipe delimited) from FILE |
| 456 | or stdin to stdout. |
| 457 | |
| 458 | Example: |
| 459 | |
| 460 | $ dutmp /var/run/utmp |
| 461 | 8|7||si|||0|0|0|955637625|760097|0 |
| 462 | 2|0|~|~~|reboot||0|0|0|955637625|782235|0 |
| 463 | 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0 |
| 464 | 8|125||l4|||0|0|0|955637629|998367|0 |
| 465 | 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0 |
| 466 | 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0 |
| 467 | 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0 |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 468 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 469 | ------------------------------- |
| 470 | |
| 471 | =item echo |
| 472 | |
| 473 | Usage: echo [-neE] [ARG ...] |
| 474 | |
| 475 | Prints the specified ARGs to stdout |
| 476 | |
| 477 | Options: |
| 478 | |
| 479 | -n suppress trailing newline |
| 480 | -e interpret backslash-escaped characters (i.e. \t=tab etc) |
| 481 | -E disable interpretation of backslash-escaped characters |
| 482 | |
| 483 | Example: |
| 484 | |
| 485 | $ echo "Erik is cool" |
| 486 | Erik is cool |
| 487 | $ echo -e "Erik\nis\ncool" |
| 488 | Erik |
| 489 | is |
| 490 | cool |
| 491 | $ echo "Erik\nis\ncool" |
| 492 | Erik\nis\ncool |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 493 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 494 | ------------------------------- |
| 495 | |
| 496 | =item false |
| 497 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 498 | Returns an exit code of FALSE (1) |
| 499 | |
| 500 | Example: |
| 501 | |
| 502 | $ false |
| 503 | $ echo $? |
| 504 | 1 |
| 505 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 506 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 507 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 508 | =item fbset |
| 509 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 510 | Usage: fbset [options] [mode] |
| 511 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 512 | Show and modify frame buffer device settings |
| 513 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 514 | Options: |
| 515 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 516 | -h |
| 517 | -fb |
| 518 | -db |
| 519 | -a |
| 520 | -i |
| 521 | -g |
| 522 | -t |
| 523 | -accel |
| 524 | -hsync |
| 525 | -vsync |
| 526 | -laced |
| 527 | -double |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 528 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 529 | Example: |
| 530 | |
| 531 | $ fbset |
| 532 | mode "1024x768-76" |
| 533 | # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz |
| 534 | geometry 1024 768 1024 768 16 |
| 535 | timings 12714 128 32 16 4 128 4 |
| 536 | accel false |
| 537 | rgba 5/11,6/5,5/0,0/0 |
| 538 | endmode |
| 539 | |
| 540 | ------------------------------- |
| 541 | |
| 542 | =item fdflush |
| 543 | |
| 544 | Usage: fdflush device |
| 545 | |
| 546 | Force floppy disk drive to detect disk change |
| 547 | |
| 548 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 549 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 550 | =item find |
| 551 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 552 | Usage: find [PATH...] [EXPRESSION] |
| 553 | |
| 554 | Search for files in a directory hierarchy. The default PATH is |
| 555 | the current directory; default EXPRESSION is '-print' |
| 556 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 557 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 558 | EXPRESSION may consist of: |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 559 | |
| 560 | -follow Dereference symbolic links. |
| 561 | -name PATTERN File name (leading directories removed) matches PATTERN. |
| 562 | -print print the full file name followed by a newline to stdout. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 563 | |
| 564 | Example: |
| 565 | |
| 566 | $ find / -name /etc/passwd |
| 567 | /etc/passwd |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 568 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 569 | ------------------------------- |
| 570 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 571 | =item free |
| 572 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 573 | Usage: free |
| 574 | |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 575 | Displays the amount of free and used system memory. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 576 | |
| 577 | Example: |
| 578 | |
| 579 | $ free |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 580 | total used free shared buffers |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 581 | Mem: 257628 248724 8904 59644 93124 |
| 582 | Swap: 128516 8404 120112 |
| 583 | Total: 386144 257128 129016 |
| 584 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 585 | ------------------------------- |
| 586 | |
| 587 | =item freeramdisk |
| 588 | |
| 589 | Usage: freeramdisk DEVICE |
| 590 | |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 591 | Frees all memory used by the specified ramdisk. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 592 | |
| 593 | Example: |
| 594 | |
| 595 | $ freeramdisk /dev/ram2 |
| 596 | |
| 597 | ------------------------------- |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 598 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 599 | =item fsck.minix |
| 600 | |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 601 | Usage: fsck.minix [B<-larvsmf>] /dev/name |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 602 | |
| 603 | Performs a consistency check for MINIX filesystems. |
| 604 | |
Eric Andersen | 2086e3d | 2000-07-04 22:17:01 +0000 | [diff] [blame] | 605 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 606 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 607 | -l Lists all filenames |
| 608 | -r Perform interactive repairs |
| 609 | -a Perform automatic repairs |
| 610 | -v verbose |
| 611 | -s Outputs super-block information |
| 612 | -m Activates MINIX-like "mode not cleared" warnings |
| 613 | -f Force file system check. |
| 614 | |
| 615 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 616 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 617 | =item grep |
| 618 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 619 | Usage: grep [OPTIONS]... PATTERN [FILE]... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 620 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 621 | Search for PATTERN in each FILE or standard input. |
| 622 | |
Eric Andersen | 2086e3d | 2000-07-04 22:17:01 +0000 | [diff] [blame] | 623 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 624 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 625 | -h suppress the prefixing filename on output |
| 626 | -i ignore case distinctions |
| 627 | -n print line number with output lines |
| 628 | -q be quiet. Returns 0 if result was found, 1 otherwise |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 629 | -v select non-matching lines |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 630 | |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 631 | This version of grep matches full regular expressions. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 632 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 633 | Example: |
| 634 | |
| 635 | $ grep root /etc/passwd |
| 636 | root:x:0:0:root:/root:/bin/bash |
| 637 | $ grep ^[rR]oo. /etc/passwd |
| 638 | root:x:0:0:root:/root:/bin/bash |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 639 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 640 | ------------------------------- |
| 641 | |
| 642 | =item gunzip |
| 643 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 644 | Usage: gunzip [OPTION]... FILE |
| 645 | |
| 646 | Uncompress FILE (or standard input if FILE is '-'). |
| 647 | |
| 648 | Options: |
| 649 | |
| 650 | -c Write output to standard output |
| 651 | -t Test compressed file integrity |
| 652 | |
| 653 | Example: |
| 654 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 655 | $ ls -la /tmp/BusyBox* |
| 656 | -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz |
| 657 | $ gunzip /tmp/BusyBox-0.43.tar.gz |
| 658 | $ ls -la /tmp/BusyBox* |
| 659 | -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 660 | |
| 661 | ------------------------------- |
| 662 | |
| 663 | =item gzip |
| 664 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 665 | Usage: gzip [OPTION]... FILE |
| 666 | |
| 667 | Compress FILE with maximum compression. |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 668 | When FILE is '-', reads standard input. Implies B<-c>. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 669 | |
| 670 | Options: |
| 671 | |
| 672 | -c Write output to standard output instead of FILE.gz |
| 673 | |
| 674 | Example: |
| 675 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 676 | $ ls -la /tmp/BusyBox* |
| 677 | -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar |
| 678 | $ gzip /tmp/BusyBox-0.43.tar |
| 679 | $ ls -la /tmp/BusyBox* |
| 680 | -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 681 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 682 | |
| 683 | ------------------------------- |
| 684 | |
| 685 | =item halt |
| 686 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 687 | Usage: halt |
| 688 | |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 689 | This command halts the system. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 690 | |
| 691 | ------------------------------- |
| 692 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 693 | =item head |
| 694 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 695 | Usage: head [OPTION] [FILE]... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 696 | |
| 697 | Print first 10 lines of each FILE to standard output. |
| 698 | With more than one FILE, precede each with a header giving the |
| 699 | file name. With no FILE, or when FILE is -, read standard input. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 700 | |
| 701 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 702 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 703 | -n NUM Print first NUM lines instead of first 10 |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 704 | |
| 705 | Example: |
| 706 | |
| 707 | $ head -n 2 /etc/passwd |
| 708 | root:x:0:0:root:/root:/bin/bash |
| 709 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 710 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 711 | ------------------------------- |
| 712 | |
| 713 | =item hostid |
| 714 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 715 | Usage: hostid |
| 716 | |
| 717 | Prints out a unique 32-bit identifier for the current |
| 718 | machine. The 32-bit identifier is intended to be unique |
| 719 | among all UNIX systems in existence. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 720 | |
| 721 | ------------------------------- |
| 722 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 723 | =item hostname |
| 724 | |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 725 | Usage: hostname [OPTION] {hostname | B<-F> file} |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 726 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 727 | Get or set the hostname or DNS domain name. If a hostname is given |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 728 | (or a file with the B<-F> parameter), the host name will be set. |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 729 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 730 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 731 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 732 | -s Short |
| 733 | -i Addresses for the hostname |
| 734 | -d DNS domain name |
| 735 | -F FILE Use the contents of FILE to specify the hostname |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 736 | |
| 737 | Example: |
| 738 | |
| 739 | $ hostname |
| 740 | slag |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 741 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 742 | ------------------------------- |
| 743 | |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 744 | =item id |
| 745 | |
| 746 | Print information for USERNAME or the current user |
| 747 | |
| 748 | Options: |
| 749 | |
| 750 | -g prints only the group ID |
| 751 | -u prints only the user ID |
| 752 | -r prints the real user ID instead of the effective ID (with -ug) |
| 753 | |
| 754 | Example: |
| 755 | |
| 756 | $ id |
| 757 | uid=1000(andersen) gid=1000(andersen) |
| 758 | |
| 759 | ------------------------------- |
| 760 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 761 | =item init |
| 762 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 763 | Usage: init |
| 764 | |
| 765 | Init is the parent of all processes. |
| 766 | |
| 767 | This version of init is designed to be run only by the kernel. |
| 768 | |
| 769 | BusyBox init doesn't support multiple runlevels. The runlevels field of |
| 770 | the /etc/inittab file is completely ignored by BusyBox init. If you want |
| 771 | runlevels, use sysvinit. |
| 772 | |
| 773 | BusyBox init works just fine without an inittab. If no inittab is found, |
| 774 | it has the following default behavior: |
| 775 | |
| 776 | ::sysinit:/etc/init.d/rcS |
| 777 | ::askfirst:/bin/sh |
| 778 | |
| 779 | if it detects that /dev/console is _not_ a serial console, it will also run: |
| 780 | |
| 781 | tty2::askfirst:/bin/sh |
| 782 | |
| 783 | If you choose to use an /etc/inittab file, the inittab entry format is as follows: |
| 784 | |
| 785 | <id>:<runlevels>:<action>:<process> |
| 786 | |
| 787 | <id>: |
| 788 | |
| 789 | WARNING: This field has a non-traditional meaning for BusyBox init! |
| 790 | The id field is used by BusyBox init to specify the controlling tty for |
| 791 | the specified process to run on. The contents of this field are |
| 792 | appended to "/dev/" and used as-is. There is no need for this field to |
| 793 | be unique, although if it isn't you may have strange results. If this |
| 794 | field is left blank, it is completely ignored. Also note that if |
| 795 | BusyBox detects that a serial console is in use, then all entries |
| 796 | containing non-empty id fields will _not_ be run. BusyBox init does |
| 797 | nothing with utmp. We don't need no stinkin' utmp. |
| 798 | |
| 799 | <runlevels>: |
| 800 | |
| 801 | The runlevels field is completely ignored. |
| 802 | |
| 803 | <action>: |
| 804 | |
| 805 | Valid actions include: sysinit, respawn, askfirst, wait, |
| 806 | once, and ctrlaltdel. |
| 807 | |
| 808 | askfirst acts just like respawn, but before running the specified |
| 809 | process it displays the line "Please press Enter to activate this |
| 810 | console." and then waits for the user to press enter before starting |
| 811 | the specified process. |
| 812 | |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 813 | Unrecognized actions (like initdefault) will cause init to emit |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 814 | an error message, and then go along with its business. |
| 815 | |
| 816 | <process>: |
| 817 | |
| 818 | Specifies the process to be executed and it's command line. |
| 819 | |
| 820 | |
| 821 | Example /etc/inittab file: |
| 822 | |
| 823 | # This is run first except when booting in single-user mode. |
| 824 | # |
| 825 | ::sysinit:/etc/init.d/rcS |
| 826 | |
| 827 | # /bin/sh invocations on selected ttys |
| 828 | # |
| 829 | # Start an "askfirst" shell on the console (whatever that may be) |
| 830 | ::askfirst:/bin/sh |
| 831 | # Start an "askfirst" shell on /dev/tty2 |
| 832 | tty2::askfirst:/bin/sh |
| 833 | |
| 834 | # /sbin/getty invocations for selected ttys |
| 835 | # |
| 836 | tty4::respawn:/sbin/getty 38400 tty4 |
| 837 | tty5::respawn:/sbin/getty 38400 tty5 |
| 838 | |
| 839 | |
| 840 | # Example of how to put a getty on a serial line (for a terminal) |
| 841 | # |
| 842 | #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100 |
| 843 | #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100 |
| 844 | # |
| 845 | # Example how to put a getty on a modem line. |
| 846 | #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2 |
| 847 | |
| 848 | # Stuff to do before rebooting |
| 849 | ::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1 |
| 850 | ::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1 |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 851 | |
| 852 | ------------------------------- |
| 853 | |
Eric Andersen | feb47c0 | 2000-06-21 21:03:13 +0000 | [diff] [blame] | 854 | =item insmod |
| 855 | |
| 856 | Usage: insmod [OPTION]... MODULE [symbol=value]... |
| 857 | |
| 858 | Loads the specified kernel modules into the kernel. |
| 859 | |
| 860 | Options: |
| 861 | |
| 862 | -f Force module to load into the wrong kernel version. |
| 863 | -k Make module autoclean-able. |
| 864 | -v verbose output |
| 865 | -x do not export externs |
| 866 | |
| 867 | ------------------------------- |
| 868 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 869 | =item kill |
| 870 | |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 871 | Usage: kill [B<-signal>] process-id [process-id ...] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 872 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 873 | Send a signal (default is SIGTERM) to the specified process(es). |
| 874 | |
| 875 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 876 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 877 | -l List all signal names and numbers. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 878 | |
| 879 | Example: |
| 880 | |
| 881 | $ ps | grep apache |
| 882 | 252 root root S [apache] |
| 883 | 263 www-data www-data S [apache] |
| 884 | 264 www-data www-data S [apache] |
| 885 | 265 www-data www-data S [apache] |
| 886 | 266 www-data www-data S [apache] |
| 887 | 267 www-data www-data S [apache] |
| 888 | $ kill 252 |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 889 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 890 | ------------------------------- |
| 891 | |
| 892 | =item killall |
| 893 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 894 | Usage: killall [B<-signal>] process-name [process-name ...] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 895 | |
| 896 | Send a signal (default is SIGTERM) to the specified process(es). |
| 897 | |
| 898 | Options: |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 899 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 900 | -l List all signal names and numbers. |
| 901 | |
| 902 | Example: |
| 903 | |
| 904 | $ killall apache |
| 905 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 906 | ------------------------------- |
| 907 | |
| 908 | =item length |
| 909 | |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 910 | Usage: length STRING |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 911 | |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 912 | Prints out the length of the specified STRING. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 913 | |
| 914 | Example: |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 915 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 916 | $ length "Hello" |
| 917 | 5 |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 918 | |
| 919 | ------------------------------- |
| 920 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 921 | =item ln |
| 922 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 923 | Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 924 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 925 | Create a link named LINK_NAME or DIRECTORY to the specified TARGET |
Eric Andersen | addc9c2 | 2000-06-21 22:53:24 +0000 | [diff] [blame] | 926 | You may use '--' to indicate that all following arguments are non-options. |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 927 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 928 | Options: |
| 929 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 930 | -s make symbolic links instead of hard links |
| 931 | -f remove existing destination files |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 932 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 933 | Example: |
| 934 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 935 | $ ln -s BusyBox /tmp/ls |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 936 | $ ls -l /tmp/ls |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 937 | lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox* |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 938 | |
| 939 | ------------------------------- |
| 940 | |
| 941 | =item loadacm |
| 942 | |
Erik Andersen | 3fe7f9f | 2000-04-19 03:59:10 +0000 | [diff] [blame] | 943 | Usage: loadacm |
| 944 | |
| 945 | Loads an acm from standard input. |
| 946 | |
| 947 | Example: |
| 948 | |
| 949 | $ loadacm < /etc/i18n/acmname |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 950 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 951 | ------------------------------- |
| 952 | |
| 953 | =item loadfont |
| 954 | |
Erik Andersen | a6c7522 | 2000-04-18 00:00:52 +0000 | [diff] [blame] | 955 | Usage: loadfont |
| 956 | |
| 957 | Loads a console font from standard input. |
| 958 | |
Erik Andersen | 3fe7f9f | 2000-04-19 03:59:10 +0000 | [diff] [blame] | 959 | Example: |
| 960 | |
| 961 | $ loadfont < /etc/i18n/fontname |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 962 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 963 | ------------------------------- |
| 964 | |
| 965 | =item loadkmap |
| 966 | |
Erik Andersen | 3fe7f9f | 2000-04-19 03:59:10 +0000 | [diff] [blame] | 967 | Usage: loadkmap |
| 968 | |
| 969 | Loads a binary keyboard translation table from standard input. |
| 970 | |
| 971 | Example: |
| 972 | |
| 973 | $ loadkmap < /etc/i18n/lang-keymap |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 974 | |
| 975 | ------------------------------- |
| 976 | |
| 977 | =item logger |
| 978 | |
| 979 | Usage: logger [OPTION]... [MESSAGE] |
| 980 | |
| 981 | Write MESSAGE to the system log. If MESSAGE is '-', log stdin. |
| 982 | |
| 983 | Options: |
| 984 | |
| 985 | -s Log to stderr as well as the system log. |
| 986 | -t Log using the specified tag (defaults to user name). |
| 987 | -p Enter the message with the specified priority. |
| 988 | This may be numerical or a ``facility.level'' pair. |
| 989 | |
| 990 | Example: |
| 991 | |
| 992 | $ logger "hello" |
| 993 | |
| 994 | ------------------------------- |
| 995 | |
| 996 | =item logname |
| 997 | |
| 998 | Usage: logname |
| 999 | |
| 1000 | Print the name of the current user. |
| 1001 | |
| 1002 | Example: |
| 1003 | |
| 1004 | $ logname |
| 1005 | root |
| 1006 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1007 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1008 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1009 | =item ls |
| 1010 | |
Eric Andersen | a42982e | 2000-06-07 17:28:53 +0000 | [diff] [blame] | 1011 | Usage: ls [B<-1acdelnpuxACFR>] [filenames...] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1012 | |
| 1013 | Options: |
| 1014 | |
| 1015 | -a do not hide entries starting with . |
| 1016 | -c with -l: show ctime (the time of last |
| 1017 | modification of file status information) |
| 1018 | -d list directory entries instead of contents |
| 1019 | -e list both full date and full time |
| 1020 | -l use a long listing format |
| 1021 | -n list numeric UIDs and GIDs instead of names |
| 1022 | -p append indicator (one of /=@|) to entries |
| 1023 | -u with -l: show access time (the time of last |
| 1024 | access of the file) |
| 1025 | -x list entries by lines instead of by columns |
| 1026 | -A do not list implied . and .. |
| 1027 | -C list entries by columns |
| 1028 | -F append indicator (one of */=@|) to entries |
Eric Andersen | a42982e | 2000-06-07 17:28:53 +0000 | [diff] [blame] | 1029 | -R list subdirectories recursively |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1030 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1031 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1032 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1033 | =item lsmod |
| 1034 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1035 | Usage: lsmod |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1036 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1037 | Shows a list of all currently loaded kernel modules. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1038 | |
| 1039 | ------------------------------- |
| 1040 | |
| 1041 | =item makedevs |
| 1042 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1043 | Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s] |
| 1044 | |
| 1045 | Creates a range of block or character special files |
| 1046 | |
| 1047 | TYPEs include: |
| 1048 | |
| 1049 | b: Make a block (buffered) device. |
| 1050 | c or u: Make a character (un-buffered) device. |
| 1051 | p: Make a named pipe. MAJOR and MINOR are ignored for named pipes. |
| 1052 | |
| 1053 | FIRST specifies the number appended to NAME to create the first device. |
| 1054 | LAST specifies the number of the last item that should be created. |
| 1055 | If 's' is the last argument, the base device is created as well. |
| 1056 | |
| 1057 | Example: |
| 1058 | |
| 1059 | $ makedevs /dev/ttyS c 4 66 2 63 |
| 1060 | [creates ttyS2-ttyS63] |
| 1061 | $ makedevs /dev/hda b 3 0 0 8 s |
| 1062 | [creates hda,hda1-hda8] |
| 1063 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1064 | ------------------------------- |
| 1065 | |
Eric Andersen | 2b6ab3c | 2000-06-13 06:54:53 +0000 | [diff] [blame] | 1066 | =item md5sum |
| 1067 | |
| 1068 | Usage: md5sum [OPTION] [file ...] |
| 1069 | |
| 1070 | Print or check MD5 checksums. |
| 1071 | |
| 1072 | Options: |
| 1073 | |
| 1074 | -b read files in binary mode |
| 1075 | -c check MD5 sums against given list |
| 1076 | -t read files in text mode (default) |
| 1077 | -g read a string |
| 1078 | |
| 1079 | The following two options are useful only when verifying checksums: |
| 1080 | |
| 1081 | -s don't output anything, status code shows success |
| 1082 | -w warn about improperly formated MD5 checksum lines |
| 1083 | |
| 1084 | Example: |
| 1085 | |
| 1086 | $ md5sum busybox |
| 1087 | 6fd11e98b98a58f64ff3398d7b324003 busybox |
| 1088 | $ md5sum -c - |
| 1089 | 6fd11e98b98a58f64ff3398d7b324003 busybox |
| 1090 | busybox: OK |
| 1091 | ^D |
| 1092 | |
| 1093 | ------------------------------- |
| 1094 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1095 | =item mkdir |
| 1096 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1097 | Usage: mkdir [OPTION] DIRECTORY... |
| 1098 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1099 | Create the DIRECTORY(ies), if they do not already exist |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1100 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1101 | Options: |
| 1102 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1103 | -m set permission mode (as in chmod), not rwxrwxrwx - umask |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 1104 | -p no error if directory exists, make parent directories as needed |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1105 | |
| 1106 | Example: |
| 1107 | |
| 1108 | $ mkdir /tmp/foo |
| 1109 | $ mkdir /tmp/foo |
| 1110 | /tmp/foo: File exists |
| 1111 | $ mkdir /tmp/foo/bar/baz |
| 1112 | /tmp/foo/bar/baz: No such file or directory |
| 1113 | $ mkdir -p /tmp/foo/bar/baz |
| 1114 | |
| 1115 | ------------------------------- |
| 1116 | |
| 1117 | =item mkfifo |
| 1118 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1119 | Usage: mkfifo [OPTIONS] name |
| 1120 | |
| 1121 | Creates a named pipe (identical to 'mknod name p') |
| 1122 | |
| 1123 | Options: |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1124 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1125 | -m create the pipe using the specified mode (default a=rw) |
| 1126 | |
| 1127 | ------------------------------- |
| 1128 | |
| 1129 | =item mkfs.minix |
| 1130 | |
| 1131 | Usage: mkfs.minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks] |
| 1132 | |
| 1133 | Make a MINIX filesystem. |
| 1134 | |
Eric Andersen | 2086e3d | 2000-07-04 22:17:01 +0000 | [diff] [blame] | 1135 | Options: |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1136 | |
| 1137 | -c Check the device for bad blocks |
| 1138 | -n [14|30] Specify the maximum length of filenames |
| 1139 | -i Specify the number of inodes for the filesystem |
| 1140 | -l FILENAME Read the bad blocks list from FILENAME |
| 1141 | -v Make a Minix version 2 filesystem |
| 1142 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1143 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1144 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1145 | =item mknod |
| 1146 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1147 | Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1148 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1149 | Create a special file (block, character, or pipe). |
| 1150 | |
| 1151 | Options: |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1152 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1153 | -m create the special file using the specified mode (default a=rw) |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1154 | |
| 1155 | TYPEs include: |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1156 | b: Make a block (buffered) device. |
| 1157 | c or u: Make a character (un-buffered) device. |
| 1158 | p: Make a named pipe. MAJOR and MINOR are ignored for named pipes. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1159 | |
| 1160 | Example: |
| 1161 | |
| 1162 | $ mknod /dev/fd0 b 2 0 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1163 | $ mknod -m 644 /tmp/pipe p |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1164 | |
| 1165 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1166 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1167 | =item mkswap |
| 1168 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1169 | Usage: mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count] |
| 1170 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1171 | Prepare a disk partition to be used as a swap partition. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1172 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1173 | Options: |
| 1174 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1175 | -c Check for read-ability. |
| 1176 | -v0 Make version 0 swap [max 128 Megs]. |
| 1177 | -v1 Make version 1 swap [big!] (default for kernels > 2.1.117). |
| 1178 | block-count Number of block to use (default is entire partition). |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1179 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1180 | ------------------------------- |
| 1181 | |
Erik Andersen | 227a59b | 2000-04-25 23:24:55 +0000 | [diff] [blame] | 1182 | =item mktemp |
| 1183 | |
Erik Andersen | e31c066 | 2000-05-02 05:32:07 +0000 | [diff] [blame] | 1184 | Usage: mktemp [B<-q>] TEMPLATE |
Erik Andersen | 227a59b | 2000-04-25 23:24:55 +0000 | [diff] [blame] | 1185 | |
| 1186 | Creates a temporary file with its name based on TEMPLATE. |
| 1187 | TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX). |
| 1188 | |
| 1189 | Example: |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 1190 | |
Erik Andersen | 227a59b | 2000-04-25 23:24:55 +0000 | [diff] [blame] | 1191 | $ mktemp /tmp/temp.XXXXXX |
| 1192 | /tmp/temp.mWiLjM |
| 1193 | $ ls -la /tmp/temp.mWiLjM |
| 1194 | -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM |
| 1195 | |
| 1196 | ------------------------------- |
| 1197 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1198 | =item more |
| 1199 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1200 | Usage: more [file ...] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1201 | |
| 1202 | More is a filter for paging through text one screenful at a time. |
| 1203 | |
| 1204 | Example: |
| 1205 | |
| 1206 | $ dmesg | more |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1207 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1208 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1209 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1210 | =item mount |
| 1211 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1212 | Usage: mount [flags] |
| 1213 | mount [flags] device directory [B<-o> options,more-options] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1214 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1215 | Flags: |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1216 | |
Erik Andersen | 6c5f2c6 | 2000-05-05 19:49:33 +0000 | [diff] [blame] | 1217 | -a: Mount all file systems in fstab. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1218 | -o option: One of many filesystem options, listed below. |
Erik Andersen | 6c5f2c6 | 2000-05-05 19:49:33 +0000 | [diff] [blame] | 1219 | -r: Mount the filesystem read-only. |
| 1220 | -t fs-type: Specify the filesystem type. |
| 1221 | -w: Mount for reading and writing (default). |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1222 | |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 1223 | Options for use with the "B<-o>" flag: |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1224 | |
Erik Andersen | 6c5f2c6 | 2000-05-05 19:49:33 +0000 | [diff] [blame] | 1225 | async/sync: Writes are asynchronous / synchronous. |
| 1226 | atime/noatime: Enable / disable updates to inode access times. |
| 1227 | dev/nodev: Allow use of special device files / disallow them. |
| 1228 | exec/noexec: Allow use of executable files / disallow them. |
| 1229 | loop: Mounts a file via loop device. |
| 1230 | suid/nosuid: Allow set-user-id-root programs / disallow them. |
| 1231 | remount: Re-mount a currently-mounted filesystem, changing its flags. |
| 1232 | ro/rw: Mount for read-only / read-write. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1233 | There are EVEN MORE flags that are specific to each filesystem. |
| 1234 | You'll have to see the written documentation for those. |
| 1235 | |
| 1236 | Example: |
| 1237 | |
| 1238 | $ mount |
| 1239 | /dev/hda3 on / type minix (rw) |
| 1240 | proc on /proc type proc (rw) |
| 1241 | devpts on /dev/pts type devpts (rw) |
| 1242 | $ mount /dev/fd0 /mnt -t msdos -o ro |
| 1243 | $ mount /tmp/diskimage /opt -t ext2 -o loop |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1244 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1245 | ------------------------------- |
| 1246 | |
| 1247 | =item mt |
| 1248 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1249 | Usage: mt [B<-f> device] opcode value |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1250 | |
| 1251 | Control magnetic tape drive operation |
| 1252 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1253 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1254 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1255 | =item mv |
| 1256 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1257 | Usage: mv SOURCE DEST |
| 1258 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1259 | or: mv SOURCE... DIRECTORY |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1260 | |
| 1261 | Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1262 | |
| 1263 | Example: |
| 1264 | |
| 1265 | $ mv /tmp/foo /bin/bar |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1266 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1267 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1268 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1269 | =item nc |
| 1270 | |
| 1271 | Usage: nc [IP] [port] |
| 1272 | |
| 1273 | Netcat opens a pipe to IP:port |
| 1274 | |
| 1275 | Example: |
| 1276 | |
| 1277 | $ nc foobar.somedomain.com 25 |
| 1278 | 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600 |
| 1279 | help |
| 1280 | 214-Commands supported: |
| 1281 | 214- HELO EHLO MAIL RCPT DATA AUTH |
| 1282 | 214 NOOP QUIT RSET HELP |
| 1283 | quit |
| 1284 | 221 foobar closing connection |
| 1285 | |
| 1286 | ------------------------------- |
| 1287 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1288 | =item nslookup |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1289 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1290 | Usage: nslookup [HOST] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1291 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1292 | Queries the nameserver for the IP address of the given HOST |
| 1293 | |
| 1294 | Example: |
| 1295 | |
| 1296 | $ nslookup localhost |
| 1297 | Server: default |
| 1298 | Address: default |
| 1299 | |
| 1300 | Name: debian |
| 1301 | Address: 127.0.0.1 |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1302 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1303 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1304 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1305 | =item ping |
| 1306 | |
| 1307 | Usage: ping [OPTION]... host |
| 1308 | |
| 1309 | Send ICMP ECHO_REQUEST packets to network hosts. |
| 1310 | |
| 1311 | Options: |
| 1312 | |
| 1313 | -c COUNT Send only COUNT pings. |
Pavel Roskin | 0024abc | 2000-06-07 20:38:15 +0000 | [diff] [blame] | 1314 | -s SIZE Send SIZE data bytes in packets (default=56). |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1315 | -q Quiet mode, only displays output at start |
| 1316 | and when finished. |
| 1317 | Example: |
| 1318 | |
| 1319 | $ ping localhost |
| 1320 | PING slag (127.0.0.1): 56 data bytes |
| 1321 | 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms |
| 1322 | |
| 1323 | --- debian ping statistics --- |
| 1324 | 1 packets transmitted, 1 packets received, 0% packet loss |
| 1325 | round-trip min/avg/max = 20.1/20.1/20.1 ms |
| 1326 | |
| 1327 | ------------------------------- |
| 1328 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1329 | =item poweroff |
| 1330 | |
| 1331 | Shuts down the system, and requests that the kernel turn off power upon halting. |
| 1332 | |
| 1333 | ------------------------------- |
| 1334 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1335 | =item printf |
| 1336 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1337 | Usage: printf format [argument...] |
| 1338 | |
| 1339 | Formats and prints the given data in a manner similar to the C printf command. |
| 1340 | |
| 1341 | Example: |
| 1342 | |
| 1343 | $ printf "Val=%d\n" 5 |
| 1344 | Val=5 |
| 1345 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1346 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1347 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1348 | =item ps |
| 1349 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1350 | Usage: ps |
| 1351 | |
| 1352 | Report process status |
| 1353 | |
| 1354 | This version of ps accepts no options. |
| 1355 | |
| 1356 | Example: |
| 1357 | |
| 1358 | $ ps |
| 1359 | PID Uid Gid State Command |
| 1360 | 1 root root S init |
| 1361 | 2 root root S [kflushd] |
| 1362 | 3 root root S [kupdate] |
| 1363 | 4 root root S [kpiod] |
| 1364 | 5 root root S [kswapd] |
| 1365 | 742 andersen andersen S [bash] |
| 1366 | 743 andersen andersen S -bash |
| 1367 | 745 root root S [getty] |
| 1368 | 2990 andersen andersen R ps |
| 1369 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1370 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1371 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1372 | =item pwd |
| 1373 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1374 | Prints the full filename of the current working directory. |
| 1375 | |
| 1376 | Example: |
| 1377 | |
| 1378 | $ pwd |
| 1379 | /root |
| 1380 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1381 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1382 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1383 | =item reboot |
| 1384 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1385 | Instructs the kernel to reboot the system. |
| 1386 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1387 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1388 | |
Eric Andersen | bf960f5 | 2000-07-21 21:32:12 +0000 | [diff] [blame^] | 1389 | =item renice |
| 1390 | |
| 1391 | Usage: renice priority pid [pid ...] |
| 1392 | |
| 1393 | Changes priority of running processes. Allowed priorities range |
| 1394 | from 20 (the process runs only when nothing else is running) to 0 |
| 1395 | (default priority) to -20 (almost nothing else ever gets to run). |
| 1396 | |
| 1397 | ------------------------------- |
| 1398 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1399 | =item rm |
| 1400 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1401 | Usage: rm [OPTION]... FILE... |
| 1402 | |
Eric Andersen | 815e904 | 2000-06-06 16:15:23 +0000 | [diff] [blame] | 1403 | Remove (unlink) the FILE(s). You may use '--' to |
| 1404 | indicate that all following arguments are non-options. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1405 | |
| 1406 | Options: |
| 1407 | |
| 1408 | -f remove existing destinations, never prompt |
| 1409 | -r or -R remove the contents of directories recursively |
| 1410 | |
| 1411 | Example: |
| 1412 | |
| 1413 | $ rm -rf /tmp/foo |
| 1414 | |
| 1415 | ------------------------------- |
| 1416 | |
| 1417 | =item rmdir |
| 1418 | |
| 1419 | Usage: rmdir [OPTION]... DIRECTORY... |
| 1420 | |
| 1421 | Remove the DIRECTORY(ies), if they are empty. |
| 1422 | |
| 1423 | Example: |
| 1424 | |
| 1425 | # rmdir /tmp/foo |
| 1426 | |
| 1427 | ------------------------------- |
| 1428 | |
| 1429 | =item rmmod |
| 1430 | |
| 1431 | Usage: rmmod [OPTION]... [MODULE]... |
| 1432 | |
| 1433 | Unloads the specified kernel modules from the kernel. |
| 1434 | |
| 1435 | Options: |
| 1436 | |
| 1437 | -a Try to remove all unused kernel modules. |
| 1438 | |
| 1439 | Example: |
| 1440 | |
| 1441 | $ rmmod tulip |
| 1442 | |
| 1443 | ------------------------------- |
| 1444 | |
| 1445 | =item sed |
| 1446 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1447 | Usage: sed [B<-n>] B<-e> script [file...] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1448 | |
| 1449 | Allowed sed scripts come in the following form: |
| 1450 | |
| 1451 | 'ADDR [!] COMMAND' |
| 1452 | |
| 1453 | where address ADDR can be: |
| 1454 | NUMBER Match specified line number |
| 1455 | $ Match last line |
| 1456 | /REGEXP/ Match specified regexp |
| 1457 | (! inverts the meaning of the match) |
| 1458 | |
| 1459 | and COMMAND can be: |
| 1460 | s/regexp/replacement/[igp] |
| 1461 | which attempt to match regexp against the pattern space |
| 1462 | and if successful replaces the matched portion with replacement. |
| 1463 | |
| 1464 | aTEXT |
| 1465 | which appends TEXT after the pattern space |
| 1466 | |
| 1467 | Options: |
| 1468 | |
| 1469 | -e add the script to the commands to be executed |
| 1470 | -n suppress automatic printing of pattern space |
| 1471 | |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 1472 | This version of sed matches full regular expressions. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1473 | |
| 1474 | Example: |
| 1475 | |
| 1476 | $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g' |
| 1477 | bar |
| 1478 | |
| 1479 | ------------------------------- |
| 1480 | |
Erik Andersen | 4f3f757 | 2000-04-28 00:18:56 +0000 | [diff] [blame] | 1481 | =item setkeycodes |
| 1482 | |
| 1483 | Usage: setkeycodes SCANCODE KEYCODE ... |
| 1484 | |
| 1485 | Set entries into the kernel's scancode-to-keycode map, |
| 1486 | allowing unusual keyboards to generate usable keycodes. |
| 1487 | |
| 1488 | SCANCODE may be either xx or e0xx (hexadecimal), |
| 1489 | and KEYCODE is given in decimal |
| 1490 | |
| 1491 | Example: |
| 1492 | |
| 1493 | # setkeycodes e030 127 |
| 1494 | |
| 1495 | ------------------------------- |
| 1496 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1497 | =item sh |
| 1498 | |
| 1499 | Usage: sh |
| 1500 | |
| 1501 | lash -- the BusyBox LAme SHell (command interpreter) |
| 1502 | |
| 1503 | This command does not yet have proper documentation. |
| 1504 | |
| 1505 | Use lash just as you would use any other shell. It properly handles pipes, |
| 1506 | redirects, job control, can be used as the shell for scripts (#!/bin/sh), and |
| 1507 | has a sufficient set of builtins to do what is needed. It does not (yet) |
| 1508 | support Bourne Shell syntax. If you need things like "if-then-else", "while", |
| 1509 | and such, use ash or bash. If you just need a very simple and extremely small |
| 1510 | shell, this will do the job. |
| 1511 | |
| 1512 | ------------------------------- |
| 1513 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1514 | =item sleep |
| 1515 | |
| 1516 | Usage: sleep N |
| 1517 | |
| 1518 | Pause for N seconds. |
| 1519 | |
| 1520 | Example: |
| 1521 | |
| 1522 | $ sleep 2 |
| 1523 | [2 second delay results] |
| 1524 | |
| 1525 | ------------------------------- |
| 1526 | |
| 1527 | =item sort |
| 1528 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1529 | Usage: sort [B<-n>] [B<-r>] [FILE]... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1530 | |
| 1531 | Sorts lines of text in the specified files |
| 1532 | |
| 1533 | Example: |
| 1534 | |
| 1535 | $ echo -e "e\nf\nb\nd\nc\na" | sort |
| 1536 | a |
| 1537 | b |
| 1538 | c |
| 1539 | d |
| 1540 | e |
| 1541 | f |
| 1542 | |
| 1543 | ------------------------------- |
| 1544 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1545 | =item swapoff |
| 1546 | |
| 1547 | Usage: swapoff [OPTION] [device] |
| 1548 | |
| 1549 | Stop swapping virtual memory pages on the given device. |
| 1550 | |
| 1551 | Options: |
| 1552 | |
| 1553 | -a Stop swapping on all swap devices |
| 1554 | |
| 1555 | ------------------------------- |
| 1556 | |
| 1557 | =item swapon |
| 1558 | |
| 1559 | Usage: swapon [OPTION] [device] |
| 1560 | |
| 1561 | Start swapping virtual memory pages on the given device. |
| 1562 | |
| 1563 | Options: |
| 1564 | |
| 1565 | -a Start swapping on all swap devices |
| 1566 | |
| 1567 | ------------------------------- |
| 1568 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1569 | =item sync |
| 1570 | |
| 1571 | Usage: sync |
| 1572 | |
| 1573 | Write all buffered filesystem blocks to disk. |
| 1574 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1575 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1576 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1577 | =item syslogd |
| 1578 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1579 | Usage: syslogd [OPTION]... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1580 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1581 | Linux system and kernel (provides klogd) logging utility. |
| 1582 | Note that this version of syslogd/klogd ignores /etc/syslog.conf. |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1583 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1584 | Options: |
Pavel Roskin | 049b706 | 2000-06-07 21:19:49 +0000 | [diff] [blame] | 1585 | |
Pavel Roskin | da10ec0 | 2000-06-07 21:08:25 +0000 | [diff] [blame] | 1586 | -m NUM Interval between MARK lines (default=20min, 0=off) |
| 1587 | -n Run as a foreground process |
| 1588 | -K Do not start up the klogd process |
| 1589 | -O FILE Use an alternate log file (default=/var/log/messages) |
Eric Andersen | ced2cef | 2000-07-20 23:41:24 +0000 | [diff] [blame] | 1590 | -R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP. |
| 1591 | |
| 1592 | Example: |
| 1593 | |
| 1594 | $ syslogd -R masterlog:514 |
| 1595 | $ syslogd -R 192.168.1.1:601 |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1596 | |
| 1597 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1598 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1599 | =item tail |
| 1600 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1601 | Usage: tail [OPTION] [FILE]... |
| 1602 | |
| 1603 | Print last 10 lines of each FILE to standard output. |
| 1604 | With more than one FILE, precede each with a header giving the |
| 1605 | file name. With no FILE, or when FILE is -, read standard input. |
| 1606 | |
| 1607 | Options: |
| 1608 | |
| 1609 | -n NUM Print last NUM lines instead of first 10 |
| 1610 | -f Output data as the file grows. This version |
| 1611 | of 'tail -f' supports only one file at a time. |
| 1612 | |
| 1613 | Example: |
| 1614 | |
| 1615 | $ tail -n 1 /etc/resolv.conf |
| 1616 | nameserver 10.0.0.1 |
| 1617 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1618 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1619 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1620 | =item tar |
| 1621 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1622 | Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1623 | |
| 1624 | Create, extract, or list files from a tar file. Note that |
| 1625 | this version of tar treats hard links as separate files. |
| 1626 | |
| 1627 | Main operation mode: |
| 1628 | |
| 1629 | c create |
| 1630 | x extract |
| 1631 | t list |
| 1632 | |
| 1633 | File selection: |
| 1634 | |
| 1635 | f name of tarfile or "-" for stdin |
| 1636 | O extract to stdout |
| 1637 | --exclude file to exclude |
| 1638 | |
| 1639 | Informative output: |
| 1640 | |
| 1641 | v verbosely list files processed |
| 1642 | |
| 1643 | Example: |
| 1644 | |
| 1645 | $ zcat /tmp/tarball.tar.gz | tar -xf - |
| 1646 | $ tar -cf /tmp/tarball.tar /usr/local |
| 1647 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1648 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1649 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1650 | =item tee |
| 1651 | |
| 1652 | Usage: tee [OPTION]... [FILE]... |
| 1653 | |
| 1654 | Copy standard input to each FILE, and also to standard output. |
| 1655 | |
| 1656 | Options: |
| 1657 | |
| 1658 | -a append to the given FILEs, do not overwrite |
| 1659 | |
| 1660 | Example: |
| 1661 | |
| 1662 | $ echo "Hello" | tee /tmp/foo |
| 1663 | $ cat /tmp/foo |
| 1664 | Hello |
| 1665 | |
| 1666 | ------------------------------- |
| 1667 | |
| 1668 | =item telnet |
| 1669 | |
| 1670 | Usage: telnet host [port] |
| 1671 | |
| 1672 | Telnet is used to establish interactive communication with another |
| 1673 | computer over a network using the TELNET protocol. |
| 1674 | |
| 1675 | ------------------------------- |
| 1676 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1677 | =item test, [ |
| 1678 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1679 | Usage: test EXPRESSION |
| 1680 | or [ EXPRESSION ] |
| 1681 | |
| 1682 | Checks file types and compares values returning an exit |
| 1683 | code determined by the value of EXPRESSION. |
| 1684 | |
| 1685 | Example: |
| 1686 | |
| 1687 | $ test 1 -eq 2 |
| 1688 | $ echo $? |
| 1689 | 1 |
| 1690 | $ test 1 -eq 1 |
| 1691 | $ echo $? |
| 1692 | 0 |
| 1693 | $ [ -d /etc ] |
| 1694 | $ echo $? |
| 1695 | 0 |
| 1696 | $ [ -d /junk ] |
| 1697 | $ echo $? |
| 1698 | 1 |
| 1699 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1700 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1701 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1702 | =item touch |
| 1703 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1704 | Usage: touch [B<-c>] file [file ...] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1705 | |
| 1706 | Update the last-modified date on (or create) the selected file[s]. |
| 1707 | |
| 1708 | Example: |
| 1709 | |
| 1710 | $ ls -l /tmp/foo |
| 1711 | /bin/ls: /tmp/foo: No such file or directory |
| 1712 | $ touch /tmp/foo |
| 1713 | $ ls -l /tmp/foo |
| 1714 | -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo |
| 1715 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1716 | ------------------------------- |
| 1717 | |
| 1718 | =item tr |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 1719 | |
Erik Andersen | 3c1217c | 2000-05-01 22:34:24 +0000 | [diff] [blame] | 1720 | Usage: tr [-cds] STRING1 [STRING2] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1721 | |
Erik Andersen | 3c1217c | 2000-05-01 22:34:24 +0000 | [diff] [blame] | 1722 | Translate, squeeze, and/or delete characters from |
| 1723 | standard input, writing to standard output. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1724 | |
Erik Andersen | 3c1217c | 2000-05-01 22:34:24 +0000 | [diff] [blame] | 1725 | Options: |
| 1726 | |
| 1727 | -c take complement of STRING1 |
| 1728 | -d delete input characters coded STRING1 |
| 1729 | -s squeeze multiple output characters of STRING2 into one character |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1730 | |
| 1731 | Example: |
| 1732 | |
| 1733 | $ echo "gdkkn vnqkc" | tr [a-y] [b-z] |
| 1734 | hello world |
| 1735 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1736 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1737 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1738 | =item true |
| 1739 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1740 | Returns an exit code of TRUE (0) |
| 1741 | |
| 1742 | Example: |
| 1743 | |
| 1744 | $ true |
| 1745 | $ echo $? |
| 1746 | 0 |
| 1747 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1748 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1749 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1750 | =item tty |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1751 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1752 | Usage: tty |
| 1753 | |
| 1754 | Print the file name of the terminal connected to standard input. |
| 1755 | |
| 1756 | Options: |
| 1757 | |
| 1758 | -s print nothing, only return an exit status |
| 1759 | |
| 1760 | Example: |
| 1761 | |
| 1762 | $ tty |
| 1763 | /dev/tty2 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1764 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1765 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1766 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1767 | =item umount |
| 1768 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1769 | Usage: umount [flags] filesystem|directory |
| 1770 | |
| 1771 | Flags: |
| 1772 | |
Erik Andersen | 6c5f2c6 | 2000-05-05 19:49:33 +0000 | [diff] [blame] | 1773 | -a: Unmount all file systems |
| 1774 | -r: Try to remount devices as read-only if mount is busy |
| 1775 | -f: Force filesystem umount (i.e. unreachable NFS server) |
| 1776 | -l: Do not free loop device (if a loop device has been used) |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1777 | |
| 1778 | Example: |
| 1779 | |
| 1780 | $ umount /dev/hdc1 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1781 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1782 | ------------------------------- |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 1783 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1784 | =item uname |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 1785 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1786 | Usage: uname [OPTION]... |
| 1787 | |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 1788 | Print certain system information. With no OPTION, same as B<-s>. |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1789 | |
| 1790 | Options: |
| 1791 | |
| 1792 | -a print all information |
| 1793 | -m the machine (hardware) type |
| 1794 | -n print the machine's network node hostname |
| 1795 | -r print the operating system release |
| 1796 | -s print the operating system name |
| 1797 | -p print the host processor type |
| 1798 | -v print the operating system version |
| 1799 | |
| 1800 | Example: |
| 1801 | |
| 1802 | $ uname -a |
| 1803 | Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1804 | |
| 1805 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1806 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1807 | =item uniq |
| 1808 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1809 | Usage: uniq [OPTION]... [INPUT [OUTPUT]] |
| 1810 | |
| 1811 | Discard all but one of successive identical lines from INPUT |
| 1812 | (or standard input), writing to OUTPUT (or standard output). |
| 1813 | |
| 1814 | Example: |
| 1815 | |
| 1816 | $ echo -e "a\na\nb\nc\nc\na" | sort | uniq |
| 1817 | a |
| 1818 | b |
| 1819 | c |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1820 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1821 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1822 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1823 | =item update |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1824 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1825 | Usage: update [options] |
| 1826 | |
| 1827 | Periodically flushes filesystem buffers. |
| 1828 | |
| 1829 | Options: |
| 1830 | |
| 1831 | -S force use of sync(2) instead of flushing |
| 1832 | -s SECS call sync this often (default 30) |
| 1833 | -f SECS flush some buffers this often (default 5) |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1834 | |
| 1835 | ------------------------------- |
| 1836 | |
| 1837 | =item uptime |
| 1838 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1839 | Usage: uptime |
| 1840 | |
| 1841 | Tells how long the system has been running since boot. |
| 1842 | |
| 1843 | Example: |
| 1844 | |
| 1845 | $ uptime |
| 1846 | 1:55pm up 2:30, load average: 0.09, 0.04, 0.00 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1847 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1848 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1849 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1850 | =item usleep |
| 1851 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1852 | Usage: usleep N |
| 1853 | |
| 1854 | Pauses for N microseconds. |
| 1855 | |
| 1856 | Example: |
| 1857 | |
| 1858 | $ usleep 1000000 |
| 1859 | [pauses for 1 second] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1860 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1861 | ------------------------------- |
| 1862 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1863 | =item uuencode |
| 1864 | |
| 1865 | Usage: uuencode [OPTION] [INFILE] REMOTEFILE |
| 1866 | |
| 1867 | Uuencode a file. |
| 1868 | |
| 1869 | Options: |
| 1870 | |
| 1871 | -m use base64 encoding as of RFC1521 |
| 1872 | |
| 1873 | Example: |
| 1874 | |
| 1875 | $ uuencode busybox busybox |
| 1876 | begin 755 busybox |
| 1877 | M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``& |
| 1878 | ..... |
| 1879 | $ uudecode busybox busybox > busybox.uu |
| 1880 | $ |
| 1881 | |
| 1882 | ------------------------------- |
| 1883 | |
| 1884 | =item uudecode |
| 1885 | |
| 1886 | Usage: uudecode [OPTION] [FILE] |
| 1887 | |
| 1888 | Uudecode a uuencoded file |
| 1889 | |
| 1890 | Options: |
| 1891 | |
| 1892 | -o FILE direct output to FILE |
| 1893 | |
| 1894 | Example: |
| 1895 | |
| 1896 | $ uudecode -o busybox busybox.uu |
| 1897 | $ ls -l busybox |
| 1898 | -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox |
| 1899 | |
| 1900 | ------------------------------- |
| 1901 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1902 | =item wc |
| 1903 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1904 | Usage: wc [OPTION]... [FILE]... |
| 1905 | |
| 1906 | Print line, word, and byte counts for each FILE, and a total line if |
| 1907 | more than one FILE is specified. With no FILE, read standard input. |
| 1908 | |
| 1909 | Options: |
| 1910 | |
| 1911 | -c print the byte counts |
| 1912 | -l print the newline counts |
| 1913 | -L print the length of the longest line |
| 1914 | -w print the word counts |
| 1915 | |
| 1916 | Example: |
| 1917 | |
| 1918 | $ wc /etc/passwd |
| 1919 | 31 46 1365 /etc/passwd |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1920 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1921 | ------------------------------- |
| 1922 | |
Pavel Roskin | afa0662 | 2000-06-21 21:43:24 +0000 | [diff] [blame] | 1923 | =item which |
| 1924 | |
| 1925 | Usage: which [COMMAND ...] |
| 1926 | |
| 1927 | Locates a COMMAND. |
| 1928 | |
| 1929 | Example: |
| 1930 | |
| 1931 | $ which login |
| 1932 | /bin/login |
| 1933 | |
| 1934 | ------------------------------- |
| 1935 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1936 | =item whoami |
| 1937 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1938 | Usage: whoami |
| 1939 | |
| 1940 | Prints the user name associated with the current effective user id. |
| 1941 | |
| 1942 | Example: |
| 1943 | |
| 1944 | $ whoami |
| 1945 | andersen |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1946 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1947 | ------------------------------- |
| 1948 | |
| 1949 | =item yes |
| 1950 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1951 | Usage: yes [OPTION]... [STRING]... |
| 1952 | |
| 1953 | Repeatedly outputs a line with all specified STRING(s), or `y'. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1954 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1955 | ------------------------------- |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1956 | |
| 1957 | =item zcat |
| 1958 | |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 1959 | This is essentially an alias for invoking "gunzip B<-c>", where |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 1960 | it decompresses the file in question and send the output to stdout. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1961 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1962 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1963 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1964 | =back |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1965 | |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 1966 | =head1 LIBC NSS |
| 1967 | |
| 1968 | GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C |
| 1969 | library for the local environment, and to configure how it reads system data, |
| 1970 | such as passwords and group information. BusyBox has made it Policy that it |
| 1971 | will never use NSS, and will never use and libc calls that make use of NSS. |
| 1972 | This allows you to run an embedded system without the need for installing an |
| 1973 | /etc/nsswitch.conf file and without and /lib/libnss_* libraries installed. |
| 1974 | |
| 1975 | If you are using a system that is using a remote LDAP server for authentication |
| 1976 | via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the |
| 1977 | BusyBox source. Chances are though, that if you have enough space to install |
| 1978 | of that stuff on your system, then you probably want the full GNU utilities. |
| 1979 | |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1980 | =head1 SEE ALSO |
| 1981 | |
| 1982 | textutils(1), shellutils(1), etc... |
| 1983 | |
| 1984 | =head1 MAINTAINER |
| 1985 | |
Erik Andersen | 1101d23 | 2000-04-19 05:15:12 +0000 | [diff] [blame] | 1986 | Erik Andersen <andersee@debian.org> <andersen@lineo.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1987 | |
| 1988 | =head1 AUTHORS |
| 1989 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1990 | The following people have contributed code to BusyBox whether |
| 1991 | they know it or not. |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1992 | |
Erik Andersen | 1101d23 | 2000-04-19 05:15:12 +0000 | [diff] [blame] | 1993 | Erik Andersen <andersee@debian.org> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1994 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1995 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1996 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1997 | John Beppu <beppu@lineo.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1998 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1999 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2000 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2001 | Brian Candler <B.Candler@pobox.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2002 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2003 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2004 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2005 | Randolph Chung <tausq@debian.org> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2006 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2007 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2008 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2009 | Dave Cinege <dcinege@psychosis.com> |
| 2010 | |
| 2011 | =for html <br> |
| 2012 | |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 2013 | Karl M. Hegbloom <karlheg@debian.org> |
| 2014 | |
| 2015 | =for html <br> |
| 2016 | |
John Beppu | 4fd10fc | 2000-04-17 05:13:59 +0000 | [diff] [blame] | 2017 | John Lombardo <john@deltanet.com> |
| 2018 | |
| 2019 | =for html <br> |
| 2020 | |
Eric Andersen | 86ab8a3 | 2000-06-02 03:21:42 +0000 | [diff] [blame] | 2021 | Glenn McGrath <bug1@netconnect.com.au> |
| 2022 | |
| 2023 | =for html <br> |
| 2024 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2025 | Bruce Perens <bruce@perens.com> |
| 2026 | |
| 2027 | =for html <br> |
| 2028 | |
Pavel Roskin | 339b892 | 2000-06-20 00:11:07 +0000 | [diff] [blame] | 2029 | Pavel Roskin <proski@gnu.org> |
Eric Andersen | 08e9289 | 2000-06-02 03:21:36 +0000 | [diff] [blame] | 2030 | |
| 2031 | =for html <br> |
| 2032 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2033 | Linus Torvalds <torvalds@transmeta.com> |
| 2034 | |
| 2035 | =for html <br> |
| 2036 | |
| 2037 | Charles P. Wright <cpwright@villagenet.com> |
| 2038 | |
| 2039 | =for html <br> |
| 2040 | |
| 2041 | Enrique Zanardi <ezanardi@ull.es> |
| 2042 | |
| 2043 | =for html <br> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2044 | |
| 2045 | =cut |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2046 | |
Eric Andersen | bf960f5 | 2000-07-21 21:32:12 +0000 | [diff] [blame^] | 2047 | # $Id: busybox.pod,v 1.59 2000/07/21 21:32:12 andersen Exp $ |