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, |
| 64 | nslookup, ping, poweroff, printf, ps, pwd, reboot, 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 |
| 282 | -s Only output Lines if the include DELIM |
| 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 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1389 | =item rm |
| 1390 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1391 | Usage: rm [OPTION]... FILE... |
| 1392 | |
Eric Andersen | 815e904 | 2000-06-06 16:15:23 +0000 | [diff] [blame] | 1393 | Remove (unlink) the FILE(s). You may use '--' to |
| 1394 | indicate that all following arguments are non-options. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1395 | |
| 1396 | Options: |
| 1397 | |
| 1398 | -f remove existing destinations, never prompt |
| 1399 | -r or -R remove the contents of directories recursively |
| 1400 | |
| 1401 | Example: |
| 1402 | |
| 1403 | $ rm -rf /tmp/foo |
| 1404 | |
| 1405 | ------------------------------- |
| 1406 | |
| 1407 | =item rmdir |
| 1408 | |
| 1409 | Usage: rmdir [OPTION]... DIRECTORY... |
| 1410 | |
| 1411 | Remove the DIRECTORY(ies), if they are empty. |
| 1412 | |
| 1413 | Example: |
| 1414 | |
| 1415 | # rmdir /tmp/foo |
| 1416 | |
| 1417 | ------------------------------- |
| 1418 | |
| 1419 | =item rmmod |
| 1420 | |
| 1421 | Usage: rmmod [OPTION]... [MODULE]... |
| 1422 | |
| 1423 | Unloads the specified kernel modules from the kernel. |
| 1424 | |
| 1425 | Options: |
| 1426 | |
| 1427 | -a Try to remove all unused kernel modules. |
| 1428 | |
| 1429 | Example: |
| 1430 | |
| 1431 | $ rmmod tulip |
| 1432 | |
| 1433 | ------------------------------- |
| 1434 | |
| 1435 | =item sed |
| 1436 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1437 | Usage: sed [B<-n>] B<-e> script [file...] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1438 | |
| 1439 | Allowed sed scripts come in the following form: |
| 1440 | |
| 1441 | 'ADDR [!] COMMAND' |
| 1442 | |
| 1443 | where address ADDR can be: |
| 1444 | NUMBER Match specified line number |
| 1445 | $ Match last line |
| 1446 | /REGEXP/ Match specified regexp |
| 1447 | (! inverts the meaning of the match) |
| 1448 | |
| 1449 | and COMMAND can be: |
| 1450 | s/regexp/replacement/[igp] |
| 1451 | which attempt to match regexp against the pattern space |
| 1452 | and if successful replaces the matched portion with replacement. |
| 1453 | |
| 1454 | aTEXT |
| 1455 | which appends TEXT after the pattern space |
| 1456 | |
| 1457 | Options: |
| 1458 | |
| 1459 | -e add the script to the commands to be executed |
| 1460 | -n suppress automatic printing of pattern space |
| 1461 | |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 1462 | This version of sed matches full regular expressions. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1463 | |
| 1464 | Example: |
| 1465 | |
| 1466 | $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g' |
| 1467 | bar |
| 1468 | |
| 1469 | ------------------------------- |
| 1470 | |
Erik Andersen | 4f3f757 | 2000-04-28 00:18:56 +0000 | [diff] [blame] | 1471 | =item setkeycodes |
| 1472 | |
| 1473 | Usage: setkeycodes SCANCODE KEYCODE ... |
| 1474 | |
| 1475 | Set entries into the kernel's scancode-to-keycode map, |
| 1476 | allowing unusual keyboards to generate usable keycodes. |
| 1477 | |
| 1478 | SCANCODE may be either xx or e0xx (hexadecimal), |
| 1479 | and KEYCODE is given in decimal |
| 1480 | |
| 1481 | Example: |
| 1482 | |
| 1483 | # setkeycodes e030 127 |
| 1484 | |
| 1485 | ------------------------------- |
| 1486 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1487 | =item sh |
| 1488 | |
| 1489 | Usage: sh |
| 1490 | |
| 1491 | lash -- the BusyBox LAme SHell (command interpreter) |
| 1492 | |
| 1493 | This command does not yet have proper documentation. |
| 1494 | |
| 1495 | Use lash just as you would use any other shell. It properly handles pipes, |
| 1496 | redirects, job control, can be used as the shell for scripts (#!/bin/sh), and |
| 1497 | has a sufficient set of builtins to do what is needed. It does not (yet) |
| 1498 | support Bourne Shell syntax. If you need things like "if-then-else", "while", |
| 1499 | and such, use ash or bash. If you just need a very simple and extremely small |
| 1500 | shell, this will do the job. |
| 1501 | |
| 1502 | ------------------------------- |
| 1503 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1504 | =item sleep |
| 1505 | |
| 1506 | Usage: sleep N |
| 1507 | |
| 1508 | Pause for N seconds. |
| 1509 | |
| 1510 | Example: |
| 1511 | |
| 1512 | $ sleep 2 |
| 1513 | [2 second delay results] |
| 1514 | |
| 1515 | ------------------------------- |
| 1516 | |
| 1517 | =item sort |
| 1518 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1519 | Usage: sort [B<-n>] [B<-r>] [FILE]... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1520 | |
| 1521 | Sorts lines of text in the specified files |
| 1522 | |
| 1523 | Example: |
| 1524 | |
| 1525 | $ echo -e "e\nf\nb\nd\nc\na" | sort |
| 1526 | a |
| 1527 | b |
| 1528 | c |
| 1529 | d |
| 1530 | e |
| 1531 | f |
| 1532 | |
| 1533 | ------------------------------- |
| 1534 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1535 | =item swapoff |
| 1536 | |
| 1537 | Usage: swapoff [OPTION] [device] |
| 1538 | |
| 1539 | Stop swapping virtual memory pages on the given device. |
| 1540 | |
| 1541 | Options: |
| 1542 | |
| 1543 | -a Stop swapping on all swap devices |
| 1544 | |
| 1545 | ------------------------------- |
| 1546 | |
| 1547 | =item swapon |
| 1548 | |
| 1549 | Usage: swapon [OPTION] [device] |
| 1550 | |
| 1551 | Start swapping virtual memory pages on the given device. |
| 1552 | |
| 1553 | Options: |
| 1554 | |
| 1555 | -a Start swapping on all swap devices |
| 1556 | |
| 1557 | ------------------------------- |
| 1558 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1559 | =item sync |
| 1560 | |
| 1561 | Usage: sync |
| 1562 | |
| 1563 | Write all buffered filesystem blocks to disk. |
| 1564 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1565 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1566 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1567 | =item syslogd |
| 1568 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1569 | Usage: syslogd [OPTION]... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1570 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1571 | Linux system and kernel (provides klogd) logging utility. |
| 1572 | Note that this version of syslogd/klogd ignores /etc/syslog.conf. |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1573 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1574 | Options: |
Pavel Roskin | 049b706 | 2000-06-07 21:19:49 +0000 | [diff] [blame] | 1575 | |
Pavel Roskin | da10ec0 | 2000-06-07 21:08:25 +0000 | [diff] [blame] | 1576 | -m NUM Interval between MARK lines (default=20min, 0=off) |
| 1577 | -n Run as a foreground process |
| 1578 | -K Do not start up the klogd process |
| 1579 | -O FILE Use an alternate log file (default=/var/log/messages) |
Eric Andersen | ced2cef | 2000-07-20 23:41:24 +0000 | [diff] [blame^] | 1580 | -R HOST[:PORT] Log messages to HOST on PORT (default=514) over UDP. |
| 1581 | |
| 1582 | Example: |
| 1583 | |
| 1584 | $ syslogd -R masterlog:514 |
| 1585 | $ syslogd -R 192.168.1.1:601 |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1586 | |
| 1587 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1588 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1589 | =item tail |
| 1590 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1591 | Usage: tail [OPTION] [FILE]... |
| 1592 | |
| 1593 | Print last 10 lines of each FILE to standard output. |
| 1594 | With more than one FILE, precede each with a header giving the |
| 1595 | file name. With no FILE, or when FILE is -, read standard input. |
| 1596 | |
| 1597 | Options: |
| 1598 | |
| 1599 | -n NUM Print last NUM lines instead of first 10 |
| 1600 | -f Output data as the file grows. This version |
| 1601 | of 'tail -f' supports only one file at a time. |
| 1602 | |
| 1603 | Example: |
| 1604 | |
| 1605 | $ tail -n 1 /etc/resolv.conf |
| 1606 | nameserver 10.0.0.1 |
| 1607 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1608 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1609 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1610 | =item tar |
| 1611 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1612 | Usage: tar -[cxtvO] [B<--exclude> File] [B<-f> tarFile] [FILE] ... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1613 | |
| 1614 | Create, extract, or list files from a tar file. Note that |
| 1615 | this version of tar treats hard links as separate files. |
| 1616 | |
| 1617 | Main operation mode: |
| 1618 | |
| 1619 | c create |
| 1620 | x extract |
| 1621 | t list |
| 1622 | |
| 1623 | File selection: |
| 1624 | |
| 1625 | f name of tarfile or "-" for stdin |
| 1626 | O extract to stdout |
| 1627 | --exclude file to exclude |
| 1628 | |
| 1629 | Informative output: |
| 1630 | |
| 1631 | v verbosely list files processed |
| 1632 | |
| 1633 | Example: |
| 1634 | |
| 1635 | $ zcat /tmp/tarball.tar.gz | tar -xf - |
| 1636 | $ tar -cf /tmp/tarball.tar /usr/local |
| 1637 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1638 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1639 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1640 | =item tee |
| 1641 | |
| 1642 | Usage: tee [OPTION]... [FILE]... |
| 1643 | |
| 1644 | Copy standard input to each FILE, and also to standard output. |
| 1645 | |
| 1646 | Options: |
| 1647 | |
| 1648 | -a append to the given FILEs, do not overwrite |
| 1649 | |
| 1650 | Example: |
| 1651 | |
| 1652 | $ echo "Hello" | tee /tmp/foo |
| 1653 | $ cat /tmp/foo |
| 1654 | Hello |
| 1655 | |
| 1656 | ------------------------------- |
| 1657 | |
| 1658 | =item telnet |
| 1659 | |
| 1660 | Usage: telnet host [port] |
| 1661 | |
| 1662 | Telnet is used to establish interactive communication with another |
| 1663 | computer over a network using the TELNET protocol. |
| 1664 | |
| 1665 | ------------------------------- |
| 1666 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1667 | =item test, [ |
| 1668 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1669 | Usage: test EXPRESSION |
| 1670 | or [ EXPRESSION ] |
| 1671 | |
| 1672 | Checks file types and compares values returning an exit |
| 1673 | code determined by the value of EXPRESSION. |
| 1674 | |
| 1675 | Example: |
| 1676 | |
| 1677 | $ test 1 -eq 2 |
| 1678 | $ echo $? |
| 1679 | 1 |
| 1680 | $ test 1 -eq 1 |
| 1681 | $ echo $? |
| 1682 | 0 |
| 1683 | $ [ -d /etc ] |
| 1684 | $ echo $? |
| 1685 | 0 |
| 1686 | $ [ -d /junk ] |
| 1687 | $ echo $? |
| 1688 | 1 |
| 1689 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1690 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1691 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1692 | =item touch |
| 1693 | |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1694 | Usage: touch [B<-c>] file [file ...] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1695 | |
| 1696 | Update the last-modified date on (or create) the selected file[s]. |
| 1697 | |
| 1698 | Example: |
| 1699 | |
| 1700 | $ ls -l /tmp/foo |
| 1701 | /bin/ls: /tmp/foo: No such file or directory |
| 1702 | $ touch /tmp/foo |
| 1703 | $ ls -l /tmp/foo |
| 1704 | -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo |
| 1705 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1706 | ------------------------------- |
| 1707 | |
| 1708 | =item tr |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 1709 | |
Erik Andersen | 3c1217c | 2000-05-01 22:34:24 +0000 | [diff] [blame] | 1710 | Usage: tr [-cds] STRING1 [STRING2] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1711 | |
Erik Andersen | 3c1217c | 2000-05-01 22:34:24 +0000 | [diff] [blame] | 1712 | Translate, squeeze, and/or delete characters from |
| 1713 | standard input, writing to standard output. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1714 | |
Erik Andersen | 3c1217c | 2000-05-01 22:34:24 +0000 | [diff] [blame] | 1715 | Options: |
| 1716 | |
| 1717 | -c take complement of STRING1 |
| 1718 | -d delete input characters coded STRING1 |
| 1719 | -s squeeze multiple output characters of STRING2 into one character |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1720 | |
| 1721 | Example: |
| 1722 | |
| 1723 | $ echo "gdkkn vnqkc" | tr [a-y] [b-z] |
| 1724 | hello world |
| 1725 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1726 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1727 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1728 | =item true |
| 1729 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1730 | Returns an exit code of TRUE (0) |
| 1731 | |
| 1732 | Example: |
| 1733 | |
| 1734 | $ true |
| 1735 | $ echo $? |
| 1736 | 0 |
| 1737 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1738 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1739 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1740 | =item tty |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1741 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1742 | Usage: tty |
| 1743 | |
| 1744 | Print the file name of the terminal connected to standard input. |
| 1745 | |
| 1746 | Options: |
| 1747 | |
| 1748 | -s print nothing, only return an exit status |
| 1749 | |
| 1750 | Example: |
| 1751 | |
| 1752 | $ tty |
| 1753 | /dev/tty2 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1754 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1755 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1756 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1757 | =item umount |
| 1758 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1759 | Usage: umount [flags] filesystem|directory |
| 1760 | |
| 1761 | Flags: |
| 1762 | |
Erik Andersen | 6c5f2c6 | 2000-05-05 19:49:33 +0000 | [diff] [blame] | 1763 | -a: Unmount all file systems |
| 1764 | -r: Try to remount devices as read-only if mount is busy |
| 1765 | -f: Force filesystem umount (i.e. unreachable NFS server) |
| 1766 | -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] | 1767 | |
| 1768 | Example: |
| 1769 | |
| 1770 | $ umount /dev/hdc1 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1771 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1772 | ------------------------------- |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 1773 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1774 | =item uname |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 1775 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1776 | Usage: uname [OPTION]... |
| 1777 | |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 1778 | Print certain system information. With no OPTION, same as B<-s>. |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1779 | |
| 1780 | Options: |
| 1781 | |
| 1782 | -a print all information |
| 1783 | -m the machine (hardware) type |
| 1784 | -n print the machine's network node hostname |
| 1785 | -r print the operating system release |
| 1786 | -s print the operating system name |
| 1787 | -p print the host processor type |
| 1788 | -v print the operating system version |
| 1789 | |
| 1790 | Example: |
| 1791 | |
| 1792 | $ uname -a |
| 1793 | 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] | 1794 | |
| 1795 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1796 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1797 | =item uniq |
| 1798 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1799 | Usage: uniq [OPTION]... [INPUT [OUTPUT]] |
| 1800 | |
| 1801 | Discard all but one of successive identical lines from INPUT |
| 1802 | (or standard input), writing to OUTPUT (or standard output). |
| 1803 | |
| 1804 | Example: |
| 1805 | |
| 1806 | $ echo -e "a\na\nb\nc\nc\na" | sort | uniq |
| 1807 | a |
| 1808 | b |
| 1809 | c |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1810 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1811 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1812 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1813 | =item update |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1814 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1815 | Usage: update [options] |
| 1816 | |
| 1817 | Periodically flushes filesystem buffers. |
| 1818 | |
| 1819 | Options: |
| 1820 | |
| 1821 | -S force use of sync(2) instead of flushing |
| 1822 | -s SECS call sync this often (default 30) |
| 1823 | -f SECS flush some buffers this often (default 5) |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1824 | |
| 1825 | ------------------------------- |
| 1826 | |
| 1827 | =item uptime |
| 1828 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1829 | Usage: uptime |
| 1830 | |
| 1831 | Tells how long the system has been running since boot. |
| 1832 | |
| 1833 | Example: |
| 1834 | |
| 1835 | $ uptime |
| 1836 | 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] | 1837 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1838 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1839 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1840 | =item usleep |
| 1841 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1842 | Usage: usleep N |
| 1843 | |
| 1844 | Pauses for N microseconds. |
| 1845 | |
| 1846 | Example: |
| 1847 | |
| 1848 | $ usleep 1000000 |
| 1849 | [pauses for 1 second] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1850 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1851 | ------------------------------- |
| 1852 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1853 | =item uuencode |
| 1854 | |
| 1855 | Usage: uuencode [OPTION] [INFILE] REMOTEFILE |
| 1856 | |
| 1857 | Uuencode a file. |
| 1858 | |
| 1859 | Options: |
| 1860 | |
| 1861 | -m use base64 encoding as of RFC1521 |
| 1862 | |
| 1863 | Example: |
| 1864 | |
| 1865 | $ uuencode busybox busybox |
| 1866 | begin 755 busybox |
| 1867 | M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``& |
| 1868 | ..... |
| 1869 | $ uudecode busybox busybox > busybox.uu |
| 1870 | $ |
| 1871 | |
| 1872 | ------------------------------- |
| 1873 | |
| 1874 | =item uudecode |
| 1875 | |
| 1876 | Usage: uudecode [OPTION] [FILE] |
| 1877 | |
| 1878 | Uudecode a uuencoded file |
| 1879 | |
| 1880 | Options: |
| 1881 | |
| 1882 | -o FILE direct output to FILE |
| 1883 | |
| 1884 | Example: |
| 1885 | |
| 1886 | $ uudecode -o busybox busybox.uu |
| 1887 | $ ls -l busybox |
| 1888 | -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox |
| 1889 | |
| 1890 | ------------------------------- |
| 1891 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1892 | =item wc |
| 1893 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1894 | Usage: wc [OPTION]... [FILE]... |
| 1895 | |
| 1896 | Print line, word, and byte counts for each FILE, and a total line if |
| 1897 | more than one FILE is specified. With no FILE, read standard input. |
| 1898 | |
| 1899 | Options: |
| 1900 | |
| 1901 | -c print the byte counts |
| 1902 | -l print the newline counts |
| 1903 | -L print the length of the longest line |
| 1904 | -w print the word counts |
| 1905 | |
| 1906 | Example: |
| 1907 | |
| 1908 | $ wc /etc/passwd |
| 1909 | 31 46 1365 /etc/passwd |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1910 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1911 | ------------------------------- |
| 1912 | |
Pavel Roskin | afa0662 | 2000-06-21 21:43:24 +0000 | [diff] [blame] | 1913 | =item which |
| 1914 | |
| 1915 | Usage: which [COMMAND ...] |
| 1916 | |
| 1917 | Locates a COMMAND. |
| 1918 | |
| 1919 | Example: |
| 1920 | |
| 1921 | $ which login |
| 1922 | /bin/login |
| 1923 | |
| 1924 | ------------------------------- |
| 1925 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1926 | =item whoami |
| 1927 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1928 | Usage: whoami |
| 1929 | |
| 1930 | Prints the user name associated with the current effective user id. |
| 1931 | |
| 1932 | Example: |
| 1933 | |
| 1934 | $ whoami |
| 1935 | andersen |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1936 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1937 | ------------------------------- |
| 1938 | |
| 1939 | =item yes |
| 1940 | |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 1941 | Usage: yes [OPTION]... [STRING]... |
| 1942 | |
| 1943 | Repeatedly outputs a line with all specified STRING(s), or `y'. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1944 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1945 | ------------------------------- |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1946 | |
| 1947 | =item zcat |
| 1948 | |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 1949 | This is essentially an alias for invoking "gunzip B<-c>", where |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 1950 | it decompresses the file in question and send the output to stdout. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1951 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1952 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1953 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1954 | =back |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1955 | |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 1956 | =head1 LIBC NSS |
| 1957 | |
| 1958 | GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C |
| 1959 | library for the local environment, and to configure how it reads system data, |
| 1960 | such as passwords and group information. BusyBox has made it Policy that it |
| 1961 | will never use NSS, and will never use and libc calls that make use of NSS. |
| 1962 | This allows you to run an embedded system without the need for installing an |
| 1963 | /etc/nsswitch.conf file and without and /lib/libnss_* libraries installed. |
| 1964 | |
| 1965 | If you are using a system that is using a remote LDAP server for authentication |
| 1966 | via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the |
| 1967 | BusyBox source. Chances are though, that if you have enough space to install |
| 1968 | of that stuff on your system, then you probably want the full GNU utilities. |
| 1969 | |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1970 | =head1 SEE ALSO |
| 1971 | |
| 1972 | textutils(1), shellutils(1), etc... |
| 1973 | |
| 1974 | =head1 MAINTAINER |
| 1975 | |
Erik Andersen | 1101d23 | 2000-04-19 05:15:12 +0000 | [diff] [blame] | 1976 | Erik Andersen <andersee@debian.org> <andersen@lineo.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1977 | |
| 1978 | =head1 AUTHORS |
| 1979 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1980 | The following people have contributed code to BusyBox whether |
| 1981 | they know it or not. |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1982 | |
Erik Andersen | 1101d23 | 2000-04-19 05:15:12 +0000 | [diff] [blame] | 1983 | Erik Andersen <andersee@debian.org> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1984 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1985 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1986 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1987 | John Beppu <beppu@lineo.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1988 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1989 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1990 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1991 | Brian Candler <B.Candler@pobox.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1992 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1993 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1994 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1995 | Randolph Chung <tausq@debian.org> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 1996 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1997 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1998 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 1999 | Dave Cinege <dcinege@psychosis.com> |
| 2000 | |
| 2001 | =for html <br> |
| 2002 | |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 2003 | Karl M. Hegbloom <karlheg@debian.org> |
| 2004 | |
| 2005 | =for html <br> |
| 2006 | |
John Beppu | 4fd10fc | 2000-04-17 05:13:59 +0000 | [diff] [blame] | 2007 | John Lombardo <john@deltanet.com> |
| 2008 | |
| 2009 | =for html <br> |
| 2010 | |
Eric Andersen | 86ab8a3 | 2000-06-02 03:21:42 +0000 | [diff] [blame] | 2011 | Glenn McGrath <bug1@netconnect.com.au> |
| 2012 | |
| 2013 | =for html <br> |
| 2014 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2015 | Bruce Perens <bruce@perens.com> |
| 2016 | |
| 2017 | =for html <br> |
| 2018 | |
Pavel Roskin | 339b892 | 2000-06-20 00:11:07 +0000 | [diff] [blame] | 2019 | Pavel Roskin <proski@gnu.org> |
Eric Andersen | 08e9289 | 2000-06-02 03:21:36 +0000 | [diff] [blame] | 2020 | |
| 2021 | =for html <br> |
| 2022 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2023 | Linus Torvalds <torvalds@transmeta.com> |
| 2024 | |
| 2025 | =for html <br> |
| 2026 | |
| 2027 | Charles P. Wright <cpwright@villagenet.com> |
| 2028 | |
| 2029 | =for html <br> |
| 2030 | |
| 2031 | Enrique Zanardi <ezanardi@ull.es> |
| 2032 | |
| 2033 | =for html <br> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2034 | |
| 2035 | =cut |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2036 | |
Eric Andersen | ced2cef | 2000-07-20 23:41:24 +0000 | [diff] [blame^] | 2037 | # $Id: busybox.pod,v 1.57 2000/07/20 23:41:24 andersen Exp $ |