DocBook documentation update from Matt Kraai <kraai@alumni.carnegiemellon.edu>
[oweals/busybox.git] / docs / busybox.sgml
1 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [...]>
2 <book id="BusyBoxDocumentation">
3  <bookinfo>
4   <title>BusyBox - The Swiss Army Knife of Embedded Linux</title>
5   
6   <legalnotice>
7    <para>
8      This documentation is free software; you can redistribute
9      it and/or modify it under the terms of the GNU General Public
10      License as published by the Free Software Foundation; either
11      version 2 of the License, or (at your option) any later
12      version.
13    </para>
14       
15    <para>
16      This program is distributed in the hope that it will be
17      useful, but WITHOUT ANY WARRANTY; without even the implied
18      warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19      See the GNU General Public License for more details.
20    </para>
21       
22    <para>
23      You should have received a copy of the GNU General Public
24      License along with this program; if not, write to the Free
25      Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26      MA 02111-1307 USA
27    </para>
28       
29    <para>
30      For more details see the file COPYING in the source
31      distribution of Linux.
32    </para>
33   </legalnotice>
34  </bookinfo>
35
36 <toc></toc>
37   <chapter id="Introduction">
38      <title>Introduction</title>
39
40         <para>
41         BusyBox combines tiny versions of many common UNIX utilities into a single
42         small executable. It provides minimalist replacements for most of the
43         utilities you usually find in fileutils, shellutils, findutils, textutils,
44         grep, gzip, tar, etc. BusyBox provides a fairly complete POSIX environment
45         for any small or embedded system. The utilities in BusyBox generally have
46         fewer options than their full-featured GNU cousins; however, the options
47         that are included provide the expected functionality and behave very much
48         like their GNU counterparts. 
49         </para>
50
51         <para>
52         BusyBox has been written with size-optimization and limited resources in
53         mind. It is also extremely modular so you can easily include or exclude
54         commands (or features) at compile time. This makes it easy to customize
55         your embedded systems. To create a working system, just add a kernel, a
56         shell (such as ash), and an editor (such as elvis-tiny or ae).
57         </para>
58   </chapter>
59
60   <chapter id="Syntax">
61      <title>How to use BusyBox</title>
62         <sect1 id="How to use BusyBox">
63             <title>Syntax</title
64
65             <para>
66             <screen>
67              BusyBox &lt;function&gt; [arguments...]  # or
68             </screen>
69             </para>
70
71             <para>
72             <screen>
73              &lt;function&gt; [arguments...]          # if symlinked
74             </screen>
75             </para>
76         </sect1>
77
78         <sect1 id="Invoking BusyBox">
79             <para>
80             When you create a link to BusyBox for the function you wish to use, when
81             BusyBox is called using that link it will behave as if the command itself
82             has been invoked.
83             </para>
84
85             <para>
86             For example, entering
87             </para>
88
89             <para>
90             <screen>
91                     ln -s ./BusyBox ls
92                     ./ls
93             </screen>
94             </para>
95
96             <para>
97             will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
98             into BusyBox). 
99             </para>
100
101             <para>
102             You can also invoke BusyBox by issuing the command as an argument on the
103             command line. For example, entering
104             </para>
105
106             <para>
107             <screen>
108                     ./BusyBox ls
109             </screen>
110             </para>
111
112             <para>
113             will also cause BusyBox to behave as 'ls'. 
114             </para>
115
116         </sect1>
117
118         <sect1 id="Common options">
119             <para>
120             Most BusyBox commands support the <emphasis>--help</emphasis> option to provide 
121             a terse runtime description of their behavior. 
122             </para>
123         </sect1>
124   </chapter>
125
126   <chapter id="Commands">
127      <title>BusyBox Commands</title>
128         <sect1 id="Available BusyBox Commands">
129             <title>Available BusyBox Commands</title>
130                 <para>
131                 Currently defined functions include:
132                 </para>
133
134                 <para>
135                 ar, basename, cat, chgrp, chmod, chown, chroot, chvt, clear, cp, cut, date,
136                 dc, dd, deallocvt, df, dirname, dmesg, du, dutmp, echo, false, fbset,
137                 fdflush, find, free, freeramdisk, fsck.minix, grep, gunzip, gzip, halt,
138                 head, hostid, hostname, id, init, insmod, kill, killall, length, ln,
139                 loadacm, loadfont, loadkmap, logger, logname, ls, lsmod, makedevs, mkdir,
140                 mkfifo, mkfs.minix, mknod, mkswap, mktemp, more, mount, mt, mv, nc,
141                 nslookup, ping, poweroff, printf, ps, pwd, reboot, rm, rmdir, rmmod, sed,
142                 setkeycodes, sfdisk, sh, sleep, sort, swapoff, swapon, sync, syslogd, tail,
143                 tar, tee, telnet, test, touch, tr, true, tty, umount, uname, uniq, update,
144                 uptime, usleep, uudecode, uuencode, wc, which, whoami, yes, zcat, [
145                 </para>
146         </sect1>
147
148         <sect1 id="ar">
149             <title>ar</title>
150
151                 <para>
152                 Usage: ar [OPTION] archive [FILENAME]...
153                 </para>
154
155                 <para>
156                 Extract or list files from an ar archive.
157                 </para>
158
159                 <para>
160                 Options:
161                 </para>
162
163                 <para>
164                 <screen>
165                         o       Preserve original dates
166                         p       Extract to stdout
167                         t       List
168                         x       Extract
169                         v       Verbosely list files processed
170                 </screen>
171                 </para>
172         </sect1>
173
174         <sect1 id="basename">
175             <title>basename</title>
176                 <para>
177                 Usage: basename FILE [SUFFIX]
178                 </para>
179
180                 <para>
181                 Strip directory path and suffixes from FILE. If specified, also removes
182                 any trailing SUFFIX.
183                 </para>
184
185                 <para>
186                 Example:
187                 </para>
188
189                 <para>
190                 <screen>
191                         $ basename /usr/local/bin/foo
192                         foo
193                         $ basename /usr/local/bin/
194                         bin
195                         $ basename /foo/bar.txt .txt
196                         bar
197                 </screen>
198                 </para>
199         </sect1>
200
201         <sect1 id="cat">
202             <title>cat</title>
203
204                 <para>
205                 Usage: cat [FILE]...
206                 </para>
207
208                 <para>
209                 Concatenate <literal>FILE(s)</literal> and prints them to the standard
210                 output.
211                 </para>
212
213                 <para>
214                 Example:
215                 </para>
216
217                 <para>
218                 <screen>
219                         $ cat /proc/uptime
220                         110716.72 17.67
221                 </screen>
222                 </para>
223         </sect1>
224
225         <sect1 id="chgrp">
226             <title>chgrp</title>
227
228                 <para>
229                 Usage: chgrp [OPTION]... GROUP FILE...
230                 </para>
231
232                 <para>
233                 Change the group membership of each FILE to GROUP.
234                 </para>
235
236                 <para>
237                 Options:
238                 </para>
239
240                 <para>
241                 <screen>
242                         -R      Change files and directories recursively
243                 </screen>
244                 </para>
245
246                 <para>
247                 Example:
248                 </para>
249
250                 <para>
251                 <screen>
252                         $ ls -l /tmp/foo
253                         -r--r--r--    1 andersen andersen        0 Apr 12 18:25 /tmp/foo
254                         $ chgrp root /tmp/foo
255                         $ ls -l /tmp/foo
256                         -r--r--r--    1 andersen root            0 Apr 12 18:25 /tmp/foo
257                 </screen>
258                 </para>
259         </sect1>
260
261         <sect1 id="chmod">
262             <title>chmod</title>
263
264                 <para>
265                 Usage: chmod [<emphasis>-R</emphasis>] MODE[,MODE]... FILE...
266                 </para>
267
268                 <para>
269                 Change file access permissions for the specified
270                 <literal>FILE(s)</literal> (or directories). Each MODE is defined by
271                 combining the letters for WHO has access to the file, an OPERATOR for
272                 selecting how the permissions should be changed, and a PERMISSION for
273                 <literal>FILE(s)</literal> (or directories).
274                 </para>
275
276                 <para>
277                 WHO may be chosen from
278                 </para>
279
280                 <para>
281                 <screen>
282                         u       User who owns the file
283                         g       Users in the file's Group
284                         o       Other users not in the file's group
285                         a       All users
286                 </screen>
287                 </para>
288
289                 <para>
290                 OPERATOR may be chosen from
291                 </para>
292
293                 <para>
294                 <screen>
295                         +       Add a permission
296                         -       Remove a permission
297                         =       Assign a permission
298                 </screen>
299                 </para>
300
301                 <para>
302                 PERMISSION may be chosen from
303                 </para>
304
305                 <para>
306                 <screen>
307                         r       Read
308                         w       Write
309                         x       Execute (or access for directories)
310                         s       Set user (or group) ID bit
311                         t       Sticky bit (for directories prevents removing files by non-owners)
312                 </screen>
313                 </para>
314
315                 <para>
316                 Alternately, permissions can be set numerically where the first three
317                 numbers are calculated by adding the octal values, such as
318                 </para>
319
320                 <para>
321                 <screen>
322                         4       Read
323                         2       Write
324                         1       Execute
325                 </screen>
326                 </para>
327
328                 <para>
329                 An optional fourth digit can also be used to specify
330                 </para>
331
332                 <para>
333                 <screen>
334                         4       Set user ID
335                         2       Set group ID
336                         1       Sticky bit
337                 </screen>
338                 </para>
339
340                 <para>
341                 Options:
342                 </para>
343
344                 <para>
345                 <screen>
346                         -R      Change files and directories recursively.
347                 </screen>
348                 </para>
349
350                 <para>
351                 Example:
352                 </para>
353
354                 <para>
355                 <screen>
356                         $ ls -l /tmp/foo
357                         -rw-rw-r--    1 root     root            0 Apr 12 18:25 /tmp/foo
358                         $ chmod u+x /tmp/foo
359                         $ ls -l /tmp/foo
360                         -rwxrw-r--    1 root     root            0 Apr 12 18:25 /tmp/foo*
361                         $ chmod 444 /tmp/foo
362                         $ ls -l /tmp/foo
363                         -r--r--r--    1 root     root            0 Apr 12 18:25 /tmp/foo
364                 </screen>
365                 </para>
366         </sect1>
367         
368         <sect1 id="chown">
369             <title>chown</title>
370                 <para>
371                 Usage: chown [OPTION]... OWNER[&lt;.|:&gt;[GROUP] FILE...
372                 </para>
373
374                 <para>
375                 Change the owner and/or group of each FILE to OWNER and/or GROUP.
376                 </para>
377
378                 <para>
379                 Options:
380                 </para>
381
382                 <para>
383                 <screen>
384                         -R      Change files and directories recursively
385                 </screen>
386                 </para>
387
388                 <para>
389                 Example:
390                 </para>
391
392                 <para>
393                 <screen>
394                         $ ls -l /tmp/foo
395                         -r--r--r--    1 andersen andersen        0 Apr 12 18:25 /tmp/foo
396                         $ chown root /tmp/foo
397                         $ ls -l /tmp/foo
398                         -r--r--r--    1 root     andersen        0 Apr 12 18:25 /tmp/foo
399                         $ chown root.root /tmp/foo
400                         ls -l /tmp/foo
401                         -r--r--r--    1 root     root            0 Apr 12 18:25 /tmp/foo
402                 </screen>
403                 </para>
404         </sect1>
405
406         <sect1 id="chroot">
407             <title>chroot</title>
408                 <para>
409                 Usage: chroot NEWROOT [COMMAND...]
410                 </para>
411
412                 <para>
413                 Run COMMAND with root directory set to NEWROOT.
414                 </para>
415
416                 <para>
417                 Example:
418                 </para>
419
420                 <para>
421                 <screen>
422                         $ ls -l /bin/ls
423                         lrwxrwxrwx    1 root     root          12 Apr 13 00:46 /bin/ls -&gt; /BusyBox
424                         $ mount /dev/hdc1 /mnt -t minix
425                         $ chroot /mnt
426                         $ ls -l /bin/ls
427                         -rwxr-xr-x    1 root     root        40816 Feb  5 07:45 /bin/ls*
428                 </screen>
429                 </para>
430         </sect1>
431
432         <sect1 id="chvt">
433             <title>chvt</title>
434                 <para>
435                 Usage: chvt N
436                 </para>
437
438                 <para>
439                 Change the foreground virtual terminal to /dev/ttyN
440                 </para>
441         </sect1>
442
443         <sect1 id="clear">
444             <title>clear</title>
445
446                 <para>
447                 Usage: clear
448                 </para>
449
450                 <para>
451                 Clear the screen.
452                 </para>
453         </sect1>
454
455         <sect1 id="cp">
456             <title>cp</title>
457
458                 <para>
459                 Usage: cp [OPTION]... SOURCE DEST
460                 </para>
461
462                 <para>
463                 <screen>
464                    or: cp [OPTION]... SOURCE... DIRECTORY
465                 </screen>
466                 </para>
467
468                 <para>
469                 Copy SOURCE to DEST, or multiple <literal>SOURCE(s)</literal> to
470                 DIRECTORY.
471                 </para>
472
473                 <para>
474                 Options:
475                 </para>
476
477                 <para>
478                 <screen>
479                         -a      Same as -dpR
480                         -d      Preserve links
481                         -p      Preserve file attributes if possible
482                         -R      Copy directories recursively
483                 </screen>
484                 </para>
485         </sect1>
486
487         <sect1 id="cut">
488             <title>cut</title>
489
490                 <para>
491                 Usage: cut [OPTION]... [FILE]...
492                 </para>
493
494                 <para>
495                 Print selected fields from each input FILE to standard output.
496                 </para>
497
498                 <para>
499                 Options:
500                 </para>
501
502                 <para>
503                 <screen>
504                                 -b LIST Output only bytes from LIST
505                                 -c LIST Output only characters from LIST
506                                 -d CHAR Use CHAR instead of tab as the field delimiter
507                                 -s      Only output Lines if the include DELIM
508                                 -f N    Print only these fields
509                                 -n      Ignored
510                 </screen>
511                 </para>
512
513                 <para>
514                 Example:
515                 </para>
516
517                 <para>
518                 <screen>
519                         $ echo "Hello world" | cut -f 1 -d ' '
520                         Hello
521                         $ echo "Hello world" | cut -f 2 -d ' '
522                         world
523                 </screen>
524                 </para>
525         </sect1>
526
527         <sect1 id="date">
528             <title>date</title>
529
530                 <para>
531                 Usage: date [OPTION]... [+FORMAT]
532                 </para>
533
534                 <para>
535                 <screen>
536                   or:  date [OPTION] [MMDDhhmm[[CC]YY][.ss]]
537                 </screen>
538                 </para>
539
540                 <para>
541                 Display the current time in the given FORMAT, or set the system date.
542                 </para>
543
544                 <para>
545                 Options:
546                 </para>
547
548                 <para>
549                 <screen>
550                         -R      Output RFC-822 compliant date string
551                         -s      Set time described by STRING
552                         -u      Print or set Coordinated Universal Time
553                 </screen>
554                 </para>
555
556                 <para>
557                 Example:
558                 </para>
559
560                 <para>
561                 <screen>
562                         $ date
563                         Wed Apr 12 18:52:41 MDT 2000
564                 </screen>
565                 </para>
566         </sect1>
567
568         <sect1 id="dc">
569             <title>dc</title>
570
571                 <para>
572                 Usage: dc [EXPRESSION]
573                 </para>
574
575                 <para>
576                 This is a Tiny RPN calculator that understands the
577                 following operations: +, -, /, *, and, or, not, eor. If
578                 no arguments are given, dc will process input from
579                 stdin.
580                 </para>
581
582                 <para>
583                 The behaviour of BusyBox/dc deviates (just a little ;-)
584                 from GNU/dc, but this will be remedied in the future.
585                 </para>
586
587                 <para>
588                 Example:
589                 </para>
590
591                 <para>
592                 <screen>
593                         $ dc 2 2 +
594                         4
595                         $ dc 8 8 \* 2 2 + /
596                         16
597                         $ dc 0 1 and
598                         0
599                         $ dc 0 1 or
600                         1
601                         $ echo 72 9 div 8 mul | dc
602                         64
603                 </screen>
604                 </para>
605         </sect1>
606
607         <sect1 id="dd">
608             <title>dd</title>
609
610                 <para>
611                 Usage: dd [OPTION]...
612                 </para>
613
614                 <para>
615                 Copy a file, converting and formatting according to
616                 options.
617                 </para>
618
619                 <para>
620                 Options:
621                 </para>
622
623                 <para>
624                 <screen>
625                         if=FILE Read from FILE instead of stdin
626                         of=FILE Write to FILE instead of stdout
627                         bs=N    Read and write N bytes at a time
628                         count=N Copy only N input blocks
629                         skip=N  Skip N input blocks
630                         seek=N  Skip N output blocks
631                 </screen>
632                 </para>
633
634                 <para>
635                 Numbers may be suffixed by w (x2), k (x1024), b (x512),
636                 or M (x1024^2).
637                 </para>
638
639                 <para>
640                 Example:
641                 </para>
642
643                 <para>
644                 <screen>
645                         $ dd if=/dev/zero of=/dev/ram1 bs=1M count=4
646                         4+0 records in
647                         4+0 records out
648                 </screen>
649                 </para>
650         </sect1>
651
652         <sect1 id="deallocvt">
653             <title>deallocvt</title>
654
655                 <para>
656                 Usage: deallocvt N
657                 </para>
658
659                 <para>
660                 Deallocate unused virtual terminal /dev/ttyN.
661                 </para>
662         </sect1>
663
664         <sect1 id="df">
665             <title>df</title>
666
667                 <para>
668                 Usage: df [FILE]...
669                 </para>
670
671                 <para>
672                 Print the filesystem space used and space available.
673                 </para>
674
675                 <para>
676                 Example:
677                 </para>
678
679                 <para>
680                 <screen>
681                         $ df
682                         Filesystem           1k-blocks      Used Available Use% Mounted on
683                         /dev/sda3              8690864   8553540    137324  98% /
684                         /dev/sda1                64216     36364     27852  57% /boot
685                         $ df /dev/sda3
686                         Filesystem           1k-blocks      Used Available Use% Mounted on
687                         /dev/sda3              8690864   8553540    137324  98% /
688                 </screen>
689                 </para>
690         </sect1>
691         
692         <sect1 id="dirname">
693             <title>dirname</title>
694
695                 <para>
696                 Usage: dirname NAME
697                 </para>
698
699                 <para>
700                 Strip non-directory suffix from NAME.
701                 </para>
702
703                 <para>
704                 Example:
705                 </para>
706
707                 <para>
708                 <screen>
709                         $ dirname /tmp/foo
710                         /tmp
711                         $ dirname /tmp/foo/
712                         /tmp
713                 </screen>
714                 </para>
715         </sect1>
716
717         <sect1 id="dmesg">
718             <title>dmesg</title>
719
720                 <para>
721                 Usage: dmesg [OPTION]...
722                 </para>
723
724                 <para>
725                 Print or control the kernel ring buffer.
726                 </para>
727
728                 <para>
729                 Options:
730                 </para>
731
732                 <para>
733                 <screen>
734                         -c              Clear the ring buffer after printing
735                         -n LEVEL        Set the console logging level to LEVEL
736                         -s BUFSIZE      Query ring buffer using a buffer of BUFSIZE
737                 </screen>
738                 </para>
739         </sect1>
740
741         <sect1 id="du">
742             <title>du</title>
743
744                 <para>
745                 Usage: du [OPTION]... [FILE]...
746                 </para>
747
748                 <para>
749                 Summarize the disk space used for each FILE or current
750                 directory.  Disk space printed in units of 1k (i.e.
751                 1024 bytes).
752                 </para>
753
754                 <para>
755                 Options:
756                 </para>
757
758                 <para>
759                 <screen>
760                         -l      Count sizes many times if hard linked
761                         -s      Display only a total for each argument
762                 </screen>
763                 </para>
764
765                 <para>
766                 Example:
767                 </para>
768
769                 <para>
770                 <screen>
771                         $ du
772                         16      ./CVS
773                         12      ./kernel-patches/CVS
774                         80      ./kernel-patches
775                         12      ./tests/CVS
776                         36      ./tests
777                         12      ./scripts/CVS
778                         16      ./scripts
779                         12      ./docs/CVS
780                         104     ./docs
781                         2417    .
782                 </screen>
783                 </para>
784         </sect1>
785
786         <sect1 id="dutmp">
787             <title>dutmp</title>
788
789                 <para>
790                 Usage: dutmp [FILE]
791                 </para>
792
793                 <para>
794                 Dump utmp file format (pipe delimited) from FILE or
795                 stdin to stdout.
796                 </para>
797
798                 <para>
799                 Example:
800                 </para>
801
802                 <para>
803                 <screen>
804                         $ dutmp /var/run/utmp
805                         8|7||si|||0|0|0|955637625|760097|0
806                         2|0|~|~~|reboot||0|0|0|955637625|782235|0
807                         1|20020|~|~~|runlevel||0|0|0|955637625|800089|0
808                         8|125||l4|||0|0|0|955637629|998367|0
809                         6|245|tty1|1|LOGIN||0|0|0|955637630|998974|0
810                         6|246|tty2|2|LOGIN||0|0|0|955637630|999498|0
811                         7|336|pts/0|vt00andersen|andersen|:0.0|0|0|0|955637763|0|0
812                 </screen>
813                 </para>
814         </sect1>
815
816         <sect1 id="echo">
817             <title>echo</title>
818
819                 <para>
820                 Usage: echo [OPTION]... [ARG]...
821                 </para>
822
823                 <para>
824                 Print ARGs to stdout.
825                 </para>
826
827                 <para>
828                 Options:
829                 </para>
830
831                 <para>
832                 <screen>
833                         -n      Suppress trailing newline
834                         -e      Enable interpretation of escaped characters
835                         -E      Disable interpretation of escaped characters
836                 </screen>
837                 </para>
838
839                 <para>
840                 Example:
841                 </para>
842
843                 <para>
844                 <screen>
845                         $ echo "Erik is cool"
846                         Erik is cool
847                         $ echo -e "Erik\nis\ncool"
848                         Erik
849                         is
850                         cool
851                         $ echo "Erik\nis\ncool"
852                         Erik\nis\ncool
853                 </screen>
854                 </para>
855         </sect1>
856
857         <sect1 id="false">
858             <title>false</title>
859
860                 <para>
861                 Usage: false
862                 </para>
863
864                 <para>
865                 Returns an exit code of FALSE (1).
866                 </para>
867
868                 <para>
869                 Example:
870                 </para>
871
872                 <para>
873                 <screen>
874                         $ false
875                         $ echo $?
876                         1
877                 </screen>
878                 </para>
879         </sect1>
880
881 <!-- This is where I have stopped formatting stuff -->
882 <varlistentry><term><emphasis>fbset
883
884 </emphasis></term>
885 <listitem><para></para>
886
887 <para>
888 Usage: fbset [options] [mode]
889
890
891 </para>
892
893 <para>
894 Show and modify frame buffer device settings
895
896
897 </para>
898
899 <para>
900 Options:
901
902
903 </para>
904
905 <para>
906 <screen>
907         -h
908         -fb
909         -db
910         -a
911         -i
912         -g
913         -t
914         -accel
915         -hsync
916         -vsync
917         -laced
918         -double
919 </screen>
920
921
922 </para>
923
924 <para>
925 Example:
926
927
928 </para>
929
930 <para>
931 <screen>
932         $ fbset
933         mode "1024x768-76"
934                         # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
935                         geometry 1024 768 1024 768 16
936                         timings 12714 128 32 16 4 128 4
937                         accel false
938                         rgba 5/11,6/5,5/0,0/0
939         endmode
940 </screen>
941
942
943 </para>
944
945 <para>
946 -------------------------------
947
948
949 </para>
950
951 </listitem></varlistentry>
952 <varlistentry><term><emphasis>fdflush
953
954 </emphasis></term>
955 <listitem><para></para>
956
957 <para>
958 Usage: fdflush device
959
960
961 </para>
962
963 <para>
964 Force floppy disk drive to detect disk change
965
966
967 </para>
968
969 <para>
970 -------------------------------
971
972
973 </para>
974
975 </listitem></varlistentry>
976 <varlistentry><term><emphasis>find
977
978 </emphasis></term>
979 <listitem><para></para>
980
981 <para>
982 Usage: find [PATH...] [EXPRESSION]
983
984
985 </para>
986
987 <para>
988 Search for files in a directory hierarchy. The default PATH is the current
989 directory; default EXPRESSION is '-print'
990
991
992 </para>
993
994 <para>
995 EXPRESSION may consist of:
996
997
998 </para>
999
1000 <para>
1001 <screen>
1002         -follow                 Dereference symbolic links.
1003         -name PATTERN   File name (leading directories removed) matches PATTERN.
1004         -print                  print the full file name followed by a newline to stdout.
1005 </screen>
1006
1007
1008 </para>
1009
1010 <para>
1011 Example:
1012
1013
1014 </para>
1015
1016 <para>
1017 <screen>
1018         $ find / -name /etc/passwd
1019         /etc/passwd
1020 </screen>
1021
1022
1023 </para>
1024
1025 <para>
1026 -------------------------------
1027
1028
1029 </para>
1030
1031 </listitem></varlistentry>
1032 <varlistentry><term><emphasis>free
1033
1034 </emphasis></term>
1035 <listitem><para></para>
1036
1037 <para>
1038 Usage: free
1039
1040
1041 </para>
1042
1043 <para>
1044 Displays the amount of free and used system memory.
1045
1046
1047 </para>
1048
1049 <para>
1050 Example:
1051
1052
1053 </para>
1054
1055 <para>
1056 <screen>
1057         $ free
1058                                   total         used         free       shared      buffers
1059           Mem:       257628       248724         8904        59644        93124
1060          Swap:       128516         8404       120112
1061         Total:       386144       257128       129016
1062 </screen>
1063
1064
1065 </para>
1066
1067 <para>
1068 -------------------------------
1069
1070
1071 </para>
1072
1073 </listitem></varlistentry>
1074 <varlistentry><term><emphasis>freeramdisk
1075
1076 </emphasis></term>
1077 <listitem><para></para>
1078
1079 <para>
1080 Usage: freeramdisk DEVICE
1081
1082
1083 </para>
1084
1085 <para>
1086 Frees all memory used by the specified ramdisk.
1087
1088
1089 </para>
1090
1091 <para>
1092 Example:
1093
1094
1095 </para>
1096
1097 <para>
1098 <screen>
1099         $ freeramdisk /dev/ram2
1100 </screen>
1101
1102
1103 </para>
1104
1105 <para>
1106 -------------------------------
1107
1108
1109 </para>
1110
1111 </listitem></varlistentry>
1112 <varlistentry><term><emphasis>fsck.minix
1113
1114 </emphasis></term>
1115 <listitem><para></para>
1116
1117 <para>
1118 Usage: fsck.minix [<emphasis>-larvsmf</emphasis>] /dev/name
1119
1120
1121 </para>
1122
1123 <para>
1124 Performs a consistency check for MINIX filesystems.
1125
1126
1127 </para>
1128
1129 <para>
1130 OPTIONS:
1131
1132
1133 </para>
1134
1135 <para>
1136 <screen>
1137         -l      Lists all filenames
1138         -r      Perform interactive repairs
1139         -a      Perform automatic repairs
1140         -v      verbose
1141         -s      Outputs super-block information
1142         -m      Activates MINIX-like "mode not cleared" warnings
1143         -f      Force file system check.
1144 </screen>
1145
1146
1147 </para>
1148
1149 <para>
1150 -------------------------------
1151
1152
1153 </para>
1154
1155 </listitem></varlistentry>
1156 <varlistentry><term><emphasis>grep
1157
1158 </emphasis></term>
1159 <listitem><para></para>
1160
1161 <para>
1162 Usage: grep [OPTIONS]... PATTERN [FILE]...
1163
1164
1165 </para>
1166
1167 <para>
1168 Search for PATTERN in each FILE or standard input.
1169
1170
1171 </para>
1172
1173 <para>
1174 OPTIONS:
1175
1176
1177 </para>
1178
1179 <para>
1180 <screen>
1181         -h      suppress the prefixing filename on output
1182         -i      ignore case distinctions
1183         -n      print line number with output lines
1184         -q      be quiet. Returns 0 if result was found, 1 otherwise
1185         -v      select non-matching lines
1186 </screen>
1187
1188
1189 </para>
1190
1191 <para>
1192 This version of grep matches full regular expressions.
1193
1194
1195 </para>
1196
1197 <para>
1198 Example:
1199
1200
1201 </para>
1202
1203 <para>
1204 <screen>
1205         $ grep root /etc/passwd
1206         root:x:0:0:root:/root:/bin/bash
1207         $ grep ^[rR]oo. /etc/passwd
1208         root:x:0:0:root:/root:/bin/bash
1209 </screen>
1210
1211
1212 </para>
1213
1214 <para>
1215 -------------------------------
1216
1217
1218 </para>
1219
1220 </listitem></varlistentry>
1221 <varlistentry><term><emphasis>gunzip
1222
1223 </emphasis></term>
1224 <listitem><para></para>
1225
1226 <para>
1227 Usage: gunzip [OPTION]... FILE
1228
1229
1230 </para>
1231
1232 <para>
1233 Uncompress FILE (or standard input if FILE is '-').
1234
1235
1236 </para>
1237
1238 <para>
1239 Options:
1240
1241
1242 </para>
1243
1244 <para>
1245 <screen>
1246         -c      Write output to standard output
1247         -t      Test compressed file integrity
1248 </screen>
1249
1250
1251 </para>
1252
1253 <para>
1254 Example:
1255
1256
1257 </para>
1258
1259 <para>
1260 <screen>
1261         $ ls -la /tmp/BusyBox*
1262         -rw-rw-r--    1 andersen andersen   557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz
1263         $ gunzip /tmp/BusyBox-0.43.tar.gz
1264         $ ls -la /tmp/BusyBox*
1265         -rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1266 </screen>
1267
1268
1269 </para>
1270
1271 <para>
1272 -------------------------------
1273
1274
1275 </para>
1276
1277 </listitem></varlistentry>
1278 <varlistentry><term><emphasis>gzip
1279
1280 </emphasis></term>
1281 <listitem><para></para>
1282
1283 <para>
1284 Usage: gzip [OPTION]... FILE
1285
1286
1287 </para>
1288
1289 <para>
1290 Compress FILE with maximum compression. When FILE is '-', reads standard
1291 input. Implies <emphasis>-c</emphasis>.
1292
1293
1294 </para>
1295
1296 <para>
1297 Options:
1298
1299
1300 </para>
1301
1302 <para>
1303 <screen>
1304         -c      Write output to standard output instead of FILE.gz
1305 </screen>
1306
1307
1308 </para>
1309
1310 <para>
1311 Example:
1312
1313
1314 </para>
1315
1316 <para>
1317 <screen>
1318         $ ls -la /tmp/BusyBox*
1319         -rw-rw-r--    1 andersen andersen  1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar
1320         $ gzip /tmp/BusyBox-0.43.tar
1321         $ ls -la /tmp/BusyBox*
1322         -rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/BusyBox-0.43.tar.gz
1323 </screen>
1324
1325
1326 </para>
1327
1328 <para>
1329 -------------------------------
1330
1331
1332 </para>
1333
1334 </listitem></varlistentry>
1335 <varlistentry><term><emphasis>halt
1336
1337 </emphasis></term>
1338 <listitem><para></para>
1339
1340 <para>
1341 Usage: halt
1342
1343
1344 </para>
1345
1346 <para>
1347 This command halts the system.
1348
1349
1350 </para>
1351
1352 <para>
1353 -------------------------------
1354
1355
1356 </para>
1357
1358 </listitem></varlistentry>
1359 <varlistentry><term><emphasis>head
1360
1361 </emphasis></term>
1362 <listitem><para></para>
1363
1364 <para>
1365 Usage: head [OPTION] [FILE]...
1366
1367
1368 </para>
1369
1370 <para>
1371 Print first 10 lines of each FILE to standard output. With more than one
1372 FILE, precede each with a header giving the file name. With no FILE, or
1373 when FILE is -, read standard input.
1374
1375
1376 </para>
1377
1378 <para>
1379 Options:
1380
1381
1382 </para>
1383
1384 <para>
1385 <screen>
1386         -n NUM          Print first NUM lines instead of first 10
1387 </screen>
1388
1389
1390 </para>
1391
1392 <para>
1393 Example:
1394
1395
1396 </para>
1397
1398 <para>
1399 <screen>
1400         $ head -n 2 /etc/passwd
1401         root:x:0:0:root:/root:/bin/bash
1402         daemon:x:1:1:daemon:/usr/sbin:/bin/sh
1403 </screen>
1404
1405
1406 </para>
1407
1408 <para>
1409 -------------------------------
1410
1411
1412 </para>
1413
1414 </listitem></varlistentry>
1415 <varlistentry><term><emphasis>hostid
1416
1417 </emphasis></term>
1418 <listitem><para></para>
1419
1420 <para>
1421 Usage: hostid
1422
1423
1424 </para>
1425
1426 <para>
1427 Prints out a unique 32-bit identifier for the current machine. The 32-bit
1428 identifier is intended to be unique among all UNIX systems in existence. 
1429
1430
1431 </para>
1432
1433 <para>
1434 -------------------------------
1435
1436
1437 </para>
1438
1439 </listitem></varlistentry>
1440 <varlistentry><term><emphasis>hostname
1441
1442 </emphasis></term>
1443 <listitem><para></para>
1444
1445 <para>
1446 Usage: hostname [OPTION] {hostname | <emphasis>-F</emphasis> file}
1447
1448
1449 </para>
1450
1451 <para>
1452 Get or set the hostname or DNS domain name. If a hostname is given (or a
1453 file with the <emphasis>-F</emphasis> parameter), the host name will be set.
1454
1455
1456 </para>
1457
1458 <para>
1459 Options:
1460
1461
1462 </para>
1463
1464 <para>
1465 <screen>
1466         -s              Short
1467         -i              Addresses for the hostname
1468         -d              DNS domain name
1469         -F FILE         Use the contents of FILE to specify the hostname
1470 </screen>
1471
1472
1473 </para>
1474
1475 <para>
1476 Example:
1477
1478
1479 </para>
1480
1481 <para>
1482 <screen>
1483         $ hostname
1484         slag 
1485 </screen>
1486
1487
1488 </para>
1489
1490 <para>
1491 -------------------------------
1492
1493
1494 </para>
1495
1496 </listitem></varlistentry>
1497 <varlistentry><term><emphasis>id
1498
1499 </emphasis></term>
1500 <listitem><para></para>
1501
1502 <para>
1503 Print information for USERNAME or the current user
1504
1505
1506 </para>
1507
1508 <para>
1509 Options:
1510
1511
1512 </para>
1513
1514 <para>
1515 <screen>
1516         -g      prints only the group ID
1517         -u      prints only the user ID
1518         -r      prints the real user ID instead of the effective ID (with -ug)
1519 </screen>
1520
1521
1522 </para>
1523
1524 <para>
1525 Example:
1526
1527
1528 </para>
1529
1530 <para>
1531 <screen>
1532         $ id
1533         uid=1000(andersen) gid=1000(andersen)
1534 </screen>
1535
1536
1537 </para>
1538
1539 <para>
1540 -------------------------------
1541
1542
1543 </para>
1544
1545 </listitem></varlistentry>
1546 <varlistentry><term><emphasis>init
1547
1548 </emphasis></term>
1549 <listitem><para></para>
1550
1551 <para>
1552 Usage: init
1553
1554
1555 </para>
1556
1557 <para>
1558 Init is the parent of all processes.
1559
1560
1561 </para>
1562
1563 <para>
1564 This version of init is designed to be run only by the kernel.
1565
1566
1567 </para>
1568
1569 <para>
1570 BusyBox init doesn't support multiple runlevels. The runlevels field of the
1571 /etc/inittab file is completely ignored by BusyBox init. If you want
1572 runlevels, use sysvinit.
1573
1574
1575 </para>
1576
1577 <para>
1578 BusyBox init works just fine without an inittab. If no inittab is found, it
1579 has the following default behavior:
1580
1581
1582 </para>
1583
1584 <para>
1585 <screen>
1586         ::sysinit:/etc/init.d/rcS
1587         ::askfirst:/bin/sh
1588 </screen>
1589
1590
1591 </para>
1592
1593 <para>
1594 if it detects that /dev/console is _not_ a serial console, it will also
1595 run:
1596
1597
1598 </para>
1599
1600 <para>
1601 <screen>
1602         tty2::askfirst:/bin/sh
1603 </screen>
1604
1605
1606 </para>
1607
1608 <para>
1609 If you choose to use an /etc/inittab file, the inittab entry format is as
1610 follows:
1611
1612
1613 </para>
1614
1615 <para>
1616 <screen>
1617         &lt;id&gt;:&lt;runlevels&gt;:&lt;action&gt;:&lt;process&gt;
1618 </screen>
1619
1620
1621 </para>
1622
1623 <para>
1624 <screen>
1625         &lt;id&gt;: 
1626 </screen>
1627
1628
1629 </para>
1630
1631 <para>
1632 <screen>
1633                 WARNING: This field has a non-traditional meaning for BusyBox init!
1634                 The id field is used by BusyBox init to specify the controlling tty for
1635                 the specified process to run on.  The contents of this field are
1636                 appended to "/dev/" and used as-is.  There is no need for this field to
1637                 be unique, although if it isn't you may have strange results.  If this
1638                 field is left blank, it is completely ignored.  Also note that if
1639                 BusyBox detects that a serial console is in use, then all entries
1640                 containing non-empty id fields will _not_ be run.  BusyBox init does
1641                 nothing with utmp.  We don't need no stinkin' utmp.
1642 </screen>
1643
1644
1645 </para>
1646
1647 <para>
1648 <screen>
1649         &lt;runlevels&gt;: 
1650 </screen>
1651
1652
1653 </para>
1654
1655 <para>
1656 <screen>
1657                 The runlevels field is completely ignored.
1658 </screen>
1659
1660
1661 </para>
1662
1663 <para>
1664 <screen>
1665         &lt;action&gt;: 
1666 </screen>
1667
1668
1669 </para>
1670
1671 <para>
1672 <screen>
1673                 Valid actions include: sysinit, respawn, askfirst, wait, 
1674                 once, and ctrlaltdel.
1675 </screen>
1676
1677
1678 </para>
1679
1680 <para>
1681 <screen>
1682                 askfirst acts just like respawn, but before running the specified
1683                 process it displays the line "Please press Enter to activate this
1684                 console." and then waits for the user to press enter before starting
1685                 the specified process.
1686 </screen>
1687
1688
1689 </para>
1690
1691 <para>
1692 <screen>
1693                 Unrecognized actions (like initdefault) will cause init to emit
1694                 an error message, and then go along with its business.
1695 </screen>
1696
1697
1698 </para>
1699
1700 <para>
1701 <screen>
1702         &lt;process&gt;: 
1703 </screen>
1704
1705
1706 </para>
1707
1708 <para>
1709 <screen>
1710                 Specifies the process to be executed and it's command line.
1711 </screen>
1712
1713
1714 </para>
1715
1716 <para>
1717 Example /etc/inittab file:
1718
1719
1720 </para>
1721
1722 <para>
1723 <screen>
1724         # This is run first except when booting in single-user mode.
1725         #
1726         ::sysinit:/etc/init.d/rcS
1727 </screen>
1728
1729
1730 </para>
1731
1732 <para>
1733 <screen>
1734         # /bin/sh invocations on selected ttys
1735         #
1736         # Start an "askfirst" shell on the console (whatever that may be)
1737         ::askfirst:/bin/sh
1738         # Start an "askfirst" shell on /dev/tty2
1739         tty2::askfirst:/bin/sh
1740 </screen>
1741
1742
1743 </para>
1744
1745 <para>
1746 <screen>
1747         # /sbin/getty invocations for selected ttys
1748         #
1749         tty4::respawn:/sbin/getty 38400 tty4
1750         tty5::respawn:/sbin/getty 38400 tty5
1751 </screen>
1752
1753
1754 </para>
1755
1756 <para>
1757 <screen>
1758         # Example of how to put a getty on a serial line (for a terminal)
1759         #
1760         #ttyS0::respawn:/sbin/getty -L ttyS0 9600 vt100
1761         #ttyS1::respawn:/sbin/getty -L ttyS1 9600 vt100
1762         #
1763         # Example how to put a getty on a modem line.
1764         #ttyS2::respawn:/sbin/getty -x0 -s 57600 ttyS2
1765 </screen>
1766
1767
1768 </para>
1769
1770 <para>
1771 <screen>
1772         # Stuff to do before rebooting
1773         ::ctrlaltdel:/bin/umount -a -r &gt; /dev/null 2&gt;&amp;1
1774         ::ctrlaltdel:/sbin/swapoff -a &gt; /dev/null 2&gt;&amp;1
1775 </screen>
1776
1777
1778 </para>
1779
1780 <para>
1781 -------------------------------
1782
1783
1784 </para>
1785
1786 </listitem></varlistentry>
1787 <varlistentry><term><emphasis>insmod
1788
1789 </emphasis></term>
1790 <listitem><para></para>
1791
1792 <para>
1793 Usage: insmod [OPTION]... MODULE [symbol=value]...
1794
1795
1796 </para>
1797
1798 <para>
1799 Loads the specified kernel modules into the kernel.
1800
1801
1802 </para>
1803
1804 <para>
1805 Options:
1806
1807
1808 </para>
1809
1810 <para>
1811 <screen>
1812                 -f      Force module to load into the wrong kernel version.
1813                 -k      Make module autoclean-able.
1814                 -v      verbose output
1815                 -x      do not export externs
1816 </screen>
1817
1818
1819 </para>
1820
1821 <para>
1822 -------------------------------
1823
1824
1825 </para>
1826
1827 </listitem></varlistentry>
1828 <varlistentry><term><emphasis>kill
1829
1830 </emphasis></term>
1831 <listitem><para></para>
1832
1833 <para>
1834 Usage: kill [<emphasis>-signal</emphasis>] process-id [process-id ...]
1835
1836
1837 </para>
1838
1839 <para>
1840 Send a signal (default is SIGTERM) to the specified
1841 <literal>process(es).</literal>
1842
1843
1844 </para>
1845
1846 <para>
1847 Options:
1848
1849
1850 </para>
1851
1852 <para>
1853 <screen>
1854         -l      List all signal names and numbers.
1855 </screen>
1856
1857
1858 </para>
1859
1860 <para>
1861 Example:
1862
1863
1864 </para>
1865
1866 <para>
1867 <screen>
1868         $ ps | grep apache
1869         252 root     root     S [apache]
1870         263 www-data www-data S [apache]
1871         264 www-data www-data S [apache]
1872         265 www-data www-data S [apache]
1873         266 www-data www-data S [apache]
1874         267 www-data www-data S [apache]
1875         $ kill 252
1876 </screen>
1877
1878
1879 </para>
1880
1881 <para>
1882 -------------------------------
1883
1884
1885 </para>
1886
1887 </listitem></varlistentry>
1888 <varlistentry><term><emphasis>killall
1889
1890 </emphasis></term>
1891 <listitem><para></para>
1892
1893 <para>
1894 Usage: killall [<emphasis>-signal</emphasis>] process-name [process-name ...]
1895
1896
1897 </para>
1898
1899 <para>
1900 Send a signal (default is SIGTERM) to the specified
1901 <literal>process(es).</literal>
1902
1903
1904 </para>
1905
1906 <para>
1907 Options:
1908
1909
1910 </para>
1911
1912 <para>
1913 <screen>
1914         -l      List all signal names and numbers.
1915 </screen>
1916
1917
1918 </para>
1919
1920 <para>
1921 Example:
1922
1923
1924 </para>
1925
1926 <para>
1927 <screen>
1928         $ killall apache
1929 </screen>
1930
1931
1932 </para>
1933
1934 <para>
1935 -------------------------------
1936
1937
1938 </para>
1939
1940 </listitem></varlistentry>
1941 <varlistentry><term><emphasis>length
1942
1943 </emphasis></term>
1944 <listitem><para></para>
1945
1946 <para>
1947 Usage: length STRING
1948
1949
1950 </para>
1951
1952 <para>
1953 Prints out the length of the specified STRING.
1954
1955
1956 </para>
1957
1958 <para>
1959 Example:
1960
1961
1962 </para>
1963
1964 <para>
1965 <screen>
1966         $ length "Hello"
1967         5
1968 </screen>
1969
1970
1971 </para>
1972
1973 <para>
1974 -------------------------------
1975
1976
1977 </para>
1978
1979 </listitem></varlistentry>
1980 <varlistentry><term><emphasis>ln
1981
1982 </emphasis></term>
1983 <listitem><para></para>
1984
1985 <para>
1986 Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY
1987
1988
1989 </para>
1990
1991 <para>
1992 Create a link named LINK_NAME or DIRECTORY to the specified TARGET You may
1993 use '--' to indicate that all following arguments are non-options.
1994
1995
1996 </para>
1997
1998 <para>
1999 Options:
2000
2001
2002 </para>
2003
2004 <para>
2005 <screen>
2006         -s      make symbolic links instead of hard links
2007         -f      remove existing destination files
2008 </screen>
2009
2010
2011 </para>
2012
2013 <para>
2014 Example:
2015
2016
2017 </para>
2018
2019 <para>
2020 <screen>
2021     $ ln -s BusyBox /tmp/ls
2022     $ ls -l /tmp/ls
2023     lrwxrwxrwx    1 root     root            7 Apr 12 18:39 ls -&gt; BusyBox*
2024 </screen>
2025
2026
2027 </para>
2028
2029 <para>
2030 -------------------------------
2031
2032
2033 </para>
2034
2035 </listitem></varlistentry>
2036 <varlistentry><term><emphasis>loadacm
2037
2038 </emphasis></term>
2039 <listitem><para></para>
2040
2041 <para>
2042 Usage: loadacm
2043
2044
2045 </para>
2046
2047 <para>
2048 Loads an acm from standard input.
2049
2050
2051 </para>
2052
2053 <para>
2054 Example:
2055
2056
2057 </para>
2058
2059 <para>
2060 <screen>
2061         $ loadacm &lt; /etc/i18n/acmname
2062 </screen>
2063
2064
2065 </para>
2066
2067 <para>
2068 -------------------------------
2069
2070
2071 </para>
2072
2073 </listitem></varlistentry>
2074 <varlistentry><term><emphasis>loadfont
2075
2076 </emphasis></term>
2077 <listitem><para></para>
2078
2079 <para>
2080 Usage: loadfont
2081
2082
2083 </para>
2084
2085 <para>
2086 Loads a console font from standard input.
2087
2088
2089 </para>
2090
2091 <para>
2092 Example:
2093
2094
2095 </para>
2096
2097 <para>
2098 <screen>
2099         $ loadfont &lt; /etc/i18n/fontname
2100 </screen>
2101
2102
2103 </para>
2104
2105 <para>
2106 -------------------------------
2107
2108
2109 </para>
2110
2111 </listitem></varlistentry>
2112 <varlistentry><term><emphasis>loadkmap
2113
2114 </emphasis></term>
2115 <listitem><para></para>
2116
2117 <para>
2118 Usage: loadkmap
2119
2120
2121 </para>
2122
2123 <para>
2124 Loads a binary keyboard translation table from standard input.
2125
2126
2127 </para>
2128
2129 <para>
2130 Example:
2131
2132
2133 </para>
2134
2135 <para>
2136 <screen>
2137         $ loadkmap &lt; /etc/i18n/lang-keymap
2138 </screen>
2139
2140
2141 </para>
2142
2143 <para>
2144 -------------------------------
2145
2146
2147 </para>
2148
2149 </listitem></varlistentry>
2150 <varlistentry><term><emphasis>logger
2151
2152 </emphasis></term>
2153 <listitem><para></para>
2154
2155 <para>
2156 Usage: logger [OPTION]... [MESSAGE]
2157
2158
2159 </para>
2160
2161 <para>
2162 Write MESSAGE to the system log. If MESSAGE is '-', log stdin.
2163
2164
2165 </para>
2166
2167 <para>
2168 Options:
2169
2170
2171 </para>
2172
2173 <para>
2174 <screen>
2175         -s      Log to stderr as well as the system log.
2176         -t      Log using the specified tag (defaults to user name).
2177         -p      Enter the message with the specified priority.
2178                 This may be numerical or a ``facility.level'' pair.
2179 </screen>
2180
2181
2182 </para>
2183
2184 <para>
2185 Example:
2186
2187
2188 </para>
2189
2190 <para>
2191 <screen>
2192                 $ logger "hello"
2193 </screen>
2194
2195
2196 </para>
2197
2198 <para>
2199 -------------------------------
2200
2201
2202 </para>
2203
2204 </listitem></varlistentry>
2205 <varlistentry><term><emphasis>logname
2206
2207 </emphasis></term>
2208 <listitem><para></para>
2209
2210 <para>
2211 Usage: logname
2212
2213
2214 </para>
2215
2216 <para>
2217 Print the name of the current user.
2218
2219
2220 </para>
2221
2222 <para>
2223 Example:
2224
2225
2226 </para>
2227
2228 <para>
2229 <screen>
2230         $ logname
2231         root
2232 </screen>
2233
2234
2235 </para>
2236
2237 <para>
2238 -------------------------------
2239
2240
2241 </para>
2242
2243 </listitem></varlistentry>
2244 <varlistentry><term><emphasis>ls
2245
2246 </emphasis></term>
2247 <listitem><para></para>
2248
2249 <para>
2250 Usage: ls [<emphasis>-1acdelnpuxACFR</emphasis>] [filenames...]
2251
2252
2253 </para>
2254
2255 <para>
2256 Options:
2257
2258
2259 </para>
2260
2261 <para>
2262 <screen>
2263         -a      do not hide entries starting with .
2264         -c      with  -l:  show ctime (the time of last
2265                 modification of file status information)
2266         -d      list directory entries instead of contents
2267         -e      list both full date and full time
2268         -l      use a long listing format
2269         -n      list numeric UIDs and GIDs instead of names
2270         -p      append indicator (one of /=@|) to entries
2271         -u      with -l: show access time (the time of last
2272                 access of the file)
2273         -x      list entries by lines instead of by columns
2274         -A      do not list implied . and ..
2275         -C      list entries by columns
2276         -F      append indicator (one of */=@|) to entries
2277         -R  list subdirectories recursively
2278 </screen>
2279
2280
2281 </para>
2282
2283 <para>
2284 -------------------------------
2285
2286
2287 </para>
2288
2289 </listitem></varlistentry>
2290 <varlistentry><term><emphasis>lsmod
2291
2292 </emphasis></term>
2293 <listitem><para></para>
2294
2295 <para>
2296 Usage: lsmod
2297
2298
2299 </para>
2300
2301 <para>
2302 Shows a list of all currently loaded kernel modules.
2303
2304
2305 </para>
2306
2307 <para>
2308 -------------------------------
2309
2310
2311 </para>
2312
2313 </listitem></varlistentry>
2314 <varlistentry><term><emphasis>makedevs
2315
2316 </emphasis></term>
2317 <listitem><para></para>
2318
2319 <para>
2320 Usage: makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]
2321
2322
2323 </para>
2324
2325 <para>
2326 Creates a range of block or character special files
2327
2328
2329 </para>
2330
2331 <para>
2332 TYPEs include:
2333
2334
2335 </para>
2336
2337 <para>
2338 <screen>
2339         b:      Make a block (buffered) device.
2340         c or u: Make a character (un-buffered) device.
2341         p:      Make a named pipe. MAJOR and MINOR are ignored for named pipes.
2342 </screen>
2343
2344
2345 </para>
2346
2347 <para>
2348 FIRST specifies the number appended to NAME to create the first device.
2349 LAST specifies the number of the last item that should be created. If 's'
2350 is the last argument, the base device is created as well.
2351
2352
2353 </para>
2354
2355 <para>
2356 Example:
2357
2358
2359 </para>
2360
2361 <para>
2362 <screen>
2363         $ makedevs /dev/ttyS c 4 66 2 63
2364         [creates ttyS2-ttyS63]
2365         $ makedevs /dev/hda b 3 0 0 8 s
2366         [creates hda,hda1-hda8]
2367 </screen>
2368
2369
2370 </para>
2371
2372 <para>
2373 -------------------------------
2374
2375
2376 </para>
2377
2378 </listitem></varlistentry>
2379 <varlistentry><term><emphasis>md5sum
2380
2381 </emphasis></term>
2382 <listitem><para></para>
2383
2384 <para>
2385 Usage: md5sum [OPTION] [file ...]
2386
2387
2388 </para>
2389
2390 <para>
2391 Print or check MD5 checksums.
2392
2393
2394 </para>
2395
2396 <para>
2397 Options:
2398
2399
2400 </para>
2401
2402 <para>
2403 <screen>
2404         -b       read files in binary mode
2405         -c       check MD5 sums against given list
2406         -t       read files in text mode (default)
2407         -g       read a string
2408 </screen>
2409
2410
2411 </para>
2412
2413 <para>
2414 The following two options are useful only when verifying checksums:
2415
2416
2417 </para>
2418
2419 <para>
2420 <screen>
2421         -s       don't output anything, status code shows success
2422         -w       warn about improperly formated MD5 checksum lines
2423 </screen>
2424
2425
2426 </para>
2427
2428 <para>
2429 Example:
2430
2431
2432 </para>
2433
2434 <para>
2435 <screen>
2436         $ md5sum busybox
2437         6fd11e98b98a58f64ff3398d7b324003  busybox
2438         $ md5sum -c -
2439         6fd11e98b98a58f64ff3398d7b324003  busybox
2440         busybox: OK
2441         ^D
2442 </screen>
2443
2444
2445 </para>
2446
2447 <para>
2448 -------------------------------
2449
2450
2451 </para>
2452
2453 </listitem></varlistentry>
2454 <varlistentry><term><emphasis>mkdir
2455
2456 </emphasis></term>
2457 <listitem><para></para>
2458
2459 <para>
2460 Usage: mkdir [OPTION] DIRECTORY...
2461
2462
2463 </para>
2464
2465 <para>
2466 Create the <literal>DIRECTORY(ies),</literal> if they do not already exist
2467
2468
2469 </para>
2470
2471 <para>
2472 Options:
2473
2474
2475 </para>
2476
2477 <para>
2478 <screen>
2479         -m      set permission mode (as in chmod), not rwxrwxrwx - umask
2480         -p      no error if directory exists, make parent directories as needed
2481 </screen>
2482
2483
2484 </para>
2485
2486 <para>
2487 Example:
2488
2489
2490 </para>
2491
2492 <para>
2493 <screen>
2494         $ mkdir /tmp/foo
2495         $ mkdir /tmp/foo
2496         /tmp/foo: File exists
2497         $ mkdir /tmp/foo/bar/baz
2498         /tmp/foo/bar/baz: No such file or directory
2499         $ mkdir -p /tmp/foo/bar/baz
2500 </screen>
2501
2502
2503 </para>
2504
2505 <para>
2506 -------------------------------
2507
2508
2509 </para>
2510
2511 </listitem></varlistentry>
2512 <varlistentry><term><emphasis>mkfifo
2513
2514 </emphasis></term>
2515 <listitem><para></para>
2516
2517 <para>
2518 Usage: mkfifo [OPTIONS] name
2519
2520
2521 </para>
2522
2523 <para>
2524 Creates a named pipe (identical to 'mknod name p')
2525
2526
2527 </para>
2528
2529 <para>
2530 Options:
2531
2532
2533 </para>
2534
2535 <para>
2536 <screen>
2537         -m      create the pipe using the specified mode (default a=rw)
2538 </screen>
2539
2540
2541 </para>
2542
2543 <para>
2544 -------------------------------
2545
2546
2547 </para>
2548
2549 </listitem></varlistentry>
2550 <varlistentry><term><emphasis>mkfs.minix
2551
2552 </emphasis></term>
2553 <listitem><para></para>
2554
2555 <para>
2556 Usage: mkfs.minix [<emphasis>-c</emphasis> | <emphasis>-l</emphasis> filename] [<emphasis>-nXX</emphasis>] [<emphasis>-iXX</emphasis>] /dev/name [blocks]
2557
2558
2559 </para>
2560
2561 <para>
2562 Make a MINIX filesystem.
2563
2564
2565 </para>
2566
2567 <para>
2568 OPTIONS:
2569
2570
2571 </para>
2572
2573 <para>
2574 <screen>
2575         -c              Check the device for bad blocks
2576         -n [14|30]      Specify the maximum length of filenames
2577         -i              Specify the number of inodes for the filesystem
2578         -l FILENAME     Read the bad blocks list from FILENAME
2579         -v              Make a Minix version 2 filesystem
2580 </screen>
2581
2582
2583 </para>
2584
2585 <para>
2586 -------------------------------
2587
2588
2589 </para>
2590
2591 </listitem></varlistentry>
2592 <varlistentry><term><emphasis>mknod
2593
2594 </emphasis></term>
2595 <listitem><para></para>
2596
2597 <para>
2598 Usage: mknod [OPTIONS] NAME TYPE MAJOR MINOR
2599
2600
2601 </para>
2602
2603 <para>
2604 Create a special file (block, character, or pipe).
2605
2606
2607 </para>
2608
2609 <para>
2610 Options:
2611
2612
2613 </para>
2614
2615 <para>
2616 <screen>
2617         -m      create the special file using the specified mode (default a=rw)
2618 </screen>
2619
2620
2621 </para>
2622
2623 <para>
2624 TYPEs include: b: Make a block (buffered) device. c or u: Make a character
2625 (un-buffered) device. p: Make a named pipe. MAJOR and MINOR are ignored for
2626 named pipes.
2627
2628
2629 </para>
2630
2631 <para>
2632 Example:
2633
2634
2635 </para>
2636
2637 <para>
2638 <screen>
2639         $ mknod /dev/fd0 b 2 0 
2640         $ mknod -m 644 /tmp/pipe p
2641 </screen>
2642
2643
2644 </para>
2645
2646 <para>
2647 -------------------------------
2648
2649
2650 </para>
2651
2652 </listitem></varlistentry>
2653 <varlistentry><term><emphasis>mkswap
2654
2655 </emphasis></term>
2656 <listitem><para></para>
2657
2658 <para>
2659 Usage: mkswap [<emphasis>-c</emphasis>] [<emphasis>-v0</emphasis>|<emphasis>-v1</emphasis>] device [block-count]
2660
2661
2662 </para>
2663
2664 <para>
2665 Prepare a disk partition to be used as a swap partition.
2666
2667
2668 </para>
2669
2670 <para>
2671 Options:
2672
2673
2674 </para>
2675
2676 <para>
2677 <screen>
2678         -c              Check for read-ability.
2679         -v0             Make version 0 swap [max 128 Megs].
2680         -v1             Make version 1 swap [big!] (default for kernels &gt; 2.1.117).
2681         block-count     Number of block to use (default is entire partition).
2682 </screen>
2683
2684
2685 </para>
2686
2687 <para>
2688 -------------------------------
2689
2690
2691 </para>
2692
2693 </listitem></varlistentry>
2694 <varlistentry><term><emphasis>mktemp
2695
2696 </emphasis></term>
2697 <listitem><para></para>
2698
2699 <para>
2700 Usage: mktemp [<emphasis>-q</emphasis>] TEMPLATE
2701
2702
2703 </para>
2704
2705 <para>
2706 Creates a temporary file with its name based on TEMPLATE. TEMPLATE is any
2707 name with six `Xs' (i.e. /tmp/temp.XXXXXX).
2708
2709
2710 </para>
2711
2712 <para>
2713 Example:
2714
2715
2716 </para>
2717
2718 <para>
2719 <screen>
2720         $ mktemp /tmp/temp.XXXXXX
2721         /tmp/temp.mWiLjM
2722         $ ls -la /tmp/temp.mWiLjM
2723         -rw-------    1 andersen andersen        0 Apr 25 17:10 /tmp/temp.mWiLjM
2724 </screen>
2725
2726
2727 </para>
2728
2729 <para>
2730 -------------------------------
2731
2732
2733 </para>
2734
2735 </listitem></varlistentry>
2736 <varlistentry><term><emphasis>more
2737
2738 </emphasis></term>
2739 <listitem><para></para>
2740
2741 <para>
2742 Usage: more [file ...]
2743
2744
2745 </para>
2746
2747 <para>
2748 More is a filter for paging through text one screenful at a time.
2749
2750
2751 </para>
2752
2753 <para>
2754 Example:
2755
2756
2757 </para>
2758
2759 <para>
2760 <screen>
2761         $ dmesg | more
2762 </screen>
2763
2764
2765 </para>
2766
2767 <para>
2768 -------------------------------
2769
2770
2771 </para>
2772
2773 </listitem></varlistentry>
2774 <varlistentry><term><emphasis>mount
2775
2776 </emphasis></term>
2777 <listitem><para></para>
2778
2779 <para>
2780 Usage: mount [flags] mount [flags] device directory [<emphasis>-o</emphasis> options,more-options]
2781
2782
2783 </para>
2784
2785 <para>
2786 Flags:
2787
2788
2789 </para>
2790
2791 <para>
2792 <screen>
2793         -a:             Mount all file systems in fstab.
2794         -o option:      One of many filesystem options, listed below.
2795         -r:             Mount the filesystem read-only.
2796         -t fs-type:     Specify the filesystem type.
2797         -w:             Mount for reading and writing (default).
2798 </screen>
2799
2800
2801 </para>
2802
2803 <para>
2804 Options for use with the ``<emphasis>-o</emphasis>'' flag:
2805
2806
2807 </para>
2808
2809 <para>
2810 <screen>
2811         async/sync:     Writes are asynchronous / synchronous.
2812         atime/noatime:  Enable / disable updates to inode access times.
2813         dev/nodev:      Allow use of special device files / disallow them.
2814         exec/noexec:    Allow use of executable files / disallow them.
2815         loop:           Mounts a file via loop device.
2816         suid/nosuid:    Allow set-user-id-root programs / disallow them.
2817         remount:        Re-mount a currently-mounted filesystem, changing its flags.
2818         ro/rw:          Mount for read-only / read-write.
2819         There are EVEN MORE flags that are specific to each filesystem.
2820         You'll have to see the written documentation for those.
2821 </screen>
2822
2823
2824 </para>
2825
2826 <para>
2827 Example:
2828
2829
2830 </para>
2831
2832 <para>
2833 <screen>
2834         $ mount
2835         /dev/hda3 on / type minix (rw)
2836         proc on /proc type proc (rw)
2837         devpts on /dev/pts type devpts (rw)
2838         $ mount /dev/fd0 /mnt -t msdos -o ro
2839         $ mount /tmp/diskimage /opt -t ext2 -o loop
2840 </screen>
2841
2842
2843 </para>
2844
2845 <para>
2846 -------------------------------
2847
2848
2849 </para>
2850
2851 </listitem></varlistentry>
2852 <varlistentry><term><emphasis>mt
2853
2854 </emphasis></term>
2855 <listitem><para></para>
2856
2857 <para>
2858 Usage: mt [<emphasis>-f</emphasis> device] opcode value
2859
2860
2861 </para>
2862
2863 <para>
2864 Control magnetic tape drive operation
2865
2866
2867 </para>
2868
2869 <para>
2870 -------------------------------
2871
2872
2873 </para>
2874
2875 </listitem></varlistentry>
2876 <varlistentry><term><emphasis>mv
2877
2878 </emphasis></term>
2879 <listitem><para></para>
2880
2881 <para>
2882 Usage: mv SOURCE DEST
2883
2884
2885 </para>
2886
2887 <para>
2888 <screen>
2889    or: mv SOURCE... DIRECTORY
2890 </screen>
2891
2892
2893 </para>
2894
2895 <para>
2896 Rename SOURCE to DEST, or move <literal>SOURCE(s)</literal> to DIRECTORY.
2897
2898
2899 </para>
2900
2901 <para>
2902 Example:
2903
2904
2905 </para>
2906
2907 <para>
2908 <screen>
2909         $ mv /tmp/foo /bin/bar
2910 </screen>
2911
2912
2913 </para>
2914
2915 <para>
2916 -------------------------------
2917
2918
2919 </para>
2920
2921 </listitem></varlistentry>
2922 <varlistentry><term><emphasis>nc
2923
2924 </emphasis></term>
2925 <listitem><para></para>
2926
2927 <para>
2928 Usage: nc [IP] [port]
2929
2930
2931 </para>
2932
2933 <para>
2934 Netcat opens a pipe to IP:port
2935
2936
2937 </para>
2938
2939 <para>
2940 Example:
2941
2942
2943 </para>
2944
2945 <para>
2946 <screen>
2947         $ nc foobar.somedomain.com 25
2948         220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600
2949         help
2950         214-Commands supported:
2951         214-    HELO EHLO MAIL RCPT DATA AUTH
2952         214     NOOP QUIT RSET HELP
2953         quit
2954         221 foobar closing connection
2955 </screen>
2956
2957
2958 </para>
2959
2960 <para>
2961 -------------------------------
2962
2963
2964 </para>
2965
2966 </listitem></varlistentry>
2967 <varlistentry><term><emphasis>nslookup
2968
2969 </emphasis></term>
2970 <listitem><para></para>
2971
2972 <para>
2973 Usage: nslookup [HOST]
2974
2975
2976 </para>
2977
2978 <para>
2979 Queries the nameserver for the IP address of the given HOST
2980
2981
2982 </para>
2983
2984 <para>
2985 Example:
2986
2987
2988 </para>
2989
2990 <para>
2991 <screen>
2992         $ nslookup localhost
2993         Server:     default
2994         Address:    default
2995 </screen>
2996
2997
2998 </para>
2999
3000 <para>
3001 <screen>
3002         Name:       debian
3003         Address:    127.0.0.1
3004 </screen>
3005
3006
3007 </para>
3008
3009 <para>
3010 -------------------------------
3011
3012
3013 </para>
3014
3015 </listitem></varlistentry>
3016 <varlistentry><term><emphasis>ping
3017
3018 </emphasis></term>
3019 <listitem><para></para>
3020
3021 <para>
3022 Usage: ping [OPTION]... host
3023
3024
3025 </para>
3026
3027 <para>
3028 Send ICMP ECHO_REQUEST packets to network hosts.
3029
3030
3031 </para>
3032
3033 <para>
3034 Options:
3035
3036
3037 </para>
3038
3039 <para>
3040 <screen>
3041         -c COUNT        Send only COUNT pings.
3042         -s SIZE         Send SIZE data bytes in packets (default=56).
3043         -q              Quiet mode, only displays output at start
3044                         and when finished.
3045 Example:
3046 </screen>
3047
3048
3049 </para>
3050
3051 <para>
3052 <screen>
3053         $ ping localhost
3054         PING slag (127.0.0.1): 56 data bytes
3055         64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms
3056 </screen>
3057
3058
3059 </para>
3060
3061 <para>
3062 <screen>
3063         --- debian ping statistics ---
3064         1 packets transmitted, 1 packets received, 0% packet loss
3065         round-trip min/avg/max = 20.1/20.1/20.1 ms
3066 </screen>
3067
3068
3069 </para>
3070
3071 <para>
3072 -------------------------------
3073
3074
3075 </para>
3076
3077 </listitem></varlistentry>
3078 <varlistentry><term><emphasis>poweroff
3079
3080 </emphasis></term>
3081 <listitem><para></para>
3082
3083 <para>
3084 Shuts down the system, and requests that the kernel turn off power upon
3085 halting.
3086
3087
3088 </para>
3089
3090 <para>
3091 -------------------------------
3092
3093
3094 </para>
3095
3096 </listitem></varlistentry>
3097 <varlistentry><term><emphasis>printf
3098
3099 </emphasis></term>
3100 <listitem><para></para>
3101
3102 <para>
3103 Usage: printf format [argument...]
3104
3105
3106 </para>
3107
3108 <para>
3109 Formats and prints the given data in a manner similar to the C printf
3110 command.
3111
3112
3113 </para>
3114
3115 <para>
3116 Example:
3117
3118
3119 </para>
3120
3121 <para>
3122 <screen>
3123         $ printf "Val=%d\n" 5
3124         Val=5
3125 </screen>
3126
3127
3128 </para>
3129
3130 <para>
3131 -------------------------------
3132
3133
3134 </para>
3135
3136 </listitem></varlistentry>
3137 <varlistentry><term><emphasis>ps
3138
3139 </emphasis></term>
3140 <listitem><para></para>
3141
3142 <para>
3143 Usage: ps
3144
3145
3146 </para>
3147
3148 <para>
3149 Report process status
3150
3151
3152 </para>
3153
3154 <para>
3155 This version of ps accepts no options.
3156
3157
3158 </para>
3159
3160 <para>
3161 Example:
3162
3163
3164 </para>
3165
3166 <para>
3167 <screen>
3168         $ ps
3169   PID  Uid      Gid State Command
3170     1 root     root     S init
3171     2 root     root     S [kflushd]
3172     3 root     root     S [kupdate]
3173     4 root     root     S [kpiod]
3174     5 root     root     S [kswapd]
3175   742 andersen andersen S [bash]
3176   743 andersen andersen S -bash
3177   745 root     root     S [getty]
3178  2990 andersen andersen R ps
3179 </screen>
3180
3181
3182 </para>
3183
3184 <para>
3185 -------------------------------
3186
3187
3188 </para>
3189
3190 </listitem></varlistentry>
3191 <varlistentry><term><emphasis>pwd
3192
3193 </emphasis></term>
3194 <listitem><para></para>
3195
3196 <para>
3197 Prints the full filename of the current working directory.
3198
3199
3200 </para>
3201
3202 <para>
3203 Example:
3204
3205
3206 </para>
3207
3208 <para>
3209 <screen>
3210         $ pwd
3211         /root
3212 </screen>
3213
3214
3215 </para>
3216
3217 <para>
3218 -------------------------------
3219
3220
3221 </para>
3222
3223 </listitem></varlistentry>
3224 <varlistentry><term><emphasis>reboot
3225
3226 </emphasis></term>
3227 <listitem><para></para>
3228
3229 <para>
3230 Instructs the kernel to reboot the system.
3231
3232
3233 </para>
3234
3235 <para>
3236 -------------------------------
3237
3238
3239 </para>
3240
3241 </listitem></varlistentry>
3242 <varlistentry><term><emphasis>rm
3243
3244 </emphasis></term>
3245 <listitem><para></para>
3246
3247 <para>
3248 Usage: rm [OPTION]... FILE...
3249
3250
3251 </para>
3252
3253 <para>
3254 Remove (unlink) the <literal>FILE(s).</literal> You may use '--' to
3255 indicate that all following arguments are non-options.
3256
3257
3258 </para>
3259
3260 <para>
3261 Options:
3262
3263
3264 </para>
3265
3266 <para>
3267 <screen>
3268         -f              remove existing destinations, never prompt
3269         -r or -R        remove the contents of directories recursively
3270 </screen>
3271
3272
3273 </para>
3274
3275 <para>
3276 Example:
3277
3278
3279 </para>
3280
3281 <para>
3282 <screen>
3283         $ rm -rf /tmp/foo
3284 </screen>
3285
3286
3287 </para>
3288
3289 <para>
3290 -------------------------------
3291
3292
3293 </para>
3294
3295 </listitem></varlistentry>
3296 <varlistentry><term><emphasis>rmdir
3297
3298 </emphasis></term>
3299 <listitem><para></para>
3300
3301 <para>
3302 Usage: rmdir [OPTION]... DIRECTORY...
3303
3304
3305 </para>
3306
3307 <para>
3308 Remove the <literal>DIRECTORY(ies),</literal> if they are empty.
3309
3310
3311 </para>
3312
3313 <para>
3314 Example:
3315
3316
3317 </para>
3318
3319 <para>
3320 <screen>
3321         # rmdir /tmp/foo
3322 </screen>
3323
3324
3325 </para>
3326
3327 <para>
3328 -------------------------------
3329
3330
3331 </para>
3332
3333 </listitem></varlistentry>
3334 <varlistentry><term><emphasis>rmmod
3335
3336 </emphasis></term>
3337 <listitem><para></para>
3338
3339 <para>
3340 Usage: rmmod [OPTION]... [MODULE]...
3341
3342
3343 </para>
3344
3345 <para>
3346 Unloads the specified kernel modules from the kernel.
3347
3348
3349 </para>
3350
3351 <para>
3352 Options:
3353
3354
3355 </para>
3356
3357 <para>
3358 <screen>
3359         -a      Try to remove all unused kernel modules.
3360 </screen>
3361
3362
3363 </para>
3364
3365 <para>
3366 Example:
3367
3368
3369 </para>
3370
3371 <para>
3372 <screen>
3373         $ rmmod tulip
3374 </screen>
3375
3376
3377 </para>
3378
3379 <para>
3380 -------------------------------
3381
3382
3383 </para>
3384
3385 </listitem></varlistentry>
3386 <varlistentry><term><emphasis>sed
3387
3388 </emphasis></term>
3389 <listitem><para></para>
3390
3391 <para>
3392 Usage: sed [<emphasis>-n</emphasis>] <emphasis>-e</emphasis> script [file...]
3393
3394
3395 </para>
3396
3397 <para>
3398 Allowed sed scripts come in the following form:
3399
3400
3401 </para>
3402
3403 <para>
3404 <screen>
3405         'ADDR [!] COMMAND'
3406 </screen>
3407
3408
3409 </para>
3410
3411 <para>
3412 <screen>
3413         where address ADDR can be:
3414           NUMBER    Match specified line number
3415           $         Match last line
3416           /REGEXP/  Match specified regexp
3417           (! inverts the meaning of the match)
3418 </screen>
3419
3420
3421 </para>
3422
3423 <para>
3424 <screen>
3425         and COMMAND can be:
3426           s/regexp/replacement/[igp]
3427                  which attempt to match regexp against the pattern space
3428                  and if successful replaces the matched portion with replacement.
3429 </screen>
3430
3431
3432 </para>
3433
3434 <para>
3435 <screen>
3436           aTEXT
3437                  which appends TEXT after the pattern space
3438 </screen>
3439
3440
3441 </para>
3442
3443 <para>
3444 Options:
3445
3446
3447 </para>
3448
3449 <para>
3450 <screen>
3451         -e      add the script to the commands to be executed
3452         -n      suppress automatic printing of pattern space
3453 </screen>
3454
3455
3456 </para>
3457
3458 <para>
3459 This version of sed matches full regular expressions.
3460
3461
3462 </para>
3463
3464 <para>
3465 Example:
3466
3467
3468 </para>
3469
3470 <para>
3471 <screen>
3472         $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
3473         bar
3474 </screen>
3475
3476
3477 </para>
3478
3479 <para>
3480 -------------------------------
3481
3482
3483 </para>
3484
3485 </listitem></varlistentry>
3486 <varlistentry><term><emphasis>setkeycodes
3487
3488 </emphasis></term>
3489 <listitem><para></para>
3490
3491 <para>
3492 Usage: setkeycodes SCANCODE KEYCODE ...
3493
3494
3495 </para>
3496
3497 <para>
3498 Set entries into the kernel's scancode-to-keycode map, allowing unusual
3499 keyboards to generate usable keycodes.
3500
3501
3502 </para>
3503
3504 <para>
3505 SCANCODE may be either xx or e0xx (hexadecimal), and KEYCODE is given in
3506 decimal
3507
3508
3509 </para>
3510
3511 <para>
3512 Example:
3513
3514
3515 </para>
3516
3517 <para>
3518 <screen>
3519         # setkeycodes e030 127
3520 </screen>
3521
3522
3523 </para>
3524
3525 <para>
3526 -------------------------------
3527
3528
3529 </para>
3530
3531 </listitem></varlistentry>
3532 <varlistentry><term><emphasis>sfdisk
3533
3534 </emphasis></term>
3535 <listitem><para></para>
3536
3537 <para>
3538 Usage: sfdisk [options] device ...
3539
3540
3541 </para>
3542
3543 <para>
3544 device: something like /dev/hda or /dev/sda
3545
3546
3547 </para>
3548
3549 <para>
3550 useful options:
3551
3552
3553 </para>
3554
3555 <para>
3556 <screen>
3557     -s [or --show-size]: list size of a partition
3558     -c [or --id]:        print or change partition Id
3559     -l [or --list]:      list partitions of each device
3560     -d [or --dump]:      idem, but in a format suitable for later input
3561     -i [or --increment]: number cylinders etc. from 1 instead of from 0
3562     -uS, -uB, -uC, -uM:  accept/report in units of sectors/blocks/cylinders/MB
3563     -T [or --list-types]:list the known partition types
3564     -D [or --DOS]:       for DOS-compatibility: waste a little space
3565     -R [or --re-read]:   make kernel reread partition table
3566     -N# :                change only the partition with number #
3567     -n :                 do not actually write to disk
3568     -O file :            save the sectors that will be overwritten to file
3569     -I file :            restore these sectors again
3570     -v [or --version]:   print version
3571     -? [or --help]:      print this message
3572 </screen>
3573
3574
3575 </para>
3576
3577 <para>
3578 dangerous options:
3579
3580
3581 </para>
3582
3583 <para>
3584 <screen>
3585     -g [or --show-geometry]: print the kernel's idea of the geometry
3586     -x [or --show-extended]: also list extended partitions on output
3587 </screen>
3588
3589
3590 </para>
3591
3592 <para>
3593 <screen>
3594                              or expect descriptors for them on input
3595     -L  [or --Linux]:      do not complain about things irrelevant for Linux
3596     -q  [or --quiet]:      suppress warning messages
3597     You can override the detected geometry using:
3598     -C# [or --cylinders #]:set the number of cylinders to use
3599     -H# [or --heads #]:    set the number of heads to use
3600     -S# [or --sectors #]:  set the number of sectors to use
3601 </screen>
3602
3603
3604 </para>
3605
3606 <para>
3607 You can disable all consistency checking with:
3608
3609
3610 </para>
3611
3612 <para>
3613 <screen>
3614     -f  [or --force]:      do what I say, even if it is stupid
3615 </screen>
3616
3617
3618 </para>
3619
3620 <para>
3621 -------------------------------
3622
3623
3624 </para>
3625
3626 </listitem></varlistentry>
3627 <varlistentry><term><emphasis>sh
3628
3629 </emphasis></term>
3630 <listitem><para></para>
3631
3632 <para>
3633 Usage: sh
3634
3635
3636 </para>
3637
3638 <para>
3639 lash -- the BusyBox LAme SHell (command interpreter)
3640
3641
3642 </para>
3643
3644 <para>
3645 This command does not yet have proper documentation.  
3646
3647
3648 </para>
3649
3650 <para>
3651 Use lash just as you would use any other shell. It properly handles pipes,
3652 redirects, job control, can be used as the shell for scripts (#!/bin/sh),
3653 and has a sufficient set of builtins to do what is needed. It does not
3654 (yet) support Bourne Shell syntax. If you need things like
3655 ``if-then-else'', ``while'', and such, use ash or bash. If you just need a
3656 very simple and extremely small shell, this will do the job.
3657
3658
3659 </para>
3660
3661 <para>
3662 -------------------------------
3663
3664
3665 </para>
3666
3667 </listitem></varlistentry>
3668 <varlistentry><term><emphasis>sleep
3669
3670 </emphasis></term>
3671 <listitem><para></para>
3672
3673 <para>
3674 Usage: sleep N
3675
3676
3677 </para>
3678
3679 <para>
3680 Pause for N seconds.
3681
3682
3683 </para>
3684
3685 <para>
3686 Example:
3687
3688
3689 </para>
3690
3691 <para>
3692 <screen>
3693         $ sleep 2
3694         [2 second delay results]
3695 </screen>
3696
3697
3698 </para>
3699
3700 <para>
3701 -------------------------------
3702
3703
3704 </para>
3705
3706 </listitem></varlistentry>
3707 <varlistentry><term><emphasis>sort
3708
3709 </emphasis></term>
3710 <listitem><para></para>
3711
3712 <para>
3713 Usage: sort [<emphasis>-n</emphasis>] [<emphasis>-r</emphasis>] [FILE]...
3714
3715
3716 </para>
3717
3718 <para>
3719 Sorts lines of text in the specified files
3720
3721
3722 </para>
3723
3724 <para>
3725 Example:
3726
3727
3728 </para>
3729
3730 <para>
3731 <screen>
3732         $ echo -e "e\nf\nb\nd\nc\na" | sort
3733         a
3734         b
3735         c
3736         d
3737         e
3738         f
3739 </screen>
3740
3741
3742 </para>
3743
3744 <para>
3745 -------------------------------
3746
3747
3748 </para>
3749
3750 </listitem></varlistentry>
3751 <varlistentry><term><emphasis>swapoff
3752
3753 </emphasis></term>
3754 <listitem><para></para>
3755
3756 <para>
3757 Usage: swapoff [OPTION] [device]
3758
3759
3760 </para>
3761
3762 <para>
3763 Stop swapping virtual memory pages on the given device.
3764
3765
3766 </para>
3767
3768 <para>
3769 Options:
3770
3771
3772 </para>
3773
3774 <para>
3775 <screen>
3776         -a      Stop swapping on all swap devices
3777 </screen>
3778
3779
3780 </para>
3781
3782 <para>
3783 -------------------------------
3784
3785
3786 </para>
3787
3788 </listitem></varlistentry>
3789 <varlistentry><term><emphasis>swapon
3790
3791 </emphasis></term>
3792 <listitem><para></para>
3793
3794 <para>
3795 Usage: swapon [OPTION] [device]
3796
3797
3798 </para>
3799
3800 <para>
3801 Start swapping virtual memory pages on the given device.
3802
3803
3804 </para>
3805
3806 <para>
3807 Options:
3808
3809
3810 </para>
3811
3812 <para>
3813 <screen>
3814         -a      Start swapping on all swap devices
3815 </screen>
3816
3817
3818 </para>
3819
3820 <para>
3821 -------------------------------
3822
3823
3824 </para>
3825
3826 </listitem></varlistentry>
3827 <varlistentry><term><emphasis>sync
3828
3829 </emphasis></term>
3830 <listitem><para></para>
3831
3832 <para>
3833 Usage: sync
3834
3835
3836 </para>
3837
3838 <para>
3839 Write all buffered filesystem blocks to disk.
3840
3841
3842 </para>
3843
3844 <para>
3845 -------------------------------
3846
3847
3848 </para>
3849
3850 </listitem></varlistentry>
3851 <varlistentry><term><emphasis>syslogd
3852
3853 </emphasis></term>
3854 <listitem><para></para>
3855
3856 <para>
3857 Usage: syslogd [OPTION]...
3858
3859
3860 </para>
3861
3862 <para>
3863 Linux system and kernel (provides klogd) logging utility. Note that this
3864 version of syslogd/klogd ignores /etc/syslog.conf.
3865
3866
3867 </para>
3868
3869 <para>
3870 Options:
3871
3872
3873 </para>
3874
3875 <para>
3876 <screen>
3877         -m NUM          Interval between MARK lines (default=20min, 0=off)
3878         -n              Run as a foreground process
3879         -K              Do not start up the klogd process
3880         -O FILE         Use an alternate log file (default=/var/log/messages)
3881 </screen>
3882
3883
3884 </para>
3885
3886 <para>
3887 -------------------------------
3888
3889
3890 </para>
3891
3892 </listitem></varlistentry>
3893 <varlistentry><term><emphasis>tail
3894
3895 </emphasis></term>
3896 <listitem><para></para>
3897
3898 <para>
3899 Usage: tail [OPTION] [FILE]...
3900
3901
3902 </para>
3903
3904 <para>
3905 Print last 10 lines of each FILE to standard output. With more than one
3906 FILE, precede each with a header giving the file name. With no FILE, or
3907 when FILE is -, read standard input.
3908
3909
3910 </para>
3911
3912 <para>
3913 Options:
3914
3915
3916 </para>
3917
3918 <para>
3919 <screen>
3920         -n NUM          Print last NUM lines instead of first 10
3921         -f              Output data as the file grows.  This version
3922                         of 'tail -f' supports only one file at a time.
3923 </screen>
3924
3925
3926 </para>
3927
3928 <para>
3929 Example:
3930
3931
3932 </para>
3933
3934 <para>
3935 <screen>
3936         $ tail -n 1 /etc/resolv.conf
3937         nameserver 10.0.0.1
3938 </screen>
3939
3940
3941 </para>
3942
3943 <para>
3944 -------------------------------
3945
3946
3947 </para>
3948
3949 </listitem></varlistentry>
3950 <varlistentry><term><emphasis>tar
3951
3952 </emphasis></term>
3953 <listitem><para></para>
3954
3955 <para>
3956 Usage: tar -[cxtvO] [<emphasis>--exclude</emphasis> File] [<emphasis>-f</emphasis> tarFile] [FILE] ...
3957
3958
3959 </para>
3960
3961 <para>
3962 Create, extract, or list files from a tar file. Note that this version of
3963 tar treats hard links as separate files.
3964
3965
3966 </para>
3967
3968 <para>
3969 Main operation mode:
3970
3971
3972 </para>
3973
3974 <para>
3975 <screen>
3976         c               create
3977         x               extract
3978         t               list
3979 </screen>
3980
3981
3982 </para>
3983
3984 <para>
3985 File selection:
3986
3987
3988 </para>
3989
3990 <para>
3991 <screen>
3992         f               name of tarfile or "-" for stdin
3993         O               extract to stdout
3994         --exclude       file to exclude
3995 </screen>
3996
3997
3998 </para>
3999
4000 <para>
4001 Informative output:
4002
4003
4004 </para>
4005
4006 <para>
4007 <screen>
4008         v               verbosely list files processed
4009 </screen>
4010
4011
4012 </para>
4013
4014 <para>
4015 Example:
4016
4017
4018 </para>
4019
4020 <para>
4021 <screen>
4022         $ zcat /tmp/tarball.tar.gz | tar -xf -
4023         $ tar -cf /tmp/tarball.tar /usr/local
4024 </screen>
4025
4026
4027 </para>
4028
4029 <para>
4030 -------------------------------
4031
4032
4033 </para>
4034
4035 </listitem></varlistentry>
4036 <varlistentry><term><emphasis>tee
4037
4038 </emphasis></term>
4039 <listitem><para></para>
4040
4041 <para>
4042 Usage: tee [OPTION]... [FILE]...
4043
4044
4045 </para>
4046
4047 <para>
4048 Copy standard input to each FILE, and also to standard output.
4049
4050
4051 </para>
4052
4053 <para>
4054 Options:
4055
4056
4057 </para>
4058
4059 <para>
4060 <screen>
4061         -a      append to the given FILEs, do not overwrite
4062 </screen>
4063
4064
4065 </para>
4066
4067 <para>
4068 Example:
4069
4070
4071 </para>
4072
4073 <para>
4074 <screen>
4075         $ echo "Hello" | tee /tmp/foo
4076         $ cat /tmp/foo
4077         Hello
4078 </screen>
4079
4080
4081 </para>
4082
4083 <para>
4084 -------------------------------
4085
4086
4087 </para>
4088
4089 </listitem></varlistentry>
4090 <varlistentry><term><emphasis>telnet
4091
4092 </emphasis></term>
4093 <listitem><para></para>
4094
4095 <para>
4096 Usage: telnet host [port]
4097
4098
4099 </para>
4100
4101 <para>
4102 Telnet is used to establish interactive communication with another computer
4103 over a network using the TELNET protocol.
4104
4105
4106 </para>
4107
4108 <para>
4109 -------------------------------
4110
4111
4112 </para>
4113
4114 </listitem></varlistentry>
4115 <varlistentry><term><emphasis>test, [
4116
4117 </emphasis></term>
4118 <listitem><para></para>
4119
4120 <para>
4121 Usage: test EXPRESSION or [ EXPRESSION ]
4122
4123
4124 </para>
4125
4126 <para>
4127 Checks file types and compares values returning an exit code determined by
4128 the value of EXPRESSION.
4129
4130
4131 </para>
4132
4133 <para>
4134 Example:
4135
4136
4137 </para>
4138
4139 <para>
4140 <screen>
4141         $ test 1 -eq 2
4142         $ echo $?
4143         1
4144         $ test 1 -eq 1
4145         $ echo $?
4146         0
4147         $ [ -d /etc ]
4148         $ echo $?
4149         0
4150         $ [ -d /junk ]
4151         $ echo $?
4152         1
4153 </screen>
4154
4155
4156 </para>
4157
4158 <para>
4159 -------------------------------
4160
4161
4162 </para>
4163
4164 </listitem></varlistentry>
4165 <varlistentry><term><emphasis>touch
4166
4167 </emphasis></term>
4168 <listitem><para></para>
4169
4170 <para>
4171 Usage: touch [<emphasis>-c</emphasis>] file [file ...]
4172
4173
4174 </para>
4175
4176 <para>
4177 Update the last-modified date on (or create) the selected file[s].
4178
4179
4180 </para>
4181
4182 <para>
4183 Example:
4184
4185
4186 </para>
4187
4188 <para>
4189 <screen>
4190         $ ls -l /tmp/foo
4191         /bin/ls: /tmp/foo: No such file or directory
4192         $ touch /tmp/foo
4193         $ ls -l /tmp/foo
4194         -rw-rw-r--    1 andersen andersen        0 Apr 15 01:11 /tmp/foo
4195 </screen>
4196
4197
4198 </para>
4199
4200 <para>
4201 -------------------------------
4202
4203
4204 </para>
4205
4206 </listitem></varlistentry>
4207 <varlistentry><term><emphasis>tr
4208
4209 </emphasis></term>
4210 <listitem><para></para>
4211
4212 <para>
4213 Usage: tr [-cds] STRING1 [STRING2]
4214
4215
4216 </para>
4217
4218 <para>
4219 Translate, squeeze, and/or delete characters from standard input, writing
4220 to standard output.
4221
4222
4223 </para>
4224
4225 <para>
4226 Options:
4227
4228
4229 </para>
4230
4231 <para>
4232 <screen>
4233         -c      take complement of STRING1
4234         -d      delete input characters coded STRING1
4235         -s      squeeze multiple output characters of STRING2 into one character
4236 </screen>
4237
4238
4239 </para>
4240
4241 <para>
4242 Example:
4243
4244
4245 </para>
4246
4247 <para>
4248 <screen>
4249         $ echo "gdkkn vnqkc" | tr [a-y] [b-z]
4250         hello world
4251 </screen>
4252
4253
4254 </para>
4255
4256 <para>
4257 -------------------------------
4258
4259
4260 </para>
4261
4262 </listitem></varlistentry>
4263 <varlistentry><term><emphasis>true
4264
4265 </emphasis></term>
4266 <listitem><para></para>
4267
4268 <para>
4269 Returns an exit code of TRUE (0)
4270
4271
4272 </para>
4273
4274 <para>
4275 Example:
4276
4277
4278 </para>
4279
4280 <para>
4281 <screen>
4282         $ true
4283         $ echo $?
4284         0
4285 </screen>
4286
4287
4288 </para>
4289
4290 <para>
4291 -------------------------------
4292
4293
4294 </para>
4295
4296 </listitem></varlistentry>
4297 <varlistentry><term><emphasis>tty
4298
4299 </emphasis></term>
4300 <listitem><para></para>
4301
4302 <para>
4303 Usage: tty
4304
4305
4306 </para>
4307
4308 <para>
4309 Print the file name of the terminal connected to standard input.
4310
4311
4312 </para>
4313
4314 <para>
4315 Options:
4316
4317
4318 </para>
4319
4320 <para>
4321 <screen>
4322         -s      print nothing, only return an exit status
4323 </screen>
4324
4325
4326 </para>
4327
4328 <para>
4329 Example:
4330
4331
4332 </para>
4333
4334 <para>
4335 <screen>
4336         $ tty
4337         /dev/tty2
4338 </screen>
4339
4340
4341 </para>
4342
4343 <para>
4344 -------------------------------
4345
4346
4347 </para>
4348
4349 </listitem></varlistentry>
4350 <varlistentry><term><emphasis>umount
4351
4352 </emphasis></term>
4353 <listitem><para></para>
4354
4355 <para>
4356 Usage: umount [flags] filesystem|directory
4357
4358
4359 </para>
4360
4361 <para>
4362 Flags:
4363
4364
4365 </para>
4366
4367 <para>
4368 <screen>
4369                 -a:     Unmount all file systems
4370                 -r:     Try to remount devices as read-only if mount is busy
4371                 -f:     Force filesystem umount (i.e. unreachable NFS server)
4372                 -l:     Do not free loop device (if a loop device has been used)
4373 </screen>
4374
4375
4376 </para>
4377
4378 <para>
4379 Example:
4380
4381
4382 </para>
4383
4384 <para>
4385 <screen>
4386         $ umount /dev/hdc1 
4387 </screen>
4388
4389
4390 </para>
4391
4392 <para>
4393 -------------------------------
4394
4395
4396 </para>
4397
4398 </listitem></varlistentry>
4399 <varlistentry><term><emphasis>uname
4400
4401 </emphasis></term>
4402 <listitem><para></para>
4403
4404 <para>
4405 Usage: uname [OPTION]...
4406
4407
4408 </para>
4409
4410 <para>
4411 Print certain system information. With no OPTION, same as <emphasis>-s</emphasis>.
4412
4413
4414 </para>
4415
4416 <para>
4417 Options:
4418
4419
4420 </para>
4421
4422 <para>
4423 <screen>
4424         -a      print all information
4425         -m      the machine (hardware) type
4426         -n      print the machine's network node hostname
4427         -r      print the operating system release
4428         -s      print the operating system name
4429         -p      print the host processor type
4430         -v      print the operating system version
4431 </screen>
4432
4433
4434 </para>
4435
4436 <para>
4437 Example:
4438
4439
4440 </para>
4441
4442 <para>
4443 <screen>
4444         $ uname -a
4445         Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
4446 </screen>
4447
4448
4449 </para>
4450
4451 <para>
4452 -------------------------------
4453
4454
4455 </para>
4456
4457 </listitem></varlistentry>
4458 <varlistentry><term><emphasis>uniq
4459
4460 </emphasis></term>
4461 <listitem><para></para>
4462
4463 <para>
4464 Usage: uniq [OPTION]... [INPUT [OUTPUT]]
4465
4466
4467 </para>
4468
4469 <para>
4470 Discard all but one of successive identical lines from INPUT (or standard
4471 input), writing to OUTPUT (or standard output).
4472
4473
4474 </para>
4475
4476 <para>
4477 Example:
4478
4479
4480 </para>
4481
4482 <para>
4483 <screen>
4484         $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
4485         a
4486         b
4487         c
4488 </screen>
4489
4490
4491 </para>
4492
4493 <para>
4494 -------------------------------
4495
4496
4497 </para>
4498
4499 </listitem></varlistentry>
4500 <varlistentry><term><emphasis>update
4501
4502 </emphasis></term>
4503 <listitem><para></para>
4504
4505 <para>
4506 Usage: update [options]
4507
4508
4509 </para>
4510
4511 <para>
4512 Periodically flushes filesystem buffers.
4513
4514
4515 </para>
4516
4517 <para>
4518 Options:
4519
4520
4521 </para>
4522
4523 <para>
4524 <screen>
4525         -S      force use of sync(2) instead of flushing
4526         -s SECS call sync this often (default 30)
4527         -f SECS flush some buffers this often (default 5)
4528 </screen>
4529
4530
4531 </para>
4532
4533 <para>
4534 -------------------------------
4535
4536
4537 </para>
4538
4539 </listitem></varlistentry>
4540 <varlistentry><term><emphasis>uptime
4541
4542 </emphasis></term>
4543 <listitem><para></para>
4544
4545 <para>
4546 Usage: uptime
4547
4548
4549 </para>
4550
4551 <para>
4552 Tells how long the system has been running since boot.
4553
4554
4555 </para>
4556
4557 <para>
4558 Example:
4559
4560
4561 </para>
4562
4563 <para>
4564 <screen>
4565         $ uptime
4566           1:55pm  up  2:30, load average: 0.09, 0.04, 0.00
4567 </screen>
4568
4569
4570 </para>
4571
4572 <para>
4573 -------------------------------
4574
4575
4576 </para>
4577
4578 </listitem></varlistentry>
4579 <varlistentry><term><emphasis>usleep
4580
4581 </emphasis></term>
4582 <listitem><para></para>
4583
4584 <para>
4585 Usage: usleep N
4586
4587
4588 </para>
4589
4590 <para>
4591 Pauses for N microseconds.
4592
4593
4594 </para>
4595
4596 <para>
4597 Example:
4598
4599
4600 </para>
4601
4602 <para>
4603 <screen>
4604         $ usleep 1000000
4605         [pauses for 1 second]
4606 </screen>
4607
4608
4609 </para>
4610
4611 <para>
4612 -------------------------------
4613
4614
4615 </para>
4616
4617 </listitem></varlistentry>
4618 <varlistentry><term><emphasis>uudecode
4619
4620 </emphasis></term>
4621 <listitem><para></para>
4622
4623 <para>
4624 Usage: uudecode [OPTION] [FILE]
4625
4626
4627 </para>
4628
4629 <para>
4630 Uudecode a uuencoded file
4631
4632
4633 </para>
4634
4635 <para>
4636 Options:
4637
4638
4639 </para>
4640
4641 <para>
4642 <screen>
4643         -o FILE  direct output to FILE
4644 </screen>
4645
4646
4647 </para>
4648
4649 <para>
4650 Example:
4651
4652
4653 </para>
4654
4655 <para>
4656 <screen>
4657         $ uudecode -o busybox busybox.uu
4658         $ ls -l busybox
4659         -rwxr-xr-x   1 ams      ams        245264 Jun  7 21:35 busybox
4660 </screen>
4661
4662
4663 </para>
4664
4665 <para>
4666 -------------------------------
4667
4668
4669 </para>
4670
4671 </listitem></varlistentry>
4672 <varlistentry><term><emphasis>uuencode
4673
4674 </emphasis></term>
4675 <listitem><para></para>
4676
4677 <para>
4678 Usage: uuencode [OPTION] [INFILE] REMOTEFILE
4679
4680
4681 </para>
4682
4683 <para>
4684 Uuencode a file.
4685
4686
4687 </para>
4688
4689 <para>
4690 Options:
4691
4692
4693 </para>
4694
4695 <para>
4696 <screen>
4697         -m      use base64 encoding as of RFC1521
4698 </screen>
4699
4700
4701 </para>
4702
4703 <para>
4704 Example:
4705
4706
4707 </para>
4708
4709 <para>
4710 <screen>
4711         $ uuencode busybox busybox
4712         begin 755 busybox
4713         M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``&amp;
4714         .....
4715         $ uudecode busybox busybox &gt; busybox.uu
4716         $
4717 </screen>
4718
4719
4720 </para>
4721
4722 <para>
4723 -------------------------------
4724
4725
4726 </para>
4727
4728 </listitem></varlistentry>
4729 <varlistentry><term><emphasis>wc
4730
4731 </emphasis></term>
4732 <listitem><para></para>
4733
4734 <para>
4735 Usage: wc [OPTION]... [FILE]...
4736
4737
4738 </para>
4739
4740 <para>
4741 Print line, word, and byte counts for each FILE, and a total line if more
4742 than one FILE is specified. With no FILE, read standard input.
4743
4744
4745 </para>
4746
4747 <para>
4748 Options:
4749
4750
4751 </para>
4752
4753 <para>
4754 <screen>
4755         -c      print the byte counts
4756         -l      print the newline counts
4757         -L      print the length of the longest line
4758         -w      print the word counts
4759 </screen>
4760
4761
4762 </para>
4763
4764 <para>
4765 Example:
4766
4767
4768 </para>
4769
4770 <para>
4771 <screen>
4772         $ wc /etc/passwd
4773              31      46    1365 /etc/passwd
4774 </screen>
4775
4776
4777 </para>
4778
4779 <para>
4780 -------------------------------
4781
4782
4783 </para>
4784
4785 </listitem></varlistentry>
4786 <varlistentry><term><emphasis>which
4787
4788 </emphasis></term>
4789 <listitem><para></para>
4790
4791 <para>
4792 Usage: which [COMMAND ...]
4793
4794
4795 </para>
4796
4797 <para>
4798 Locates a COMMAND.
4799
4800
4801 </para>
4802
4803 <para>
4804 Example:
4805
4806
4807 </para>
4808
4809 <para>
4810 <screen>
4811         $ which login
4812         /bin/login
4813 </screen>
4814
4815
4816 </para>
4817
4818 <para>
4819 -------------------------------
4820
4821
4822 </para>
4823
4824 </listitem></varlistentry>
4825 <varlistentry><term><emphasis>whoami
4826
4827 </emphasis></term>
4828 <listitem><para></para>
4829
4830 <para>
4831 Usage: whoami
4832
4833
4834 </para>
4835
4836 <para>
4837 Prints the user name associated with the current effective user id.
4838
4839
4840 </para>
4841
4842 <para>
4843 Example:
4844
4845
4846 </para>
4847
4848 <para>
4849 <screen>
4850         $ whoami
4851         andersen
4852 </screen>
4853
4854
4855 </para>
4856
4857 <para>
4858 -------------------------------
4859
4860
4861 </para>
4862
4863 </listitem></varlistentry>
4864 <varlistentry><term><emphasis>yes
4865
4866 </emphasis></term>
4867 <listitem><para></para>
4868
4869 <para>
4870 Usage: yes [OPTION]... [STRING]...
4871
4872
4873 </para>
4874
4875 <para>
4876 Repeatedly outputs a line with all specified <literal>STRING(s),</literal>
4877 or `y'.
4878
4879
4880 </para>
4881
4882 <para>
4883 -------------------------------
4884
4885
4886 </para>
4887
4888 </listitem></varlistentry>
4889 <varlistentry><term><emphasis>zcat
4890
4891 </emphasis></term>
4892 <listitem><para></para>
4893
4894 <para>
4895 This is essentially an alias for invoking ``gunzip <emphasis>-c</emphasis>'', where it decompresses the file in question and send the output to
4896 stdout. 
4897
4898
4899 </para>
4900
4901 <para>
4902 -------------------------------
4903
4904
4905 </para>
4906
4907 </listitem></varlistentry></variablelist>
4908
4909 </sect1>
4910
4911 <sect1 id="pod2docbook-ch-1-sect-6"><title>LIBC NSS
4912
4913 </title>
4914 <!-- Bogus hack to ensure that each sect has a paragraph in it -->
4915 <para>
4916 </para>
4917
4918
4919 <para>
4920 GNU Libc uses the Name Service Switch (NSS) to configure the behavior of
4921 the C library for the local environment, and to configure how it reads
4922 system data, such as passwords and group information. BusyBox has made it
4923 Policy that it will never use NSS, and will never use and libc calls that
4924 make use of NSS. This allows you to run an embedded system without the need
4925 for installing an /etc/nsswitch.conf file and without and /lib/libnss_*
4926 libraries installed.
4927
4928
4929 </para>
4930
4931 <para>
4932 If you are using a system that is using a remote LDAP server for
4933 authentication via GNU libc NSS, and you want to use BusyBox, then you will
4934 need to adjust the BusyBox source. Chances are though, that if you have
4935 enough space to install of that stuff on your system, then you probably
4936 want the full GNU utilities.
4937
4938
4939 </para>
4940
4941 </sect1>
4942
4943 <sect1 id="pod2docbook-ch-1-sect-7"><title>SEE ALSO
4944
4945 </title>
4946 <!-- Bogus hack to ensure that each sect has a paragraph in it -->
4947 <para>
4948 </para>
4949
4950
4951 <para>
4952 <literal>textutils(1),</literal> <literal>shellutils(1),</literal> etc...
4953
4954
4955 </para>
4956
4957 </sect1>
4958
4959 <sect1 id="pod2docbook-ch-1-sect-8"><title>MAINTAINER
4960
4961 </title>
4962 <!-- Bogus hack to ensure that each sect has a paragraph in it -->
4963 <para>
4964 </para>
4965
4966
4967 <para>
4968 Erik Andersen &lt;andersee@debian.org&gt; &lt;andersen@lineo.com&gt;
4969
4970
4971 </para>
4972
4973 </sect1>
4974
4975 <sect1 id="pod2docbook-ch-1-sect-9"><title>AUTHORS
4976
4977 </title>
4978 <!-- Bogus hack to ensure that each sect has a paragraph in it -->
4979 <para>
4980 </para>
4981
4982
4983 <para>
4984 The following people have contributed code to BusyBox whether they know it
4985 or not.
4986
4987
4988 </para>
4989
4990 <para>
4991 Erik Andersen &lt;andersee@debian.org&gt;
4992
4993
4994 </para>
4995
4996 <para>
4997 John Beppu &lt;beppu@lineo.com&gt;
4998
4999
5000 </para>
5001
5002 <para>
5003 Brian Candler &lt;B.Candler@pobox.com&gt;
5004
5005
5006 </para>
5007
5008 <para>
5009 Randolph Chung &lt;tausq@debian.org&gt;
5010
5011
5012 </para>
5013
5014 <para>
5015 Dave Cinege &lt;dcinege@psychosis.com&gt;       
5016
5017
5018 </para>
5019
5020 <para>
5021 Karl M. Hegbloom &lt;karlheg@debian.org&gt;
5022
5023
5024 </para>
5025
5026 <para>
5027 John Lombardo &lt;john@deltanet.com&gt; 
5028
5029
5030 </para>
5031
5032 <para>
5033 Glenn McGrath &lt;bug1@netconnect.com.au&gt;
5034
5035
5036 </para>
5037
5038 <para>
5039 Bruce Perens &lt;bruce@perens.com&gt;
5040
5041
5042 </para>
5043
5044 <para>
5045 Pavel Roskin &lt;proski@gnu.org&gt;
5046
5047
5048 </para>
5049
5050 <para>
5051 Linus Torvalds &lt;torvalds@transmeta.com&gt;
5052
5053
5054 </para>
5055
5056 <para>
5057 Charles P. Wright &lt;cpwright@villagenet.com&gt;
5058
5059
5060 </para>
5061
5062 <para>
5063 Enrique Zanardi &lt;ezanardi@ull.es&gt;
5064
5065
5066 </para>
5067
5068 </sect1>
5069
5070 </chapter>
5071
5072
5073 </book>    <!-- End of the book -->