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