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