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