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