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