Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1 | # vi: set sw=4 ts=4: |
John Beppu | 08e7f75 | 2000-04-13 03:22:20 +0000 | [diff] [blame] | 2 | |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 3 | =head1 NAME |
| 4 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 5 | BusyBox - The Swiss Army Knife of Embedded Linux |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 6 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 7 | =head1 SYNTAX |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 8 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 9 | BusyBox <function> [arguments...] # or |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 10 | |
| 11 | <function> [arguments...] # if symlinked |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 12 | |
| 13 | =head1 DESCRIPTION |
| 14 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 15 | BusyBox combines tiny versions of many common UNIX utilities into a single |
| 16 | small executable. It provides minimalist replacements for most of the utilities |
| 17 | you usually find in fileutils, shellutils, findutils, textutils, grep, gzip, |
| 18 | tar, etc. BusyBox provides a fairly complete POSIX environment for any small |
Eric Andersen | 98cd53e | 2000-06-16 19:56:44 +0000 | [diff] [blame] | 19 | or embedded system. The utilities in BusyBox generally have fewer options than |
Eric Andersen | f2fffef | 2000-06-05 17:23:06 +0000 | [diff] [blame] | 20 | their full-featured GNU cousins; however, the options that are included provide |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +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 |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +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 | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 58 | ar, basename, busybox, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp, cp, |
| 59 | cut, date, dc, dd, deallocvt, df, dirname, dmesg, dos2unix, dpkg, dpkg-deb, du, |
| 60 | dumpkmap, dutmp, echo, expr, false, fbset, fdflush, find, free, freeramdisk, |
| 61 | fsck.minix, getopt, grep, gunzip, gzip, halt, head, hostid, hostname, id, |
| 62 | ifconfig, init, insmod, kill, killall, klogd, length, ln, loadacm, loadfont, |
| 63 | loadkmap, logger, logname, ls, lsmod, makedevs, md5sum, mkdir, mkfifo, |
| 64 | mkfs.minix, mknod, mkswap, mktemp, more, mount, mt, mv, nc, nslookup, ping, |
| 65 | pivot_root, poweroff, printf, ps, pwd, rdate, readlink, reboot, renice, reset, |
| 66 | rm, rmdir, rmmod, route, rpmunpack, sed, setkeycodes, sh, sleep, sort, stty, |
| 67 | swapoff, swapon, sync, syslogd, tail, tar, tee, telnet, test, tftp, touch, tr, |
| 68 | true, tty, umount, uname, uniq, unix2dos, update, uptime, usleep, uudecode, |
| 69 | uuencode, watchdog, wc, wget, which, whoami, xargs, yes, zcat, [ |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 70 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 71 | =over 4 |
| 72 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 73 | =item B<adjtimex> |
| 74 | |
| 75 | adjtimex [B<-q>] [B<-o> offset] [B<-f> frequency] [B<-p> timeconstant] [B<-t> tick] |
| 76 | |
| 77 | Reads and optionally sets system timebase parameters. |
| 78 | See adjtimex(2). |
| 79 | |
| 80 | Options: |
| 81 | |
| 82 | -q quiet mode - do not print |
| 83 | -o offset time offset, microseconds |
| 84 | -f frequency frequency adjust, integer kernel units (65536 is 1ppm) |
| 85 | (positive values make the system clock run fast) |
| 86 | -t tick microseconds per tick, usually 10000 |
| 87 | -p timeconstant |
| 88 | |
| 89 | ------------------------------- |
| 90 | |
| 91 | =item B<ar> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 92 | |
| 93 | ar -[ovR]{ptx} archive filenames |
Eric Andersen | 86ab8a3 | 2000-06-02 03:21:42 +0000 | [diff] [blame] | 94 | |
| 95 | Extract or list files from an ar archive. |
| 96 | |
| 97 | Options: |
| 98 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 99 | -o preserve original dates |
| 100 | -p extract to stdout |
| 101 | -t list |
| 102 | -x extract |
| 103 | -v verbosely list files processed |
| 104 | -R recursive action |
Eric Andersen | 86ab8a3 | 2000-06-02 03:21:42 +0000 | [diff] [blame] | 105 | |
| 106 | ------------------------------- |
| 107 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 108 | =item B<basename> |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 109 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 110 | basename FILE [SUFFIX] |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 111 | |
Erik Andersen | ac130e1 | 2000-05-10 05:00:31 +0000 | [diff] [blame] | 112 | Strips directory path and suffixes from FILE. |
| 113 | If specified, also removes any trailing SUFFIX. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 114 | |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 115 | Example: |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 116 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 117 | $ basename /usr/local/bin/foo |
| 118 | foo |
| 119 | $ basename /usr/local/bin/ |
| 120 | bin |
| 121 | $ basename /foo/bar.txt .txt |
| 122 | bar |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 123 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 124 | ------------------------------- |
| 125 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 126 | =item B<cat> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 127 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 128 | cat [FILE]... |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 129 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 130 | Concatenates FILE(s) and prints them to stdout. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 131 | |
| 132 | Example: |
| 133 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 134 | $ cat /proc/uptime |
| 135 | 110716.72 17.67 |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 136 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 137 | ------------------------------- |
| 138 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 139 | =item B<chgrp> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 140 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 141 | chgrp [OPTION]... GROUP FILE... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 142 | |
| 143 | Change the group membership of each FILE to GROUP. |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 144 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 145 | Options: |
| 146 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 147 | -R Changes files and directories recursively. |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 148 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 149 | Example: |
| 150 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 151 | $ ls -l /tmp/foo |
| 152 | -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo |
| 153 | $ chgrp root /tmp/foo |
| 154 | $ ls -l /tmp/foo |
| 155 | -r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 156 | |
| 157 | ------------------------------- |
| 158 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 159 | =item B<chmod> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 160 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 161 | chmod [B<-R>] MODE[,MODE]... FILE... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 162 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 163 | Each MODE is one or more of the letters ugoa, one of the |
| 164 | symbols +-= and one or more of the letters rwxst. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 165 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 166 | Options: |
| 167 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 168 | -R Changes files and directories recursively. |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 169 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 170 | Example: |
| 171 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 172 | $ ls -l /tmp/foo |
| 173 | -rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo |
| 174 | $ chmod u+x /tmp/foo |
| 175 | $ ls -l /tmp/foo |
| 176 | -rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo* |
| 177 | $ chmod 444 /tmp/foo |
| 178 | $ ls -l /tmp/foo |
| 179 | -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] | 180 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 181 | ------------------------------- |
| 182 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 183 | =item B<chown> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 184 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 185 | chown [OPTION]... OWNER[<.|:>[GROUP]] FILE... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 186 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 187 | Change 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] | 188 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 189 | Options: |
| 190 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 191 | -R Changes files and directories recursively. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 192 | |
| 193 | Example: |
| 194 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 195 | $ ls -l /tmp/foo |
| 196 | -r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo |
| 197 | $ chown root /tmp/foo |
| 198 | $ ls -l /tmp/foo |
| 199 | -r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo |
| 200 | $ chown root.root /tmp/foo |
| 201 | ls -l /tmp/foo |
| 202 | -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] | 203 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 204 | ------------------------------- |
| 205 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 206 | =item B<chroot> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 207 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 208 | chroot NEWROOT [COMMAND...] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 209 | |
| 210 | Run COMMAND with root directory set to NEWROOT. |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 211 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 212 | Example: |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 213 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 214 | $ ls -l /bin/ls |
| 215 | lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox |
| 216 | $ mount /dev/hdc1 /mnt -t minix |
| 217 | $ chroot /mnt |
| 218 | $ ls -l /bin/ls |
| 219 | -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] | 220 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 221 | ------------------------------- |
| 222 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 223 | =item B<chvt> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 224 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 225 | chvt N |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 226 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 227 | Changes the foreground virtual terminal to /dev/ttyN |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 228 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 229 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 230 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 231 | =item B<clear> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 232 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 233 | clear |
| 234 | |
| 235 | Clear screen. |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 236 | |
| 237 | ------------------------------- |
| 238 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 239 | =item B<cmp> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 240 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 241 | cmp FILE1 [FILE2] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 242 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 243 | Compare files. |
| 244 | |
| 245 | ------------------------------- |
| 246 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 247 | =item B<cp> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 248 | |
| 249 | cp [OPTION]... SOURCE DEST |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 250 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 251 | Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 252 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 253 | -a Same as -dpR |
| 254 | -d Preserves links |
| 255 | -p Preserves file attributes if possible |
| 256 | -f force (implied; ignored) - always set |
| 257 | -R Copies directories recursively |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 258 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 259 | ------------------------------- |
| 260 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 261 | =item B<cut> |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 262 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 263 | cut [OPTION]... [FILE]... |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 264 | |
| 265 | Prints selected fields from each input FILE to standard output. |
| 266 | |
| 267 | Options: |
| 268 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 269 | -b LIST Output only bytes from LIST |
| 270 | -c LIST Output only characters from LIST |
| 271 | -d CHAR Use CHAR instead of tab as the field delimiter |
| 272 | -s Output only the lines containing delimiter |
| 273 | -f N Print only these fields |
| 274 | -n Ignored |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 275 | |
| 276 | Example: |
| 277 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 278 | $ echo Hello world | cut -f 1 -d ' ' |
| 279 | Hello |
| 280 | $ echo Hello world | cut -f 2 -d ' ' |
| 281 | world |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 282 | |
| 283 | ------------------------------- |
| 284 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 285 | =item B<date> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 286 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 287 | date [OPTION]... [+FORMAT] |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 288 | |
Erik Andersen | cf8d38a | 2000-04-21 01:23:36 +0000 | [diff] [blame] | 289 | 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] | 290 | |
| 291 | Options: |
Erik Andersen | e31c066 | 2000-05-02 05:32:07 +0000 | [diff] [blame] | 292 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 293 | -R Outputs RFC-822 compliant date string |
| 294 | -d STRING display time described by STRING, not `now' |
| 295 | -s Sets time described by STRING |
| 296 | -u Prints or sets Coordinated Universal Time |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 297 | |
| 298 | Example: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 299 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 300 | $ date |
| 301 | Wed Apr 12 18:52:41 MDT 2000 |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 302 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 303 | ------------------------------- |
| 304 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 305 | =item B<dc> |
John Beppu | 0021679 | 2000-06-21 19:06:16 +0000 | [diff] [blame] | 306 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 307 | dc expression ... |
John Beppu | 0021679 | 2000-06-21 19:06:16 +0000 | [diff] [blame] | 308 | |
| 309 | This is a Tiny RPN calculator that understands the |
| 310 | following operations: +, -, /, *, and, or, not, eor. |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 311 | i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \* 2 2 + /' -> 16 |
John Beppu | 0021679 | 2000-06-21 19:06:16 +0000 | [diff] [blame] | 312 | |
| 313 | Example: |
| 314 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 315 | $ dc 2 2 + |
| 316 | 4 |
| 317 | $ dc 8 8 * 2 2 + / |
| 318 | 16 |
| 319 | $ dc 0 1 and |
| 320 | 0 |
| 321 | $ dc 0 1 or |
| 322 | 1 |
| 323 | $ echo 72 9 div 8 mul | dc |
| 324 | 64 |
John Beppu | 0021679 | 2000-06-21 19:06:16 +0000 | [diff] [blame] | 325 | |
| 326 | ------------------------------- |
| 327 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 328 | =item B<dd> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 329 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 330 | dd [if=FILE] [of=FILE] [bs=N] [count=N] [skip=N] |
| 331 | [seek=N] [conv=notrunc|sync] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 332 | |
| 333 | Copy a file, converting and formatting according to options |
| 334 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 335 | if=FILE read from FILE instead of stdin |
| 336 | of=FILE write to FILE instead of stdout |
| 337 | bs=N read and write N bytes at a time |
| 338 | count=N copy only N input blocks |
| 339 | skip=N skip N input blocks |
| 340 | seek=N skip N output blocks |
| 341 | conv=notrunc don't truncate output file |
| 342 | conv=sync pad blocks with zeros |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 343 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 344 | Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024), |
| 345 | MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824). |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 346 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 347 | Example: |
| 348 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 349 | $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4 |
| 350 | 4+0 records in |
| 351 | 4+0 records out |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 352 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 353 | ------------------------------- |
| 354 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 355 | =item B<deallocvt> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 356 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 357 | deallocvt N |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 358 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 359 | Deallocate unused virtual terminal /dev/ttyN |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 360 | |
| 361 | ------------------------------- |
| 362 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 363 | =item B<df> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 364 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 365 | df [B<-hmk>] [filesystem ...] |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 366 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 367 | Print the filesystem space used and space available. |
Glenn L McGrath | fa04432 | 2001-01-03 01:06:30 +0000 | [diff] [blame] | 368 | |
| 369 | Options: |
| 370 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 371 | -h print sizes in human readable format (e.g., 1K 243M 2G ) |
| 372 | -m print sizes in megabytes |
| 373 | -k print sizes in kilobytes(default) |
Glenn L McGrath | fa04432 | 2001-01-03 01:06:30 +0000 | [diff] [blame] | 374 | |
| 375 | Example: |
| 376 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 377 | $ df |
| 378 | Filesystem 1k-blocks Used Available Use% Mounted on |
| 379 | /dev/sda3 8690864 8553540 137324 98% / |
| 380 | /dev/sda1 64216 36364 27852 57% /boot |
| 381 | $ df /dev/sda3 |
| 382 | Filesystem 1k-blocks Used Available Use% Mounted on |
| 383 | /dev/sda3 8690864 8553540 137324 98% / |
Glenn L McGrath | fa04432 | 2001-01-03 01:06:30 +0000 | [diff] [blame] | 384 | |
| 385 | ------------------------------- |
| 386 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 387 | =item B<dirname> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 388 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 389 | dirname [FILENAME ...] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 390 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 391 | Strips non-directory suffix from FILENAME |
| 392 | |
| 393 | Example: |
| 394 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 395 | $ dirname /tmp/foo |
| 396 | /tmp |
| 397 | $ dirname /tmp/foo/ |
| 398 | /tmp |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 399 | |
| 400 | ------------------------------- |
| 401 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 402 | =item B<dmesg> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 403 | |
| 404 | dmesg [B<-c>] [B<-n> LEVEL] [B<-s> SIZE] |
| 405 | |
| 406 | Prints or controls the kernel ring buffer |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 407 | |
| 408 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 409 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 410 | -c Clears the ring buffer's contents after printing |
| 411 | -n LEVEL Sets console logging level |
| 412 | -s SIZE Use a buffer of size SIZE |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 413 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 414 | ------------------------------- |
| 415 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 416 | =item B<dos2unix> |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 417 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 418 | dos2unix [option] [file] |
| 419 | |
| 420 | Converts a text file to/from dos format to unix format. |
| 421 | |
| 422 | Options: |
| 423 | |
| 424 | -u output will be in UNIX format |
| 425 | -d output will be in DOS format |
| 426 | |
| 427 | - when no option is given then input format will be automaticaly detected |
| 428 | |
| 429 | and converted to the oposite format on output |
| 430 | - when no file is given, then stdin is used as input and stdout as output |
| 431 | |
| 432 | ------------------------------- |
| 433 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 434 | =item B<dpkg> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 435 | |
| 436 | dpkg [B<-i>|B<-r>|-B<-unpack>|-B<-configure>] my.deb |
| 437 | |
| 438 | WORK IN PROGRESS, only usefull for debian-installer |
| 439 | |
| 440 | ------------------------------- |
| 441 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 442 | =item B<dpkg_deb> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 443 | |
| 444 | dpkg_deb [B<-cexX>] file directory |
| 445 | |
| 446 | Perform actions on debian packages (.debs) |
| 447 | |
| 448 | Options: |
| 449 | |
| 450 | -c List contents of filesystem tree (verbose) |
| 451 | -l List contents of filesystem tree (.list format) |
| 452 | -e Extract control files to directory |
| 453 | -x Exctract packages filesystem tree to directory |
| 454 | -X Verbose extract |
| 455 | |
| 456 | Example: |
| 457 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 458 | $ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 459 | |
| 460 | ------------------------------- |
| 461 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 462 | =item B<du> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 463 | |
| 464 | du [B<-lshmk>] [FILE]... |
| 465 | |
| 466 | Summarizes disk space used for each FILE and/or directory. |
| 467 | Disk space is printed in units of 1024 bytes. |
| 468 | |
| 469 | Options: |
| 470 | |
| 471 | -l count sizes many times if hard linked |
| 472 | -s display only a total for each argument |
| 473 | -h print sizes in human readable format (e.g., 1K 243M 2G ) |
| 474 | -m print sizes in megabytes |
| 475 | -k print sizes in kilobytes(default) |
| 476 | |
| 477 | Example: |
| 478 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 479 | $ du |
| 480 | 16 ./CVS |
| 481 | 12 ./kernel-patches/CVS |
| 482 | 80 ./kernel-patches |
| 483 | 12 ./tests/CVS |
| 484 | 36 ./tests |
| 485 | 12 ./scripts/CVS |
| 486 | 16 ./scripts |
| 487 | 12 ./docs/CVS |
| 488 | 104 ./docs |
| 489 | 2417 . |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 490 | |
| 491 | ------------------------------- |
| 492 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 493 | =item B<dumpkmap> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 494 | |
| 495 | dumpkmap > keymap |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 496 | |
Eric Andersen | 337ec1b | 2000-11-17 17:23:16 +0000 | [diff] [blame] | 497 | Prints out a binary keyboard translation table to standard output. |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 498 | |
Eric Andersen | 18a1014 | 2000-09-01 16:12:57 +0000 | [diff] [blame] | 499 | Example: |
| 500 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 501 | $ dumpkmap > keymap |
Eric Andersen | 18a1014 | 2000-09-01 16:12:57 +0000 | [diff] [blame] | 502 | |
Eric Andersen | 61dc057 | 2000-07-11 17:29:36 +0000 | [diff] [blame] | 503 | ------------------------------- |
| 504 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 505 | =item B<dutmp> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 506 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 507 | dutmp [FILE] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 508 | |
| 509 | Dump utmp file format (pipe delimited) from FILE |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 510 | or stdin to stdout. (i.e. 'dutmp /var/run/utmp') |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 511 | |
| 512 | Example: |
| 513 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 514 | $ dutmp /var/run/utmp |
| 515 | 8|7||si|||0|0|0|955637625|760097|0 |
| 516 | 2|0|~|~~|reboot||0|0|0|955637625|782235|0 |
| 517 | 1|20020|~|~~|runlevel||0|0|0|955637625|800089|0 |
| 518 | 8|125||l4|||0|0|0|955637629|998367|0 |
| 519 | 6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0 |
| 520 | 6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0 |
| 521 | 7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0 |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 522 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 523 | ------------------------------- |
| 524 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 525 | =item B<echo> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 526 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 527 | echo [B<-neE>] [ARG ...] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 528 | |
| 529 | Prints the specified ARGs to stdout |
| 530 | |
| 531 | Options: |
| 532 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 533 | -n suppress trailing newline |
| 534 | -e interpret backslash-escaped characters (i.e. \t=tab etc) |
| 535 | -E disable interpretation of backslash-escaped characters |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 536 | |
| 537 | Example: |
| 538 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 539 | $ echo Erik is cool |
| 540 | Erik is cool |
| 541 | $ echo -e Erik |
| 542 | is |
| 543 | cool |
| 544 | Erik |
| 545 | is |
| 546 | cool |
| 547 | $ echo Erik |
| 548 | is |
| 549 | cool |
| 550 | Erik |
| 551 | is |
| 552 | cool |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 553 | |
| 554 | ------------------------------- |
| 555 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 556 | =item B<env> |
| 557 | |
| 558 | env [-] [B<-iu>] [name=value ...] [command] |
| 559 | |
| 560 | Prints the current environment or runs a program after setting |
| 561 | up the specified environment. |
| 562 | |
| 563 | Options: |
| 564 | |
| 565 | -, -i start with an empty environment |
| 566 | -u remove variable from the environment |
| 567 | |
| 568 | ------------------------------- |
| 569 | |
| 570 | =item B<expr> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 571 | |
| 572 | expr EXPRESSION |
Eric Andersen | 1b355eb | 2000-09-05 17:37:48 +0000 | [diff] [blame] | 573 | |
| 574 | Prints the value of EXPRESSION to standard output. |
| 575 | |
| 576 | EXPRESSION may be: |
| 577 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 578 | ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2 |
| 579 | ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0 |
| 580 | ARG1 < ARG2 ARG1 is less than ARG2 |
| 581 | ARG1 <= ARG2 ARG1 is less than or equal to ARG2 |
| 582 | ARG1 = ARG2 ARG1 is equal to ARG2 |
| 583 | ARG1 != ARG2 ARG1 is unequal to ARG2 |
| 584 | ARG1 >= ARG2 ARG1 is greater than or equal to ARG2 |
| 585 | ARG1 > ARG2 ARG1 is greater than ARG2 |
| 586 | ARG1 + ARG2 arithmetic sum of ARG1 and ARG2 |
| 587 | ARG1 - ARG2 arithmetic difference of ARG1 and ARG2 |
| 588 | ARG1 * ARG2 arithmetic product of ARG1 and ARG2 |
| 589 | ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2 |
| 590 | ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2 |
Eric Andersen | 1b355eb | 2000-09-05 17:37:48 +0000 | [diff] [blame] | 591 | STRING : REGEXP anchored pattern match of REGEXP in STRING |
| 592 | match STRING REGEXP same as STRING : REGEXP |
| 593 | substr STRING POS LENGTH substring of STRING, POS counted from 1 |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 594 | index STRING CHARS index in STRING where any CHARS is found, |
| 595 | or 0 |
Eric Andersen | 1b355eb | 2000-09-05 17:37:48 +0000 | [diff] [blame] | 596 | length STRING length of STRING |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 597 | quote TOKEN interpret TOKEN as a string, even if |
| 598 | it is a keyword like `match' or an |
| 599 | operator like `/' |
Eric Andersen | 1b355eb | 2000-09-05 17:37:48 +0000 | [diff] [blame] | 600 | ( EXPRESSION ) value of EXPRESSION |
| 601 | |
| 602 | Beware that many operators need to be escaped or quoted for shells. |
| 603 | Comparisons are arithmetic if both ARGs are numbers, else |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 604 | lexicographical. Pattern matches return the string matched between |
| 605 | \( and \) or null; if \( and \) are not used, they return the number |
Eric Andersen | 1b355eb | 2000-09-05 17:37:48 +0000 | [diff] [blame] | 606 | of characters matched or 0. |
| 607 | |
| 608 | ------------------------------- |
| 609 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 610 | =item B<false> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 611 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 612 | false |
| 613 | |
| 614 | Return an exit code of FALSE (1). |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 615 | |
| 616 | Example: |
| 617 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 618 | $ false |
| 619 | $ echo $? |
| 620 | 1 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 621 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 622 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 623 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 624 | =item B<fbset> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 625 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 626 | fbset [options] [mode] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 627 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 628 | Show and modify frame buffer settings |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 629 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 630 | Example: |
| 631 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 632 | $ fbset |
| 633 | mode 1024x768-76 |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 634 | # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz |
| 635 | geometry 1024 768 1024 768 16 |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 636 | timings 12714 128 32 16 4 128 4 |
| 637 | accel false |
| 638 | rgba 5/11,6/5,5/0,0/0 |
| 639 | endmode |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 640 | |
| 641 | ------------------------------- |
| 642 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 643 | =item B<fdflush> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 644 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 645 | fdflush DEVICE |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 646 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 647 | Forces floppy disk drive to detect disk change |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 648 | |
| 649 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 650 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 651 | =item B<find> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 652 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 653 | find [PATH...] [EXPRESSION] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 654 | |
| 655 | Search for files in a directory hierarchy. The default PATH is |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 656 | the current directory; default EXPRESSION is 'B<-print>' |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 657 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 658 | EXPRESSION may consist of: |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 659 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 660 | -follow Dereference symbolic links. |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 661 | -name PATTERN File name (leading directories removed) matches PATTERN. -print Print (default and assumed). |
| 662 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 663 | -type X Filetype matches X (where X is one of: f,d,l,b,c,...) |
| 664 | -perm PERMS Permissions match any of (+NNN); all of (-NNN); |
| 665 | or exactly (NNN) |
| 666 | -mtime TIME Modified time is greater than (+N); less than (-N); |
| 667 | or exactly (N) days |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 668 | |
| 669 | Example: |
| 670 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 671 | $ find / -name /etc/passwd |
| 672 | /etc/passwd |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 673 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 674 | ------------------------------- |
| 675 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 676 | =item B<free> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 677 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 678 | free |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 679 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 680 | Displays the amount of free and used system memory |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 681 | |
| 682 | Example: |
| 683 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 684 | $ free |
| 685 | total used free shared buffers |
| 686 | Mem: 257628 248724 8904 59644 93124 |
| 687 | Swap: 128516 8404 120112 |
| 688 | Total: 386144 257128 129016 |
| 689 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 690 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 691 | ------------------------------- |
| 692 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 693 | =item B<freeramdisk> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 694 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 695 | freeramdisk DEVICE |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 696 | |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 697 | Frees all memory used by the specified ramdisk. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 698 | |
| 699 | Example: |
| 700 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 701 | $ freeramdisk /dev/ram2 |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 702 | |
| 703 | ------------------------------- |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 704 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 705 | =item B<fsck_minix> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 706 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 707 | fsck_minix [B<-larvsmf>] /dev/name |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 708 | |
| 709 | Performs a consistency check for MINIX filesystems. |
| 710 | |
Eric Andersen | 2086e3d | 2000-07-04 22:17:01 +0000 | [diff] [blame] | 711 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 712 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 713 | -l Lists all filenames |
| 714 | -r Perform interactive repairs |
| 715 | -a Perform automatic repairs |
| 716 | -v verbose |
| 717 | -s Outputs super-block information |
| 718 | -m Activates MINIX-like mode not cleared warnings |
| 719 | -f Force file system check. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 720 | |
| 721 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 722 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 723 | =item B<getopt> |
Eric Andersen | a1f16bb | 2000-08-21 22:02:34 +0000 | [diff] [blame] | 724 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 725 | getopt [OPTIONS]... |
Eric Andersen | a1f16bb | 2000-08-21 22:02:34 +0000 | [diff] [blame] | 726 | |
| 727 | Parse command options |
| 728 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 729 | -a, --alternative Allow long options starting with single - |
| 730 | -l, --longoptions=longopts Long options to be recognized |
| 731 | -n, --name=progname The name under which errors are reported |
| 732 | -o, --options=optstring Short options to be recognized |
| 733 | -q, --quiet Disable error reporting by getopt(3) |
| 734 | -Q, --quiet-output No normal output |
| 735 | -s, --shell=shell Set shell quoting conventions |
| 736 | -T, --test Test for getopt(1) version |
| 737 | -u, --unqote Do not quote the output |
Eric Andersen | a1f16bb | 2000-08-21 22:02:34 +0000 | [diff] [blame] | 738 | |
| 739 | Example: |
Eric Andersen | e4c4d69 | 2000-08-21 23:29:45 +0000 | [diff] [blame] | 740 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 741 | $ cat getopt.test |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 742 | #!/bin/sh |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 743 | GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \ |
| 744 | -n 'example.busybox' -- $@` |
| 745 | if [ $? != 0 ] ; then exit 1 ; fi |
| 746 | eval set -- $GETOPT |
| 747 | while true ; do |
| 748 | case $1 in |
| 749 | -a|--a-long) echo Option a ; shift ;; |
| 750 | -b|--b-long) echo Option b, argument `$2' ; shift 2 ;; |
| 751 | -c|--c-long) |
| 752 | case $2 in |
| 753 | \) echo Option c, no argument; shift 2 ;; |
| 754 | *) echo Option c, argument `$2' ; shift 2 ;; |
| 755 | esac ;; |
| 756 | --) shift ; break ;; |
| 757 | *) echo Internal error! ; exit 1 ;; |
| 758 | esac |
| 759 | done |
Eric Andersen | a1f16bb | 2000-08-21 22:02:34 +0000 | [diff] [blame] | 760 | |
| 761 | ------------------------------- |
| 762 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 763 | =item B<grep> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 764 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 765 | grep [B<-ihHnqvs>] pattern [files...] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 766 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 767 | Search for PATTERN in each FILE or standard input. |
| 768 | |
Eric Andersen | 2086e3d | 2000-07-04 22:17:01 +0000 | [diff] [blame] | 769 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 770 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 771 | -H prefix output lines with filename where match was found |
| 772 | -h suppress the prefixing filename on output |
| 773 | -i ignore case distinctions |
| 774 | -n print line number with output lines |
| 775 | -q be quiet. Returns 0 if result was found, 1 otherwise |
| 776 | -v select non-matching lines |
| 777 | -s suppress file open/read error messages |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 778 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 779 | Example: |
| 780 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 781 | $ grep root /etc/passwd |
| 782 | root:x:0:0:root:/root:/bin/bash |
| 783 | $ grep ^[rR]oo. /etc/passwd |
| 784 | root:x:0:0:root:/root:/bin/bash |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 785 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 786 | ------------------------------- |
| 787 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 788 | =item B<gunzip> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 789 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 790 | gunzip [OPTION]... FILE |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 791 | |
| 792 | Uncompress FILE (or standard input if FILE is '-'). |
| 793 | |
| 794 | Options: |
| 795 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 796 | -c Write output to standard output |
| 797 | -t Test compressed file integrity |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 798 | |
| 799 | Example: |
| 800 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 801 | $ ls -la /tmp/BusyBox* |
| 802 | -rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz |
| 803 | $ gunzip /tmp/BusyBox-0.43.tar.gz |
| 804 | $ ls -la /tmp/BusyBox* |
| 805 | -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] | 806 | |
| 807 | ------------------------------- |
| 808 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 809 | =item B<gzip> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 810 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 811 | gzip [OPTION]... FILE |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 812 | |
| 813 | Compress FILE with maximum compression. |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 814 | When FILE is '-', reads standard input. Implies B<-c>. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 815 | |
| 816 | Options: |
| 817 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 818 | -c Write output to standard output instead of FILE.gz |
| 819 | -d decompress |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 820 | |
| 821 | Example: |
| 822 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 823 | $ ls -la /tmp/BusyBox* |
| 824 | -rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar |
| 825 | $ gzip /tmp/BusyBox-0.43.tar |
| 826 | $ ls -la /tmp/BusyBox* |
| 827 | -rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 828 | |
| 829 | ------------------------------- |
| 830 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 831 | =item B<halt> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 832 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 833 | halt |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 834 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 835 | Halt the system. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 836 | |
| 837 | ------------------------------- |
| 838 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 839 | =item B<head> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 840 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 841 | head [OPTION] [FILE]... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 842 | |
| 843 | Print first 10 lines of each FILE to standard output. |
| 844 | With more than one FILE, precede each with a header giving the |
| 845 | file name. With no FILE, or when FILE is -, read standard input. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 846 | |
| 847 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 848 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 849 | -n NUM Print first NUM lines instead of first 10 |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 850 | |
| 851 | Example: |
| 852 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 853 | $ head -n 2 /etc/passwd |
| 854 | root:x:0:0:root:/root:/bin/bash |
| 855 | daemon:x:1:1:daemon:/usr/sbin:/bin/sh |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 856 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 857 | ------------------------------- |
| 858 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 859 | =item B<hostid> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 860 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 861 | hostid |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 862 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 863 | Print out a unique 32-bit identifier for the machine. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 864 | |
| 865 | ------------------------------- |
| 866 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 867 | =item B<hostname> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 868 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 869 | hostname [OPTION] {hostname | B<-F> file} |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 870 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 871 | 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] | 872 | (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] | 873 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 874 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 875 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 876 | -s Short |
| 877 | -i Addresses for the hostname |
| 878 | -d DNS domain name |
| 879 | -F, --file FILE Use the contents of FILE to specify the hostname |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 880 | |
| 881 | Example: |
| 882 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 883 | $ hostname |
| 884 | slag |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 885 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 886 | ------------------------------- |
| 887 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 888 | =item B<id> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 889 | |
| 890 | id [OPTIONS]... [USERNAME] |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 891 | |
| 892 | Print information for USERNAME or the current user |
| 893 | |
| 894 | Options: |
| 895 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 896 | -g prints only the group ID |
| 897 | -u prints only the user ID |
| 898 | -n print a name instead of a number (with for -ug) |
| 899 | -r prints the real user ID instead of the effective ID (with -ug) |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 900 | |
| 901 | Example: |
| 902 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 903 | $ id |
| 904 | uid=1000(andersen) gid=1000(andersen) |
Erik Andersen | 73c8c9c | 2000-05-13 05:36:13 +0000 | [diff] [blame] | 905 | |
| 906 | ------------------------------- |
| 907 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 908 | =item B<ifconfig> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 909 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 910 | ifconfig [B<-a>] <interface> [<address>] |
| 911 | |
| 912 | configure a network interface |
| 913 | |
| 914 | Options: |
| 915 | |
| 916 | [[-]broadcast [<address>]] [[-]pointopoint [<address>]] |
| 917 | [netmask <address>] [dstaddr <address>] |
| 918 | [outfill <NN>] [keepalive <NN>] |
| 919 | [hw ether <address>] [metric <NN>] [mtu <NN>] |
| 920 | [[-]trailers] [[-]arp] [[-]allmulti] |
| 921 | [multicast] [[-]promisc] [txqueuelen <NN>] [[-]dynamic] |
| 922 | [mem_start <NN>] [io_addr <NN>] [irq <NN>] |
| 923 | [up|down] ... |
| 924 | |
| 925 | ------------------------------- |
| 926 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 927 | =item B<init> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 928 | |
| 929 | init |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 930 | |
| 931 | Init is the parent of all processes. |
| 932 | |
| 933 | This version of init is designed to be run only by the kernel. |
| 934 | |
| 935 | BusyBox init doesn't support multiple runlevels. The runlevels field of |
| 936 | the /etc/inittab file is completely ignored by BusyBox init. If you want |
| 937 | runlevels, use sysvinit. |
| 938 | |
| 939 | BusyBox init works just fine without an inittab. If no inittab is found, |
| 940 | it has the following default behavior: |
| 941 | |
| 942 | ::sysinit:/etc/init.d/rcS |
| 943 | ::askfirst:/bin/sh |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 944 | ::ctrlaltdel:/sbin/reboot |
| 945 | ::shutdown:/sbin/swapoff -a |
| 946 | ::shutdown:/bin/umount -a -r |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 947 | |
| 948 | if it detects that /dev/console is _not_ a serial console, it will also run: |
| 949 | |
| 950 | tty2::askfirst:/bin/sh |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 951 | tty3::askfirst:/bin/sh |
| 952 | tty4::askfirst:/bin/sh |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 953 | |
| 954 | If you choose to use an /etc/inittab file, the inittab entry format is as follows: |
| 955 | |
| 956 | <id>:<runlevels>:<action>:<process> |
| 957 | |
| 958 | <id>: |
| 959 | |
| 960 | WARNING: This field has a non-traditional meaning for BusyBox init! |
| 961 | The id field is used by BusyBox init to specify the controlling tty for |
| 962 | the specified process to run on. The contents of this field are |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 963 | appended to /dev/ and used as-is. There is no need for this field to |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 964 | be unique, although if it isn't you may have strange results. If this |
Eric Andersen | 0d2acb0 | 2000-12-18 20:36:02 +0000 | [diff] [blame] | 965 | field is left blank, the controlling tty is set to the console. Also |
| 966 | note that if BusyBox detects that a serial console is in use, then only |
| 967 | entries whose controlling tty is either the serial console or /dev/null |
| 968 | will be run. BusyBox init does nothing with utmp. We don't need no |
| 969 | stinkin' utmp. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 970 | |
| 971 | <runlevels>: |
| 972 | |
| 973 | The runlevels field is completely ignored. |
| 974 | |
| 975 | <action>: |
| 976 | |
| 977 | Valid actions include: sysinit, respawn, askfirst, wait, |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 978 | once, ctrlaltdel, and shutdown. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 979 | |
Eric Andersen | eb4218d | 2000-12-08 20:38:00 +0000 | [diff] [blame] | 980 | The available actions can be classified into two groups: actions |
| 981 | that are run only once, and actions that are re-run when the specified |
| 982 | process exits. |
| 983 | |
| 984 | Run only-once actions: |
| 985 | |
| 986 | 'sysinit' is the first item run on boot. init waits until all |
| 987 | sysinit actions are completed before continuing. Following the |
| 988 | completion of all sysinit actions, all 'wait' actions are run. |
| 989 | 'wait' actions, like 'sysinit' actions, cause init to wait until |
| 990 | the specified task completes. 'once' actions are asyncronous, |
| 991 | therefore, init does not wait for them to complete. 'ctrlaltdel' |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 992 | actions are run when the system detects that someone on the system |
| 993 | console has pressed the CTRL-ALT-DEL key combination. Typically one |
| 994 | wants to run 'reboot' at this point to cause the system to reboot. |
| 995 | Finally the 'shutdown' action specifies the actions to taken when |
| 996 | init is told to reboot. Unmounting filesystems and disabling swap |
| 997 | is a very good here |
Eric Andersen | eb4218d | 2000-12-08 20:38:00 +0000 | [diff] [blame] | 998 | |
| 999 | Run repeatedly actions: |
| 1000 | |
| 1001 | 'respawn' actions are run after the 'once' actions. When a process |
| 1002 | started with a 'respawn' action exits, init automatically restarts |
| 1003 | it. Unlike sysvinit, BusyBox init does not stop processes from |
| 1004 | respawning out of control. The 'askfirst' actions acts just like |
| 1005 | respawn, except that before running the specified process it |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1006 | displays the line Please press Enter to activate this console. |
Eric Andersen | eb4218d | 2000-12-08 20:38:00 +0000 | [diff] [blame] | 1007 | and then waits for the user to press enter before starting the |
| 1008 | specified process. |
| 1009 | |
| 1010 | Unrecognized actions (like initdefault) will cause init to emit an |
| 1011 | error message, and then go along with its business. All actions are |
| 1012 | run in the reverse order from how they appear in /etc/inittab. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1013 | |
| 1014 | <process>: |
| 1015 | |
| 1016 | Specifies the process to be executed and it's command line. |
| 1017 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1018 | Example /etc/inittab file: |
Mark Whitley | f71378c | 2001-03-15 21:20:25 +0000 | [diff] [blame] | 1019 | |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 1020 | # This is run first except when booting in single-user mode. |
| 1021 | # |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1022 | ::sysinit:/etc/init.d/rcS |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1023 | |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 1024 | # /bin/sh invocations on selected ttys |
| 1025 | # |
| 1026 | # Start an askfirst shell on the console (whatever that may be) |
| 1027 | ::askfirst:-/bin/sh |
| 1028 | # Start an askfirst shell on /dev/tty2-4 |
| 1029 | tty2::askfirst:-/bin/sh |
Pavel Roskin | c9db2e8 | 2000-09-15 17:24:13 +0000 | [diff] [blame] | 1030 | tty3::askfirst:-/bin/sh |
| 1031 | tty4::askfirst:-/bin/sh |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1032 | |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 1033 | # /sbin/getty invocations for selected ttys |
| 1034 | # |
Pavel Roskin | c9db2e8 | 2000-09-15 17:24:13 +0000 | [diff] [blame] | 1035 | tty4::respawn:/sbin/getty 38400 tty5 |
| 1036 | tty5::respawn:/sbin/getty 38400 tty6 |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1037 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1038 | |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 1039 | # Example of how to put a getty on a serial line (for a terminal) |
| 1040 | # |
| 1041 | #::respawn:/sbin/getty -L ttyS0 9600 vt100 |
| 1042 | #::respawn:/sbin/getty -L ttyS1 9600 vt100 |
| 1043 | # |
| 1044 | # Example how to put a getty on a modem line. |
| 1045 | #::respawn:/sbin/getty 57600 ttyS2 |
| 1046 | |
| 1047 | # Stuff to do before rebooting |
| 1048 | ::ctrlaltdel:/sbin/reboot |
| 1049 | ::shutdown:/bin/umount -a -r |
| 1050 | ::shutdown:/sbin/swapoff -a |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1051 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1052 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1053 | ------------------------------- |
| 1054 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1055 | =item B<insmod> |
Eric Andersen | feb47c0 | 2000-06-21 21:03:13 +0000 | [diff] [blame] | 1056 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1057 | insmod [OPTION]... MODULE [symbol=value]... |
Eric Andersen | feb47c0 | 2000-06-21 21:03:13 +0000 | [diff] [blame] | 1058 | |
| 1059 | Loads the specified kernel modules into the kernel. |
| 1060 | |
| 1061 | Options: |
| 1062 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1063 | -f Force module to load into the wrong kernel version. |
| 1064 | -k Make module autoclean-able. |
| 1065 | -v verbose output |
| 1066 | -L Lock to prevent simultaneous loads of a module |
| 1067 | -x do not export externs |
Eric Andersen | feb47c0 | 2000-06-21 21:03:13 +0000 | [diff] [blame] | 1068 | |
| 1069 | ------------------------------- |
| 1070 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1071 | =item B<kill> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1072 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1073 | kill [B<-signal>] process-id [process-id ...] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1074 | |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 1075 | Send a signal (default is SIGTERM) to the specified process(es). |
| 1076 | |
| 1077 | Options: |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 1078 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1079 | -l List all signal names and numbers. |
Erik Andersen | 62dc17a | 2000-04-13 01:18:23 +0000 | [diff] [blame] | 1080 | |
| 1081 | Example: |
| 1082 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1083 | $ ps | grep apache |
| 1084 | 252 root root S [apache] |
| 1085 | 263 www-data www-data S [apache] |
| 1086 | 264 www-data www-data S [apache] |
| 1087 | 265 www-data www-data S [apache] |
| 1088 | 266 www-data www-data S [apache] |
| 1089 | 267 www-data www-data S [apache] |
| 1090 | $ kill 252 |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1091 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1092 | ------------------------------- |
| 1093 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1094 | =item B<killall> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1095 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1096 | killall [B<-signal>] process-name [process-name ...] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1097 | |
| 1098 | Send a signal (default is SIGTERM) to the specified process(es). |
| 1099 | |
| 1100 | Options: |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1101 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1102 | -l List all signal names and numbers. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1103 | |
| 1104 | Example: |
| 1105 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1106 | $ killall apache |
| 1107 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1108 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1109 | ------------------------------- |
| 1110 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1111 | =item B<klogd> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1112 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1113 | klogd B<-n> |
| 1114 | |
| 1115 | Kernel logger. |
| 1116 | Options: |
| 1117 | |
| 1118 | -n Run as a foreground process. |
| 1119 | |
| 1120 | ------------------------------- |
| 1121 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1122 | =item B<length> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1123 | |
| 1124 | length STRING |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1125 | |
Erik Andersen | 7ab9c7e | 2000-05-12 19:41:47 +0000 | [diff] [blame] | 1126 | Prints out the length of the specified STRING. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1127 | |
| 1128 | Example: |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 1129 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1130 | $ length Hello |
| 1131 | 5 |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1132 | |
| 1133 | ------------------------------- |
| 1134 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1135 | =item B<ln> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1136 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1137 | ln [OPTION] TARGET... LINK_NAME|DIRECTORY |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 1138 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1139 | Create a link named LINK_NAME or DIRECTORY to the specified TARGET |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1140 | |
Eric Andersen | addc9c2 | 2000-06-21 22:53:24 +0000 | [diff] [blame] | 1141 | You may use '--' to indicate that all following arguments are non-options. |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 1142 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1143 | Options: |
| 1144 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1145 | -s make symbolic links instead of hard links |
| 1146 | -f remove existing destination files |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1147 | -n no dereference symlinks - treat like normal file |
Pavel Roskin | 1a804e4 | 2000-06-21 21:38:00 +0000 | [diff] [blame] | 1148 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1149 | Example: |
| 1150 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1151 | $ ln -s BusyBox /tmp/ls |
| 1152 | $ ls -l /tmp/ls |
| 1153 | lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox* |
| 1154 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1155 | |
| 1156 | ------------------------------- |
| 1157 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1158 | =item B<loadacm> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1159 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1160 | loadacm < mapfile |
Erik Andersen | 3fe7f9f | 2000-04-19 03:59:10 +0000 | [diff] [blame] | 1161 | |
| 1162 | Loads an acm from standard input. |
| 1163 | |
| 1164 | Example: |
| 1165 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1166 | $ loadacm < /etc/i18n/acmname |
| 1167 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1168 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1169 | ------------------------------- |
| 1170 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1171 | =item B<loadfont> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1172 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1173 | loadfont < font |
Erik Andersen | a6c7522 | 2000-04-18 00:00:52 +0000 | [diff] [blame] | 1174 | |
| 1175 | Loads a console font from standard input. |
| 1176 | |
Erik Andersen | 3fe7f9f | 2000-04-19 03:59:10 +0000 | [diff] [blame] | 1177 | Example: |
| 1178 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1179 | $ loadfont < /etc/i18n/fontname |
| 1180 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1181 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1182 | ------------------------------- |
| 1183 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1184 | =item B<loadkmap> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1185 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1186 | loadkmap < keymap |
Erik Andersen | 3fe7f9f | 2000-04-19 03:59:10 +0000 | [diff] [blame] | 1187 | |
| 1188 | Loads a binary keyboard translation table from standard input. |
| 1189 | |
| 1190 | Example: |
| 1191 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1192 | $ loadkmap < /etc/i18n/lang-keymap |
| 1193 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1194 | |
| 1195 | ------------------------------- |
| 1196 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1197 | =item B<logger> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1198 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1199 | logger [OPTION]... [MESSAGE] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1200 | |
Matt Kraai | 004827d | 2001-01-02 22:54:12 +0000 | [diff] [blame] | 1201 | Write MESSAGE to the system log. If MESSAGE is omitted, log stdin. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1202 | |
| 1203 | Options: |
| 1204 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1205 | -s Log to stderr as well as the system log. |
| 1206 | -t Log using the specified tag (defaults to user name). |
| 1207 | -p Enter the message with the specified priority. |
| 1208 | This may be numerical or a ``facility.level'' pair. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1209 | |
| 1210 | Example: |
| 1211 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1212 | $ logger hello |
| 1213 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1214 | |
| 1215 | ------------------------------- |
| 1216 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1217 | =item B<logname> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1218 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1219 | logname |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1220 | |
| 1221 | Print the name of the current user. |
| 1222 | |
| 1223 | Example: |
| 1224 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1225 | $ logname |
| 1226 | root |
| 1227 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1228 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1229 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1230 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1231 | =item B<logread> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1232 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1233 | logread |
| 1234 | |
| 1235 | Shows the messages from syslogd (using circular buffer). |
| 1236 | |
| 1237 | ------------------------------- |
| 1238 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1239 | =item B<ls> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1240 | |
| 1241 | ls [B<-1AacCdeFilnpLRrSsTtuvwxXhk>] [filenames...] |
| 1242 | |
| 1243 | List directory contents |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1244 | |
| 1245 | Options: |
| 1246 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1247 | -1 list files in a single column |
| 1248 | -A do not list implied . and .. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1249 | -a do not hide entries starting with . |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1250 | -C list entries by columns |
| 1251 | -c with -l: show ctime |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1252 | -d list directory entries instead of contents |
| 1253 | -e list both full date and full time |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1254 | -F append indicator (one of */=@|) to entries |
| 1255 | -i list the i-node for each file |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1256 | -l use a long listing format |
| 1257 | -n list numeric UIDs and GIDs instead of names |
| 1258 | -p append indicator (one of /=@|) to entries |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1259 | -L list entries pointed to by symbolic links |
| 1260 | -R list subdirectories recursively |
| 1261 | -r sort the listing in reverse order |
| 1262 | -S sort the listing by file size |
| 1263 | -s list the size of each file, in blocks |
| 1264 | -T NUM assume Tabstop every NUM columns |
| 1265 | -t with -l: show modification time |
| 1266 | -u with -l: show access time |
| 1267 | -v sort the listing by version |
| 1268 | -w NUM assume the terminal is NUM columns wide |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1269 | -x list entries by lines instead of by columns |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1270 | -X sort the listing by extension |
| 1271 | -h print sizes in human readable format (e.g., 1K 243M 2G ) |
| 1272 | -k print sizes in kilobytes(default) |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1273 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1274 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1275 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1276 | =item B<lsmod> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1277 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1278 | lsmod |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1279 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1280 | List the currently loaded kernel modules. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1281 | |
| 1282 | ------------------------------- |
| 1283 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1284 | =item B<makedevs> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1285 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1286 | makedevs NAME TYPE MAJOR MINOR FIRST LAST [s] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1287 | |
| 1288 | Creates a range of block or character special files |
| 1289 | |
| 1290 | TYPEs include: |
| 1291 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1292 | b: Make a block (buffered) device. |
| 1293 | c or u: Make a character (un-buffered) device. |
| 1294 | p: Make a named pipe. MAJOR and MINOR are ignored for named pipes. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1295 | |
| 1296 | FIRST specifies the number appended to NAME to create the first device. |
| 1297 | LAST specifies the number of the last item that should be created. |
| 1298 | If 's' is the last argument, the base device is created as well. |
| 1299 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1300 | For example: |
| 1301 | |
| 1302 | makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63 |
| 1303 | makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8 |
| 1304 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1305 | Example: |
| 1306 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1307 | $ makedevs /dev/ttyS c 4 66 2 63 |
| 1308 | [creates ttyS2-ttyS63] |
| 1309 | $ makedevs /dev/hda b 3 0 0 8 s |
| 1310 | [creates hda,hda1-hda8] |
| 1311 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1312 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1313 | ------------------------------- |
| 1314 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1315 | =item B<md5sum> |
Eric Andersen | 2b6ab3c | 2000-06-13 06:54:53 +0000 | [diff] [blame] | 1316 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1317 | md5sum [OPTION] [FILE]... |
| 1318 | or: md5sum [OPTION] B<-c> [FILE] |
Eric Andersen | 2b6ab3c | 2000-06-13 06:54:53 +0000 | [diff] [blame] | 1319 | |
| 1320 | Print or check MD5 checksums. |
| 1321 | |
| 1322 | Options: |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1323 | With no FILE, or when FILE is -, read standard input. |
Eric Andersen | 2b6ab3c | 2000-06-13 06:54:53 +0000 | [diff] [blame] | 1324 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1325 | -b read files in binary mode |
| 1326 | -c check MD5 sums against given list |
| 1327 | -t read files in text mode (default) |
| 1328 | -g read a string |
Eric Andersen | 2b6ab3c | 2000-06-13 06:54:53 +0000 | [diff] [blame] | 1329 | |
| 1330 | The following two options are useful only when verifying checksums: |
| 1331 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1332 | -s don't output anything, status code shows success |
| 1333 | -w warn about improperly formated MD5 checksum lines |
Eric Andersen | 2b6ab3c | 2000-06-13 06:54:53 +0000 | [diff] [blame] | 1334 | |
| 1335 | Example: |
| 1336 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1337 | $ md5sum < busybox |
| 1338 | 6fd11e98b98a58f64ff3398d7b324003 |
| 1339 | $ md5sum busybox |
| 1340 | 6fd11e98b98a58f64ff3398d7b324003 busybox |
| 1341 | $ md5sum -c - |
| 1342 | 6fd11e98b98a58f64ff3398d7b324003 busybox |
| 1343 | busybox: OK |
| 1344 | ^D |
Eric Andersen | 2b6ab3c | 2000-06-13 06:54:53 +0000 | [diff] [blame] | 1345 | |
| 1346 | ------------------------------- |
| 1347 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1348 | =item B<mkdir> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1349 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1350 | mkdir [OPTION] DIRECTORY... |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1351 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1352 | Create the DIRECTORY(ies), if they do not already exist |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1353 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1354 | Options: |
| 1355 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1356 | -m set permission mode (as in chmod), not rwxrwxrwx - umask |
| 1357 | -p no error if existing, make parent directories as needed |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1358 | |
| 1359 | Example: |
| 1360 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1361 | $ mkdir /tmp/foo |
| 1362 | $ mkdir /tmp/foo |
| 1363 | /tmp/foo: File exists |
| 1364 | $ mkdir /tmp/foo/bar/baz |
| 1365 | /tmp/foo/bar/baz: No such file or directory |
| 1366 | $ mkdir -p /tmp/foo/bar/baz |
| 1367 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1368 | |
| 1369 | ------------------------------- |
| 1370 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1371 | =item B<mkfifo> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1372 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1373 | mkfifo [OPTIONS] name |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1374 | |
| 1375 | Creates a named pipe (identical to 'mknod name p') |
| 1376 | |
| 1377 | Options: |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1378 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1379 | -m create the pipe using the specified mode (default a=rw) |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1380 | |
| 1381 | ------------------------------- |
| 1382 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1383 | =item B<mkfs_minix> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1384 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1385 | mkfs_minix [B<-c> | B<-l> filename] [B<-nXX>] [B<-iXX>] /dev/name [blocks] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1386 | |
| 1387 | Make a MINIX filesystem. |
| 1388 | |
Eric Andersen | 2086e3d | 2000-07-04 22:17:01 +0000 | [diff] [blame] | 1389 | Options: |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1390 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1391 | -c Check the device for bad blocks |
| 1392 | -n [14|30] Specify the maximum length of filenames |
| 1393 | -i INODES Specify the number of inodes for the filesystem |
| 1394 | -l FILENAME Read the bad blocks list from FILENAME |
| 1395 | -v Make a Minix version 2 filesystem |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1396 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1397 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1398 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1399 | =item B<mknod> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1400 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1401 | mknod [OPTIONS] NAME TYPE MAJOR MINOR |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1402 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1403 | Create a special file (block, character, or pipe). |
| 1404 | |
| 1405 | Options: |
John Beppu | 9057b6a | 2000-04-16 10:22:28 +0000 | [diff] [blame] | 1406 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1407 | -m create the special file using the specified mode (default a=rw) |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1408 | |
| 1409 | TYPEs include: |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1410 | |
| 1411 | b: Make a block (buffered) device. |
| 1412 | c or u: Make a character (un-buffered) device. |
| 1413 | 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] | 1414 | |
| 1415 | Example: |
| 1416 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1417 | $ mknod /dev/fd0 b 2 0 |
| 1418 | $ mknod -m 644 /tmp/pipe p |
| 1419 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1420 | |
| 1421 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1422 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1423 | =item B<mkswap> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1424 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1425 | mkswap [B<-c>] [B<-v0>|B<-v1>] device [block-count] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1426 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1427 | Prepare a disk partition to be used as a swap partition. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1428 | |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1429 | Options: |
| 1430 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1431 | -c Check for read-ability. |
| 1432 | -v0 Make version 0 swap [max 128 Megs]. |
| 1433 | -v1 Make version 1 swap [big!] (default for kernels > |
| 1434 | 2.1.117). |
| 1435 | block-count Number of block to use (default is entire partition). |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1436 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1437 | ------------------------------- |
| 1438 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1439 | =item B<mktemp> |
Erik Andersen | 227a59b | 2000-04-25 23:24:55 +0000 | [diff] [blame] | 1440 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1441 | mktemp [B<-q>] TEMPLATE |
Erik Andersen | 227a59b | 2000-04-25 23:24:55 +0000 | [diff] [blame] | 1442 | |
| 1443 | Creates a temporary file with its name based on TEMPLATE. |
| 1444 | TEMPLATE is any name with six `Xs' (i.e. /tmp/temp.XXXXXX). |
| 1445 | |
| 1446 | Example: |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 1447 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1448 | $ mktemp /tmp/temp.XXXXXX |
| 1449 | /tmp/temp.mWiLjM |
| 1450 | $ ls -la /tmp/temp.mWiLjM |
| 1451 | -rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM |
| 1452 | |
Erik Andersen | 227a59b | 2000-04-25 23:24:55 +0000 | [diff] [blame] | 1453 | |
| 1454 | ------------------------------- |
| 1455 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1456 | =item B<more> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1457 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1458 | more [FILE ...] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1459 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1460 | More is a filter for viewing FILE one screenful at a time. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1461 | |
| 1462 | Example: |
| 1463 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1464 | $ dmesg | more |
| 1465 | |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1466 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1467 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1468 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1469 | =item B<mount> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1470 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1471 | mount [flags] device directory [B<-o> options,more-options] |
| 1472 | |
| 1473 | Mount a filesystem |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1474 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1475 | Flags: |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1476 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1477 | -a: Mount all filesystems in fstab. |
| 1478 | -f: Fake Add entry to mount table but don't mount it. |
| 1479 | -n: Don't write a mount table entry. |
| 1480 | -o option: One of many filesystem options, listed below. |
| 1481 | -r: Mount the filesystem read-only. |
| 1482 | -t fs-type: Specify the filesystem type. |
| 1483 | -w: Mount for reading and writing (default). |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1484 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1485 | Options for use with the B<-o> flag: |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1486 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1487 | async/sync: Writes are asynchronous / synchronous. |
| 1488 | atime/noatime: Enable / disable updates to inode access times. |
| 1489 | dev/nodev: Allow use of special device files / disallow them. |
| 1490 | exec/noexec: Allow use of executable files / disallow them. |
| 1491 | loop: Mounts a file via loop device. |
| 1492 | suid/nosuid: Allow set-user-id-root programs / disallow them. |
| 1493 | remount: Re-mount a mounted filesystem, changing its flags. |
| 1494 | ro/rw: Mount for read-only / read-write. |
| 1495 | |
| 1496 | There are EVEN MORE flags that are specific to each filesystem. |
| 1497 | You'll have to see the written documentation for those. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1498 | |
| 1499 | Example: |
| 1500 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1501 | $ mount |
| 1502 | /dev/hda3 on / type minix (rw) |
| 1503 | proc on /proc type proc (rw) |
| 1504 | devpts on /dev/pts type devpts (rw) |
| 1505 | $ mount /dev/fd0 /mnt -t msdos -o ro |
| 1506 | $ mount /tmp/diskimage /opt -t ext2 -o loop |
| 1507 | |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1508 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1509 | ------------------------------- |
| 1510 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1511 | =item B<mt> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1512 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1513 | mt [B<-f> device] opcode value |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1514 | |
| 1515 | Control magnetic tape drive operation |
| 1516 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1517 | Available Opcodes: |
| 1518 | |
| 1519 | bsf bsfm bsr bss datacompression drvbuffer eof eom erase |
| 1520 | fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2 |
| 1521 | ras3 reset retension rew rewoffline seek setblk setdensity |
| 1522 | setpart tell unload unlock weof wset |
| 1523 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1524 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1525 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1526 | =item B<mv> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1527 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1528 | mv SOURCE DEST |
| 1529 | or: mv SOURCE... DIRECTORY |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1530 | |
| 1531 | Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1532 | |
| 1533 | Example: |
| 1534 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1535 | $ mv /tmp/foo /bin/bar |
| 1536 | |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 1537 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1538 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1539 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1540 | =item B<nc> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1541 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1542 | nc [IP] [port] |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1543 | |
| 1544 | Netcat opens a pipe to IP:port |
| 1545 | |
| 1546 | Example: |
| 1547 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1548 | $ nc foobar.somedomain.com 25 |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 1549 | 220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600 |
| 1550 | help |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1551 | 214-Commands supported: |
| 1552 | 214- HELO EHLO MAIL RCPT DATA AUTH |
| 1553 | 214 NOOP QUIT RSET HELP |
| 1554 | quit |
| 1555 | 221 foobar closing connection |
| 1556 | |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1557 | |
| 1558 | ------------------------------- |
| 1559 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1560 | =item B<nslookup> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1561 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1562 | nslookup [HOST] |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1563 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1564 | Queries the nameserver for the IP address of the given HOST |
| 1565 | |
| 1566 | Example: |
| 1567 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1568 | $ nslookup localhost |
| 1569 | Server: default |
| 1570 | Address: default |
| 1571 | |
| 1572 | Name: debian |
| 1573 | Address: 127.0.0.1 |
| 1574 | |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1575 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1576 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1577 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1578 | =item B<ping> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1579 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1580 | ping [OPTION]... host |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1581 | |
| 1582 | Send ICMP ECHO_REQUEST packets to network hosts. |
| 1583 | |
| 1584 | Options: |
| 1585 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1586 | -c COUNT Send only COUNT pings. |
Pavel Roskin | 0024abc | 2000-06-07 20:38:15 +0000 | [diff] [blame] | 1587 | -s SIZE Send SIZE data bytes in packets (default=56). |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1588 | -q Quiet mode, only displays output at start |
| 1589 | and when finished. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1590 | |
| 1591 | Example: |
| 1592 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1593 | $ ping localhost |
| 1594 | PING slag (127.0.0.1): 56 data bytes |
| 1595 | 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms |
| 1596 | |
| 1597 | --- debian ping statistics --- |
| 1598 | 1 packets transmitted, 1 packets received, 0% packet loss |
| 1599 | round-trip min/avg/max = 20.1/20.1/20.1 ms |
| 1600 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1601 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1602 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1603 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1604 | =item B<pivot_root> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1605 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1606 | pivot_root new_root put_old |
| 1607 | |
| 1608 | Move the current root file system to put_old and make new_root |
| 1609 | the new root file system. |
| 1610 | |
| 1611 | ------------------------------- |
| 1612 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1613 | =item B<poweroff> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1614 | |
| 1615 | poweroff |
| 1616 | |
| 1617 | Halt the system and request that the kernel shut off the power. |
| 1618 | |
| 1619 | ------------------------------- |
| 1620 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1621 | =item B<printf> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1622 | |
| 1623 | printf FORMAT [ARGUMENT...] |
| 1624 | |
| 1625 | Formats and prints ARGUMENT(s) according to FORMAT, |
| 1626 | Where FORMAT controls the output exactly as in C printf. |
| 1627 | |
| 1628 | Example: |
| 1629 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1630 | $ printf Val=%d |
| 1631 | 5 |
| 1632 | Val=5 |
| 1633 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1634 | |
| 1635 | ------------------------------- |
| 1636 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1637 | =item B<ps> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1638 | |
| 1639 | ps |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1640 | |
| 1641 | Report process status |
| 1642 | |
| 1643 | This version of ps accepts no options. |
| 1644 | |
| 1645 | Example: |
| 1646 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1647 | $ ps |
| 1648 | PID Uid Gid State Command |
| 1649 | 1 root root S init |
| 1650 | 2 root root S [kflushd] |
| 1651 | 3 root root S [kupdate] |
| 1652 | 4 root root S [kpiod] |
| 1653 | 5 root root S [kswapd] |
| 1654 | 742 andersen andersen S [bash] |
| 1655 | 743 andersen andersen S -bash |
| 1656 | 745 root root S [getty] |
| 1657 | 2990 andersen andersen R ps |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1658 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1659 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1660 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1661 | =item B<pwd> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1662 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1663 | pwd |
| 1664 | |
| 1665 | Print the full filename of the current working directory. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1666 | |
| 1667 | Example: |
| 1668 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1669 | $ pwd |
| 1670 | /root |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1671 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1672 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1673 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1674 | =item B<rdate> |
Eric Andersen | 918507e | 2000-08-21 22:46:33 +0000 | [diff] [blame] | 1675 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1676 | rdate [OPTION] HOST |
Eric Andersen | 918507e | 2000-08-21 22:46:33 +0000 | [diff] [blame] | 1677 | |
| 1678 | Get and possibly set the system date and time from a remote HOST. |
| 1679 | |
| 1680 | Options: |
| 1681 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1682 | -s Set the system date and time (default). |
| 1683 | -p Print the date and time. |
Eric Andersen | 918507e | 2000-08-21 22:46:33 +0000 | [diff] [blame] | 1684 | |
| 1685 | ------------------------------- |
| 1686 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1687 | =item B<readlink> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1688 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1689 | readlink |
| 1690 | |
| 1691 | Read a symbolic link. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1692 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1693 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1694 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1695 | =item B<reboot> |
Eric Andersen | bf960f5 | 2000-07-21 21:32:12 +0000 | [diff] [blame] | 1696 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1697 | reboot |
| 1698 | |
| 1699 | Reboot the system. |
| 1700 | |
| 1701 | ------------------------------- |
| 1702 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1703 | =item B<renice> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1704 | |
| 1705 | renice priority pid [pid ...] |
Eric Andersen | bf960f5 | 2000-07-21 21:32:12 +0000 | [diff] [blame] | 1706 | |
| 1707 | Changes priority of running processes. Allowed priorities range |
| 1708 | from 20 (the process runs only when nothing else is running) to 0 |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1709 | (default priority) to B<-20> (almost nothing else ever gets to run). |
Eric Andersen | bf960f5 | 2000-07-21 21:32:12 +0000 | [diff] [blame] | 1710 | |
| 1711 | ------------------------------- |
| 1712 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1713 | =item B<reset> |
Eric Andersen | fa405d0 | 2000-08-21 21:18:52 +0000 | [diff] [blame] | 1714 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1715 | reset |
Eric Andersen | fa405d0 | 2000-08-21 21:18:52 +0000 | [diff] [blame] | 1716 | |
| 1717 | Resets the screen. |
| 1718 | |
| 1719 | ------------------------------- |
| 1720 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1721 | =item B<rm> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1722 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1723 | rm [OPTION]... FILE... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1724 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1725 | Remove (unlink) the FILE(s). You may use '--' to |
Eric Andersen | 815e904 | 2000-06-06 16:15:23 +0000 | [diff] [blame] | 1726 | indicate that all following arguments are non-options. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1727 | |
| 1728 | Options: |
| 1729 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1730 | -i always prompt before removing each destinations |
| 1731 | -f remove existing destinations, never prompt |
| 1732 | -r or -R remove the contents of directories recursively |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1733 | |
| 1734 | Example: |
| 1735 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1736 | $ rm -rf /tmp/foo |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1737 | |
| 1738 | ------------------------------- |
| 1739 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1740 | =item B<rmdir> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1741 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1742 | rmdir [OPTION]... DIRECTORY... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1743 | |
| 1744 | Remove the DIRECTORY(ies), if they are empty. |
| 1745 | |
| 1746 | Example: |
| 1747 | |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 1748 | # rmdir /tmp/foo |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1749 | |
| 1750 | ------------------------------- |
| 1751 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1752 | =item B<rmmod> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1753 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1754 | rmmod [OPTION]... [MODULE]... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1755 | |
| 1756 | Unloads the specified kernel modules from the kernel. |
| 1757 | |
| 1758 | Options: |
| 1759 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1760 | -a Try to remove all unused kernel modules. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1761 | |
| 1762 | Example: |
| 1763 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1764 | $ rmmod tulip |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1765 | |
| 1766 | ------------------------------- |
| 1767 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1768 | =item B<route> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1769 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1770 | route [{add|del|flush}] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1771 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1772 | Edit the kernel's routing tables |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1773 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1774 | ------------------------------- |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1775 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1776 | =item B<rpmunpack> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1777 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1778 | rpmunpack < package.rpm | gunzip | cpio B<-idmuv> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1779 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1780 | Extracts an rpm archive. |
| 1781 | |
| 1782 | ------------------------------- |
| 1783 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1784 | =item B<sed> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1785 | |
| 1786 | sed [B<-Vhnef>] pattern [files...] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1787 | |
| 1788 | Options: |
| 1789 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1790 | -n suppress automatic printing of pattern space |
| 1791 | -e script add the script to the commands to be executed |
| 1792 | -f scriptfile add the contents of script-file to the commands to be executed |
| 1793 | -h display this help message |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1794 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1795 | If no B<-e> or B<-f> is given, the first non-option argument is taken as the |
| 1796 | sed script to interpret. All remaining arguments are names of input |
| 1797 | files; if no input files are specified, then the standard input is read. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1798 | |
| 1799 | Example: |
| 1800 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1801 | $ echo foo | sed -e 's/f[a-zA-Z]o/bar/g' |
| 1802 | bar |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1803 | |
| 1804 | ------------------------------- |
| 1805 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1806 | =item B<setkeycodes> |
Erik Andersen | 4f3f757 | 2000-04-28 00:18:56 +0000 | [diff] [blame] | 1807 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1808 | setkeycodes SCANCODE KEYCODE ... |
Erik Andersen | 4f3f757 | 2000-04-28 00:18:56 +0000 | [diff] [blame] | 1809 | |
| 1810 | Set entries into the kernel's scancode-to-keycode map, |
| 1811 | allowing unusual keyboards to generate usable keycodes. |
| 1812 | |
| 1813 | SCANCODE may be either xx or e0xx (hexadecimal), |
| 1814 | and KEYCODE is given in decimal |
| 1815 | |
| 1816 | Example: |
| 1817 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1818 | $ setkeycodes e030 127 |
Erik Andersen | 4f3f757 | 2000-04-28 00:18:56 +0000 | [diff] [blame] | 1819 | |
| 1820 | ------------------------------- |
| 1821 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1822 | =item B<sh> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1823 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1824 | sh [FILE]... |
| 1825 | or: sh B<-c> command [args]... |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1826 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1827 | lash: The BusyBox LAme SHell (command interpreter) |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1828 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1829 | This command does not yet have proper documentation. |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1830 | |
| 1831 | Use lash just as you would use any other shell. It properly handles pipes, |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1832 | redirects, job control, can be used as the shell for scripts, and has a |
| 1833 | sufficient set of builtins to do what is needed. It does not (yet) support |
| 1834 | Bourne Shell syntax. If you need things like if-then-else, while, and such |
| 1835 | use ash or bash. If you just need a very simple and extremely small shell, |
| 1836 | this will do the job. |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1837 | |
| 1838 | ------------------------------- |
| 1839 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1840 | =item B<sleep> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1841 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1842 | sleep N |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1843 | |
| 1844 | Pause for N seconds. |
| 1845 | |
| 1846 | Example: |
| 1847 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1848 | $ sleep 2 |
| 1849 | [2 second delay results] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1850 | |
| 1851 | ------------------------------- |
| 1852 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1853 | =item B<sort> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1854 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1855 | sort [B<-n>] [B<-r>] [FILE]... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1856 | |
| 1857 | Sorts lines of text in the specified files |
| 1858 | |
| 1859 | Example: |
| 1860 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1861 | $ echo -e e |
| 1862 | f |
| 1863 | b |
| 1864 | d |
| 1865 | c |
| 1866 | a | sort |
| 1867 | a |
| 1868 | b |
| 1869 | c |
| 1870 | d |
| 1871 | e |
| 1872 | f |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1873 | |
| 1874 | ------------------------------- |
| 1875 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1876 | =item B<stty> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1877 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1878 | stty [B<-a>|g] [B<-F> device] [SETTING]... |
| 1879 | |
| 1880 | Without arguments, prints baud rate, line discipline, |
| 1881 | and deviations from stty sane. |
| 1882 | |
| 1883 | Options: |
| 1884 | |
| 1885 | -F device open device instead of stdin |
| 1886 | -a print all current settings in human-readable form |
| 1887 | -g print in stty-readable form |
| 1888 | [SETTING] see documentation |
| 1889 | |
| 1890 | ------------------------------- |
| 1891 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1892 | =item B<swapoff> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1893 | |
| 1894 | swapoff [OPTION] [device] |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1895 | |
| 1896 | Stop swapping virtual memory pages on the given device. |
| 1897 | |
| 1898 | Options: |
| 1899 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1900 | -a Stop swapping on all swap devices |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1901 | |
| 1902 | ------------------------------- |
| 1903 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1904 | =item B<swapon> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1905 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1906 | swapon [OPTION] [device] |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1907 | |
| 1908 | Start swapping virtual memory pages on the given device. |
| 1909 | |
| 1910 | Options: |
| 1911 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1912 | -a Start swapping on all swap devices |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 1913 | |
| 1914 | ------------------------------- |
| 1915 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1916 | =item B<sync> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1917 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1918 | sync |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1919 | |
| 1920 | Write all buffered filesystem blocks to disk. |
| 1921 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1922 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1923 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1924 | =item B<syslogd> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1925 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1926 | syslogd [OPTION]... |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1927 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1928 | Linux system and kernel logging utility. |
| 1929 | Note that this version of syslogd ignores /etc/syslog.conf. |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1930 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1931 | Options: |
Pavel Roskin | 049b706 | 2000-06-07 21:19:49 +0000 | [diff] [blame] | 1932 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1933 | -m NUM Interval between MARK lines (default=20min, 0=off) |
Pavel Roskin | da10ec0 | 2000-06-07 21:08:25 +0000 | [diff] [blame] | 1934 | -n Run as a foreground process |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1935 | -O FILE Use an alternate log file (default=/var/log/messages) |
| 1936 | -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP) |
| 1937 | -L Log locally and via network logging (default is network only) |
Eric Andersen | ced2cef | 2000-07-20 23:41:24 +0000 | [diff] [blame] | 1938 | |
| 1939 | Example: |
| 1940 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1941 | $ syslogd -R masterlog:514 |
| 1942 | $ syslogd -R 192.168.1.1:601 |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1943 | |
| 1944 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1945 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1946 | =item B<tail> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1947 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1948 | tail [OPTION]... [FILE]... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1949 | |
| 1950 | Print last 10 lines of each FILE to standard output. |
| 1951 | With more than one FILE, precede each with a header giving the |
| 1952 | file name. With no FILE, or when FILE is -, read standard input. |
| 1953 | |
| 1954 | Options: |
| 1955 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1956 | -c N[kbm] output the last N bytes |
| 1957 | -n N[kbm] print last N lines instead of last 10 |
| 1958 | -f output data as the file grows |
| 1959 | -q never output headers giving file names |
| 1960 | -s SEC wait SEC seconds between reads with -f |
| 1961 | -v always output headers giving file names |
| 1962 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1963 | If the first character of N (bytes or lines) is a '+', output begins with |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1964 | the Nth item from the start of each file, otherwise, print the last N items |
| 1965 | in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2). |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1966 | |
| 1967 | Example: |
| 1968 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1969 | $ tail -n 1 /etc/resolv.conf |
| 1970 | nameserver 10.0.0.1 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1971 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 1972 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 1973 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 1974 | =item B<tar> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 1975 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1976 | tar -[cxtvO] [-B<-exclude> File] [B<-X> File][B<-f> tarFile] [FILE(s)] ... |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1977 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1978 | Create, extract, or list files from a tar file. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1979 | |
| 1980 | Main operation mode: |
| 1981 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1982 | c create |
| 1983 | x extract |
| 1984 | t list |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1985 | |
| 1986 | File selection: |
| 1987 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1988 | f name of tarfile or - for stdin |
| 1989 | O extract to stdout |
| 1990 | exclude file to exclude |
| 1991 | X file with names to exclude |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1992 | |
| 1993 | Informative output: |
| 1994 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 1995 | v verbosely list files processed |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 1996 | |
| 1997 | Example: |
| 1998 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 1999 | $ zcat /tmp/tarball.tar.gz | tar -xf - |
| 2000 | $ tar -cf /tmp/tarball.tar /usr/local |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2001 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2002 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2003 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2004 | =item B<tee> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2005 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2006 | tee [OPTION]... [FILE]... |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2007 | |
| 2008 | Copy standard input to each FILE, and also to standard output. |
| 2009 | |
| 2010 | Options: |
| 2011 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2012 | -a append to the given FILEs, do not overwrite |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2013 | |
| 2014 | Example: |
| 2015 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2016 | $ echo Hello | tee /tmp/foo |
| 2017 | $ cat /tmp/foo |
| 2018 | Hello |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2019 | |
| 2020 | ------------------------------- |
| 2021 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2022 | =item B<telnet> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2023 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2024 | telnet host [port] |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2025 | |
| 2026 | Telnet is used to establish interactive communication with another |
| 2027 | computer over a network using the TELNET protocol. |
| 2028 | |
| 2029 | ------------------------------- |
| 2030 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2031 | =item B<test> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2032 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2033 | test EXPRESSION |
| 2034 | or [ EXPRESSION ] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2035 | |
| 2036 | Checks file types and compares values returning an exit |
| 2037 | code determined by the value of EXPRESSION. |
| 2038 | |
| 2039 | Example: |
| 2040 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2041 | $ test 1 -eq 2 |
| 2042 | $ echo $? |
| 2043 | 1 |
| 2044 | $ test 1 -eq 1 |
| 2045 | $ echo $? |
| 2046 | 0 |
| 2047 | $ [ -d /etc ] |
| 2048 | $ echo $? |
| 2049 | 0 |
| 2050 | $ [ -d /junk ] |
| 2051 | $ echo $? |
| 2052 | 1 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2053 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2054 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2055 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2056 | =item B<tftp> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2057 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2058 | tftp command SOURCE DEST |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2059 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2060 | Transfers a file from/to a tftp server using octet mode. |
| 2061 | |
| 2062 | Commands: |
| 2063 | |
| 2064 | get Get file from server SOURCE and store to local DEST. |
| 2065 | put Put local file SOURCE to server DEST. |
| 2066 | |
| 2067 | When nameing a server, use the syntax server:file. |
| 2068 | |
| 2069 | ------------------------------- |
| 2070 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2071 | =item B<touch> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2072 | |
| 2073 | touch [B<-c>] file [file ...] |
| 2074 | |
| 2075 | Update the last-modified date on the given file[s]. |
| 2076 | |
| 2077 | Options: |
| 2078 | |
| 2079 | -c Do not create any files |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2080 | |
| 2081 | Example: |
| 2082 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2083 | $ ls -l /tmp/foo |
| 2084 | /bin/ls: /tmp/foo: No such file or directory |
| 2085 | $ touch /tmp/foo |
| 2086 | $ ls -l /tmp/foo |
| 2087 | -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo |
| 2088 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2089 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2090 | ------------------------------- |
| 2091 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2092 | =item B<tr> |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 2093 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2094 | tr [B<-cds>] STRING1 [STRING2] |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2095 | |
Erik Andersen | 3c1217c | 2000-05-01 22:34:24 +0000 | [diff] [blame] | 2096 | Translate, squeeze, and/or delete characters from |
| 2097 | standard input, writing to standard output. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2098 | |
Erik Andersen | 3c1217c | 2000-05-01 22:34:24 +0000 | [diff] [blame] | 2099 | Options: |
| 2100 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2101 | -c take complement of STRING1 |
| 2102 | -d delete input characters coded STRING1 |
| 2103 | -s squeeze multiple output characters of STRING2 into one character |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2104 | |
| 2105 | Example: |
| 2106 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2107 | $ echo gdkkn vnqkc | tr [a-y] [b-z] |
| 2108 | hello world |
| 2109 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2110 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2111 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2112 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2113 | =item B<true> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2114 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2115 | true |
| 2116 | |
| 2117 | Return an exit code of TRUE (0). |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2118 | |
| 2119 | Example: |
| 2120 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2121 | $ true |
| 2122 | $ echo $? |
| 2123 | 0 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2124 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2125 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2126 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2127 | =item B<tty> |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2128 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2129 | tty |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2130 | |
| 2131 | Print the file name of the terminal connected to standard input. |
| 2132 | |
| 2133 | Options: |
| 2134 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2135 | -s print nothing, only return an exit status |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2136 | |
| 2137 | Example: |
| 2138 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2139 | $ tty |
| 2140 | /dev/tty2 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2141 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2142 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2143 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2144 | =item B<umount> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2145 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2146 | umount [flags] filesystem|directory |
| 2147 | |
| 2148 | Unmount file systems |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2149 | |
| 2150 | Flags: |
| 2151 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2152 | -a: Unmount all file systems in /etc/mtab |
| 2153 | -n: Don't erase /etc/mtab entries |
| 2154 | -r: Try to remount devices as read-only if mount is busy |
| 2155 | -f: Force filesystem umount (i.e. unreachable NFS server) |
| 2156 | -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] | 2157 | |
| 2158 | Example: |
| 2159 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2160 | $ umount /dev/hdc1 |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2161 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2162 | ------------------------------- |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 2163 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2164 | =item B<uname> |
John Beppu | f17792c | 2000-04-13 03:16:01 +0000 | [diff] [blame] | 2165 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2166 | uname [OPTION]... |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2167 | |
Erik Andersen | 26702fe | 2000-04-17 16:44:46 +0000 | [diff] [blame] | 2168 | Print certain system information. With no OPTION, same as B<-s>. |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2169 | |
| 2170 | Options: |
| 2171 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2172 | -a print all information |
| 2173 | -m the machine (hardware) type |
| 2174 | -n print the machine's network node hostname |
| 2175 | -r print the operating system release |
| 2176 | -s print the operating system name |
| 2177 | -p print the host processor type |
| 2178 | -v print the operating system version |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2179 | |
| 2180 | Example: |
| 2181 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2182 | $ uname -a |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 2183 | Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown |
| 2184 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2185 | |
| 2186 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2187 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2188 | =item B<uniq> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2189 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2190 | uniq [OPTION]... [INPUT [OUTPUT]] |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2191 | |
| 2192 | Discard all but one of successive identical lines from INPUT |
| 2193 | (or standard input), writing to OUTPUT (or standard output). |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2194 | |
Eric Andersen | 5b5db38 | 2000-12-09 16:37:53 +0000 | [diff] [blame] | 2195 | Options: |
| 2196 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2197 | -c prefix lines by the number of occurrences |
| 2198 | -d only print duplicate lines |
| 2199 | -u only print unique lines |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2200 | |
| 2201 | Example: |
| 2202 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2203 | $ echo -e a |
| 2204 | a |
| 2205 | b |
| 2206 | c |
| 2207 | c |
| 2208 | a | sort | uniq |
| 2209 | a |
| 2210 | b |
| 2211 | c |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2212 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2213 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2214 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2215 | =item B<unix2dos> |
Eric Andersen | cff3fe3 | 2000-09-20 19:22:26 +0000 | [diff] [blame] | 2216 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2217 | unix2dos [option] [file] |
Eric Andersen | cff3fe3 | 2000-09-20 19:22:26 +0000 | [diff] [blame] | 2218 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2219 | See 'dos2unix -B<-help>' for help! |
Eric Andersen | cff3fe3 | 2000-09-20 19:22:26 +0000 | [diff] [blame] | 2220 | |
| 2221 | ------------------------------- |
| 2222 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2223 | =item B<update> |
Eric Andersen | cff3fe3 | 2000-09-20 19:22:26 +0000 | [diff] [blame] | 2224 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2225 | update [options] |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2226 | |
| 2227 | Periodically flushes filesystem buffers. |
| 2228 | |
| 2229 | Options: |
| 2230 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2231 | -S force use of sync(2) instead of flushing |
| 2232 | -s SECS call sync this often (default 30) |
| 2233 | -f SECS flush some buffers this often (default 5) |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2234 | |
| 2235 | ------------------------------- |
| 2236 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2237 | =item B<uptime> |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2238 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2239 | uptime |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2240 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2241 | Display the time since the last boot. |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2242 | |
| 2243 | Example: |
| 2244 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2245 | $ uptime |
| 2246 | 1:55pm up 2:30, load average: 0.09, 0.04, 0.00 |
| 2247 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2248 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2249 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2250 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2251 | =item B<usleep> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2252 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2253 | usleep N |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2254 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2255 | Pause for N microseconds. |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2256 | |
| 2257 | Example: |
| 2258 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2259 | $ usleep 1000000 |
| 2260 | [pauses for 1 second] |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2261 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2262 | ------------------------------- |
| 2263 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2264 | =item B<uudecode> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2265 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2266 | uudecode [FILE]... |
| 2267 | |
| 2268 | Uudecode a file that is uuencoded. |
| 2269 | |
| 2270 | Options: |
| 2271 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2272 | -o FILE direct output to FILE |
| 2273 | |
| 2274 | Example: |
| 2275 | |
| 2276 | $ uudecode -o busybox busybox.uu |
| 2277 | $ ls -l busybox |
| 2278 | -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox |
| 2279 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2280 | |
| 2281 | ------------------------------- |
| 2282 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2283 | =item B<uuencode> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2284 | |
| 2285 | uuencode [OPTION] [INFILE] REMOTEFILE |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2286 | |
| 2287 | Uuencode a file. |
| 2288 | |
| 2289 | Options: |
| 2290 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2291 | -m use base64 encoding as of RFC1521 |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2292 | |
| 2293 | Example: |
| 2294 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2295 | $ uuencode busybox busybox |
| 2296 | begin 755 busybox |
| 2297 | <encoded file snipped> |
| 2298 | $ uudecode busybox busybox > busybox.uu |
| 2299 | $ |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2300 | |
| 2301 | ------------------------------- |
| 2302 | |
John Beppu | 79359d8 | 2001-04-05 20:03:33 +0000 | [diff] [blame] | 2303 | =item B<vi> |
| 2304 | |
| 2305 | vi [OPTION] [FILE]... |
| 2306 | |
| 2307 | edit FILE. |
| 2308 | |
| 2309 | Options: |
| 2310 | |
| 2311 | -R Read-only- do not write to the file. |
| 2312 | |
| 2313 | ------------------------------- |
| 2314 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2315 | =item B<watchdog> |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2316 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2317 | watchdog DEV |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2318 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2319 | Periodically write to watchdog device DEV |
Eric Andersen | 028fb62 | 2000-07-04 20:07:13 +0000 | [diff] [blame] | 2320 | |
| 2321 | ------------------------------- |
| 2322 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2323 | =item B<wc> |
Eric Andersen | ffde867 | 2001-01-25 23:40:32 +0000 | [diff] [blame] | 2324 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2325 | wc [OPTION]... [FILE]... |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2326 | |
| 2327 | Print line, word, and byte counts for each FILE, and a total line if |
| 2328 | more than one FILE is specified. With no FILE, read standard input. |
| 2329 | |
| 2330 | Options: |
| 2331 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2332 | -c print the byte counts |
| 2333 | -l print the newline counts |
| 2334 | -L print the length of the longest line |
| 2335 | -w print the word counts |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2336 | |
| 2337 | Example: |
| 2338 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2339 | $ wc /etc/passwd |
| 2340 | 31 46 1365 /etc/passwd |
| 2341 | |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2342 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2343 | ------------------------------- |
| 2344 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2345 | =item B<wget> |
Pavel Roskin | afa0662 | 2000-06-21 21:43:24 +0000 | [diff] [blame] | 2346 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2347 | wget [B<-c>] [B<-O> file] url |
| 2348 | |
Eric Andersen | 79757c9 | 2001-04-05 21:45:54 +0000 | [diff] [blame] | 2349 | wget retrieves files via HTTP or FTP |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2350 | |
| 2351 | Options: |
| 2352 | |
| 2353 | -c continue retrieval of aborted transfers |
Eric Andersen | 79757c9 | 2001-04-05 21:45:54 +0000 | [diff] [blame] | 2354 | -q quiet mode - do not print |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2355 | -O save to filename ('-' for stdout) |
| 2356 | |
| 2357 | ------------------------------- |
| 2358 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2359 | =item B<which> |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2360 | |
| 2361 | which [COMMAND ...] |
Pavel Roskin | afa0662 | 2000-06-21 21:43:24 +0000 | [diff] [blame] | 2362 | |
| 2363 | Locates a COMMAND. |
| 2364 | |
| 2365 | Example: |
| 2366 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2367 | $ which login |
| 2368 | /bin/login |
Pavel Roskin | afa0662 | 2000-06-21 21:43:24 +0000 | [diff] [blame] | 2369 | |
| 2370 | ------------------------------- |
| 2371 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2372 | =item B<whoami> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2373 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2374 | whoami |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2375 | |
| 2376 | Prints the user name associated with the current effective user id. |
| 2377 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2378 | ------------------------------- |
| 2379 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2380 | =item B<xargs> |
Eric Andersen | 5b17693 | 2000-09-22 20:22:28 +0000 | [diff] [blame] | 2381 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2382 | xargs [COMMAND] [ARGS...] |
Eric Andersen | 5b17693 | 2000-09-22 20:22:28 +0000 | [diff] [blame] | 2383 | |
| 2384 | Executes COMMAND on every item given by standard input. |
| 2385 | |
Eric Andersen | 5b17693 | 2000-09-22 20:22:28 +0000 | [diff] [blame] | 2386 | Example: |
| 2387 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2388 | $ ls | xargs gzip |
| 2389 | $ find . -name '*.c' -print | xargs rm |
| 2390 | |
Eric Andersen | 5b17693 | 2000-09-22 20:22:28 +0000 | [diff] [blame] | 2391 | |
| 2392 | ------------------------------- |
| 2393 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2394 | =item B<yes> |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2395 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2396 | yes [OPTION]... [STRING]... |
Erik Andersen | e5b6c7d | 2000-04-17 16:16:10 +0000 | [diff] [blame] | 2397 | |
John Beppu | e708cb5 | 2001-03-15 21:08:01 +0000 | [diff] [blame] | 2398 | Repeatedly outputs a line with all specified STRING(s), or 'y'. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2399 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2400 | ------------------------------- |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2401 | |
John Beppu | 5bca0af | 2001-04-05 19:41:23 +0000 | [diff] [blame] | 2402 | =item B<zcat> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2403 | |
Eric Andersen | 0d3a02e | 2001-03-15 18:14:25 +0000 | [diff] [blame] | 2404 | zcat FILE |
| 2405 | |
| 2406 | Uncompress to stdout. |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 2407 | |
Erik Andersen | 9cf3bfa | 2000-04-13 18:49:43 +0000 | [diff] [blame] | 2408 | ------------------------------- |
John Beppu | 4581b4c | 2000-01-19 15:04:41 +0000 | [diff] [blame] | 2409 | |
Erik Andersen | a19bc64 | 2000-05-02 06:40:02 +0000 | [diff] [blame] | 2410 | =head1 LIBC NSS |
| 2411 | |
| 2412 | GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C |
| 2413 | library for the local environment, and to configure how it reads system data, |
| 2414 | such as passwords and group information. BusyBox has made it Policy that it |
| 2415 | will never use NSS, and will never use and libc calls that make use of NSS. |
| 2416 | This allows you to run an embedded system without the need for installing an |
| 2417 | /etc/nsswitch.conf file and without and /lib/libnss_* libraries installed. |
| 2418 | |
| 2419 | If you are using a system that is using a remote LDAP server for authentication |
| 2420 | via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the |
| 2421 | BusyBox source. Chances are though, that if you have enough space to install |
| 2422 | of that stuff on your system, then you probably want the full GNU utilities. |
| 2423 | |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2424 | =head1 SEE ALSO |
| 2425 | |
| 2426 | textutils(1), shellutils(1), etc... |
| 2427 | |
| 2428 | =head1 MAINTAINER |
| 2429 | |
Erik Andersen | 1101d23 | 2000-04-19 05:15:12 +0000 | [diff] [blame] | 2430 | Erik Andersen <andersee@debian.org> <andersen@lineo.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2431 | |
| 2432 | =head1 AUTHORS |
| 2433 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2434 | The following people have contributed code to BusyBox whether |
| 2435 | they know it or not. |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2436 | |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2437 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2438 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2439 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2440 | Erik Andersen <andersen@lineo.com>, <andersee@debian.org> |
| 2441 | |
| 2442 | Tons of new stuff, major rewrite of most of the |
| 2443 | core apps, tons of new apps as noted in header files. |
| 2444 | |
| 2445 | =for html <br> |
| 2446 | |
| 2447 | Edward Betts <edward@debian.org> |
| 2448 | |
| 2449 | expr, hostid, logname, tty, wc, whoami, yes |
| 2450 | |
| 2451 | =for html <br> |
| 2452 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2453 | John Beppu <beppu@lineo.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2454 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2455 | du, head, nslookup, sort, tee, uniq |
| 2456 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2457 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2458 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2459 | Brian Candler <B.Candler@pobox.com> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2460 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2461 | tiny-ls(ls) |
| 2462 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2463 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2464 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2465 | Randolph Chung <tausq@debian.org> |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2466 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2467 | fbset, ping, hostname, and mkfifo |
| 2468 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2469 | =for html <br> |
John Beppu | 46a4e76 | 2000-01-18 22:33:11 +0000 | [diff] [blame] | 2470 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2471 | Dave Cinege <dcinege@psychosis.com> |
| 2472 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2473 | more(v2), makedevs, dutmp, modularization, auto links file, |
| 2474 | various fixes, Linux Router Project maintenance |
| 2475 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2476 | =for html <br> |
| 2477 | |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 2478 | Karl M. Hegbloom <karlheg@debian.org> |
| 2479 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2480 | cp_mv.c, the test suite, various fixes to utility.c, &c. |
| 2481 | |
| 2482 | =for html <br> |
| 2483 | |
| 2484 | Daniel Jacobowitz <dan@debian.org> |
| 2485 | |
| 2486 | mktemp.c |
| 2487 | |
| 2488 | =for html <br> |
| 2489 | |
| 2490 | Matt Kraai <kraai@alumni.carnegiemellon.edu> |
| 2491 | |
| 2492 | documentation, bugfixes |
| 2493 | |
John Beppu | 50ed067 | 2000-04-13 23:44:04 +0000 | [diff] [blame] | 2494 | =for html <br> |
| 2495 | |
John Beppu | 4fd10fc | 2000-04-17 05:13:59 +0000 | [diff] [blame] | 2496 | John Lombardo <john@deltanet.com> |
| 2497 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2498 | dirname, tr |
| 2499 | |
John Beppu | 4fd10fc | 2000-04-17 05:13:59 +0000 | [diff] [blame] | 2500 | =for html <br> |
| 2501 | |
Eric Andersen | 86ab8a3 | 2000-06-02 03:21:42 +0000 | [diff] [blame] | 2502 | Glenn McGrath <bug1@netconnect.com.au> |
| 2503 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2504 | ar.c |
| 2505 | |
Eric Andersen | 86ab8a3 | 2000-06-02 03:21:42 +0000 | [diff] [blame] | 2506 | =for html <br> |
| 2507 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2508 | Bruce Perens <bruce@pixar.com> |
| 2509 | |
| 2510 | Original author of BusyBox. His code is still in many apps. |
| 2511 | |
| 2512 | =for html <br> |
| 2513 | |
| 2514 | Chip Rosenthal <chip@unicom.com>, <crosenth@covad.com> |
| 2515 | |
| 2516 | wget - Contributed by permission of Covad Communications |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2517 | |
| 2518 | =for html <br> |
| 2519 | |
Pavel Roskin | 339b892 | 2000-06-20 00:11:07 +0000 | [diff] [blame] | 2520 | Pavel Roskin <proski@gnu.org> |
Eric Andersen | 08e9289 | 2000-06-02 03:21:36 +0000 | [diff] [blame] | 2521 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2522 | Lots of bugs fixes and patches. |
| 2523 | |
| 2524 | =for html <br> |
| 2525 | |
| 2526 | Gyepi Sam <gyepi@praxis-sw.com> |
| 2527 | |
| 2528 | Remote logging feature for syslogd |
| 2529 | |
Eric Andersen | 08e9289 | 2000-06-02 03:21:36 +0000 | [diff] [blame] | 2530 | =for html <br> |
| 2531 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2532 | Linus Torvalds <torvalds@transmeta.com> |
| 2533 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2534 | mkswap, fsck.minix, mkfs.minix |
| 2535 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2536 | =for html <br> |
| 2537 | |
John Beppu | 2aee993 | 2000-09-15 08:04:42 +0000 | [diff] [blame] | 2538 | Mark Whitley <markw@lineo.com> |
| 2539 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2540 | sed remix, bug fixes, style-guide, etc. |
| 2541 | |
John Beppu | 2aee993 | 2000-09-15 08:04:42 +0000 | [diff] [blame] | 2542 | =for html <br> |
| 2543 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2544 | Charles P. Wright <cpwright@villagenet.com> |
| 2545 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2546 | gzip, mini-netcat(nc) |
| 2547 | |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2548 | =for html <br> |
| 2549 | |
| 2550 | Enrique Zanardi <ezanardi@ull.es> |
| 2551 | |
Eric Andersen | 57f83ff | 2000-09-24 02:41:44 +0000 | [diff] [blame] | 2552 | tarcat (since removed), loadkmap, various fixes, Debian maintenance |
John Beppu | 3a1b6be | 2000-01-18 15:45:59 +0000 | [diff] [blame] | 2553 | |
| 2554 | =cut |
John Beppu | 08fe43d | 2000-01-19 12:39:16 +0000 | [diff] [blame] | 2555 | |
Eric Andersen | 79757c9 | 2001-04-05 21:45:54 +0000 | [diff] [blame] | 2556 | # $Id: busybox.pod,v 1.96 2001/04/05 21:45:54 andersen Exp $ |