Update to file-5.32.
[linux_from_scratch.git] / chapter06 / coreutils.xml
blobc2e3d9447d61344f6106d61990a9cb5327ff5b73
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4   <!ENTITY % general-entities SYSTEM "../general.ent">
5   %general-entities;
6 ]>
8 <sect1 id="ch-system-coreutils" role="wrap">
9   <?dbhtml filename="coreutils.html"?>
11   <sect1info condition="script">
12     <productname>coreutils</productname>
13     <productnumber>&coreutils-version;</productnumber>
14     <address>&coreutils-url;</address>
15   </sect1info>
17   <title>Coreutils-&coreutils-version;</title>
19   <indexterm zone="ch-system-coreutils">
20     <primary sortas="a-Coreutils">Coreutils</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The Coreutils package contains utilities for showing and setting the
27     basic system characteristics.</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&coreutils-ch6-sbu;</seg>
35         <seg>&coreutils-ch6-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of Coreutils</title>
44     <para>POSIX requires that programs from Coreutils recognize character
45     boundaries correctly even in multibyte locales. The following patch fixes
46     this non-compliance and other internationalization-related bugs.</para>
48 <screen><userinput remap="pre">patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen>
50     <note>
51       <para>In the past, many bugs were found in this patch. When reporting new
52       bugs to Coreutils maintainers, please check first if they are reproducible
53       without this patch.</para>
54     </note>
56    <!-- this has been fixed in upstream gnulib, when a new version of
57    coreutils is released, please check #4055 to see if the change has been
58    picked up in this package -->
59    <para>Suppress a test which on some machines can loop forever:</para>
61 <screen><userinput remap="pre">sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk</userinput></screen>
63     <para>Now prepare Coreutils for compilation:</para>
65 <screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1 ./configure \
66             --prefix=/usr            \
67             --enable-no-install-program=kill,uptime</userinput></screen>
69     <variablelist>
70       <title>The meaning of the configure options:</title>
72       <varlistentry>
73         <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term>
74         <listitem>
75           <para>This environment variable allows the package to be 
76           built as the root user.
77           </para>
78         </listitem>
79       </varlistentry>
81       <varlistentry>
82         <term><parameter>--enable-no-install-program=kill,uptime</parameter></term>
83         <listitem>
84           <para>The purpose of this switch is to prevent Coreutils from
85           installing binaries that will be installed by other packages later.
86           </para>
87         </listitem>
88       </varlistentry>
89     </variablelist>
91     <para>Compile the package:</para>
93 <screen><userinput remap="make">FORCE_UNSAFE_CONFIGURE=1 make</userinput></screen>
95     <para>Skip down to <quote>Install the
96     package</quote> if not running the test suite.</para>
98     <para>Now the test suite is ready to be run. First, run the tests that are
99     meant to be run as user <systemitem class="username">root</systemitem>:</para>
101 <screen><userinput remap="test">make NON_ROOT_USERNAME=nobody check-root</userinput></screen>
103     <para>We're going to run the remainder of the tests as the
104     <systemitem class="username">nobody</systemitem> user. Certain tests,
105     however, require that the user be a member of more than one group. So that
106     these tests are not skipped we'll add a temporary group and make the
107     user <systemitem class="username">nobody</systemitem> a part of it:</para>
109 <screen><userinput remap="test">echo "dummy:x:1000:nobody" &gt;&gt; /etc/group</userinput></screen>
111     <para>Fix some of the permissions so that the non-root user can compile and
112     run the tests:</para>
114 <screen><userinput remap="test">chown -Rv nobody . </userinput></screen>
116     <para>Now run the tests. Make sure the PATH in the <userinput>su</userinput>
117     environment includes /tools/bin.</para>
119 <screen><userinput remap="test">su nobody -s /bin/bash \
120           -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
122     <para>The test program test-getlogin is known to fail in a
123     partially built system environment like the chroot environment here, but
124     passes if run at the end of this chapter.  The test program tty.sh is
125     also known to fail.</para>
127     <para>Remove the temporary group:</para>
129 <screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>
131     <para>Install the package:</para>
133 <screen><userinput remap="install">make install</userinput></screen>
135     <para>Move programs to the locations specified by the FHS:</para>
137 <screen><userinput remap="install">mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
138 mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
139 mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
140 mv -v /usr/bin/chroot /usr/sbin
141 mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
142 sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8</userinput></screen>
144     <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
145     depend on <command>head</command>, <command>sleep</command>, and
146     <command>nice</command>.  As <filename class="directory">/usr</filename>
147     may not be available during the early stages of booting, those binaries
148     need to be on the root partition:</para>
150     <para revision="systemd">Some packages in BLFS and beyond expect the
151     following programs in <filename class="directory">/bin</filename>, so make
152     sure they are placed there:</para>
154 <screen><userinput remap="install">mv -v /usr/bin/{head,sleep,nice,test,[} /bin</userinput></screen>
156   </sect2>
158   <sect2 id="contents-coreutils" role="content">
159     <title>Contents of Coreutils</title>
161     <segmentedlist>
162       <segtitle>Installed programs</segtitle>
163       <segtitle>Installed library</segtitle>
164       <segtitle>Installed directory</segtitle>
166       <seglistitem>
167         <seg>[, base32, base64, basename, cat, chcon, chgrp, chmod, chown,
168         chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors,
169         dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups,
170         head, hostid, id, install, join, link, ln, logname, ls, md5sum, mkdir,
171         mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste,
172         pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm,
173         rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum,
174         sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum,
175         sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort,
176         tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and
177         yes</seg>
178         <seg>libstdbuf.so</seg>
179         <seg>/usr/libexec/coreutils</seg>
180       </seglistitem>
181     </segmentedlist>
183     <variablelist>
184       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
185       <?dbfo list-presentation="list"?>
186       <?dbhtml list-presentation="table"?>
188       <varlistentry id="base32">
189         <term><command>base32</command></term>
190         <listitem>
191           <para>Encodes and decodes data according to the base32 specification
192           (RFC 4648)</para>
193           <indexterm zone="ch-system-coreutils base64">
194             <primary sortas="b-base64">base64</primary>
195           </indexterm>
196         </listitem>
197       </varlistentry>
199       <varlistentry id="base64">
200         <term><command>base64</command></term>
201         <listitem>
202           <para>Encodes and decodes data according to the base64 specification
203           (RFC 4648)</para>
204           <indexterm zone="ch-system-coreutils base64">
205             <primary sortas="b-base64">base64</primary>
206           </indexterm>
207         </listitem>
208       </varlistentry>
210       <varlistentry id="basename">
211         <term><command>basename</command></term>
212         <listitem>
213           <para>Strips any path and a given suffix from a file name</para>
214           <indexterm zone="ch-system-coreutils basename">
215             <primary sortas="b-basename">basename</primary>
216           </indexterm>
217         </listitem>
218       </varlistentry>
220       <varlistentry id="cat">
221         <term><command>cat</command></term>
222         <listitem>
223           <para>Concatenates files to standard output</para>
224           <indexterm zone="ch-system-coreutils cat">
225             <primary sortas="b-cat">cat</primary>
226           </indexterm>
227         </listitem>
228       </varlistentry>
230       <varlistentry id="chcon">
231         <term><command>chcon</command></term>
232         <listitem>
233           <para>Changes security context for files and directories</para>
234           <indexterm zone="ch-system-coreutils chcon">
235             <primary sortas="b-chcon">chcon</primary>
236           </indexterm>
237         </listitem>
238       </varlistentry>
240       <varlistentry id="chgrp">
241         <term><command>chgrp</command></term>
242         <listitem>
243           <para>Changes the group ownership of files and directories</para>
244           <indexterm zone="ch-system-coreutils chgrp">
245             <primary sortas="b-chgrp">chgrp</primary>
246           </indexterm>
247         </listitem>
248       </varlistentry>
250       <varlistentry id="chmod">
251         <term><command>chmod</command></term>
252         <listitem>
253           <para>Changes the permissions of each file to the given mode; the mode
254           can be either a symbolic representation of the changes to make or an
255           octal number representing the new permissions</para>
256           <indexterm zone="ch-system-coreutils chmod">
257             <primary sortas="b-chmod">chmod</primary>
258           </indexterm>
259         </listitem>
260       </varlistentry>
262       <varlistentry id="chown">
263         <term><command>chown</command></term>
264         <listitem>
265           <para>Changes the user and/or group ownership of files and
266           directories</para>
267           <indexterm zone="ch-system-coreutils chown">
268             <primary sortas="b-chown">chown</primary>
269           </indexterm>
270         </listitem>
271       </varlistentry>
273       <varlistentry id="chroot">
274         <term><command>chroot</command></term>
275         <listitem>
276           <para>Runs a command with the specified directory as the
277           <filename class="directory">/</filename> directory</para>
278           <indexterm zone="ch-system-coreutils chroot">
279             <primary sortas="b-chroot">chroot</primary>
280           </indexterm>
281         </listitem>
282       </varlistentry>
284       <varlistentry id="cksum">
285         <term><command>cksum</command></term>
286         <listitem>
287           <para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte
288           counts of each specified file</para>
289           <indexterm zone="ch-system-coreutils cksum">
290             <primary sortas="b-cksum">cksum</primary>
291           </indexterm>
292         </listitem>
293       </varlistentry>
295       <varlistentry id="comm">
296         <term><command>comm</command></term>
297         <listitem>
298           <para>Compares two sorted files, outputting in three columns the lines
299           that are unique and the lines that are common</para>
300           <indexterm zone="ch-system-coreutils comm">
301             <primary sortas="b-comm">comm</primary>
302           </indexterm>
303         </listitem>
304       </varlistentry>
306       <varlistentry id="cp">
307         <term><command>cp</command></term>
308         <listitem>
309           <para>Copies files</para>
310           <indexterm zone="ch-system-coreutils cp">
311             <primary sortas="b-cp">cp</primary>
312           </indexterm>
313         </listitem>
314       </varlistentry>
316       <varlistentry id="csplit">
317         <term><command>csplit</command></term>
318         <listitem>
319           <para>Splits a given file into several new files, separating them
320           according to given patterns or line numbers and outputting the byte
321           count of each new file</para>
322           <indexterm zone="ch-system-coreutils csplit">
323             <primary sortas="b-csplit">csplit</primary>
324           </indexterm>
325         </listitem>
326       </varlistentry>
328       <varlistentry id="cut">
329         <term><command>cut</command></term>
330         <listitem>
331           <para>Prints sections of lines, selecting the parts according to given
332           fields or positions</para>
333           <indexterm zone="ch-system-coreutils cut">
334             <primary sortas="b-cut">cut</primary>
335           </indexterm>
336         </listitem>
337       </varlistentry>
339       <varlistentry id="date">
340         <term><command>date</command></term>
341         <listitem>
342           <para>Displays the current time in the given format, or sets the
343           system date</para>
344           <indexterm zone="ch-system-coreutils date">
345             <primary sortas="b-date">date</primary>
346           </indexterm>
347         </listitem>
348       </varlistentry>
350       <varlistentry id="dd">
351         <term><command>dd</command> </term>
352         <listitem>
353           <para>Copies a file using the given block size and count, while
354           optionally performing conversions on it</para>
355           <indexterm zone="ch-system-coreutils dd">
356             <primary sortas="b-dd">dd</primary>
357           </indexterm>
358         </listitem>
359       </varlistentry>
361       <varlistentry id="df">
362         <term><command>df</command></term>
363         <listitem>
364           <para>Reports the amount of disk space available (and used) on all
365           mounted file systems, or only on the file systems holding the selected
366           files</para>
367           <indexterm zone="ch-system-coreutils df">
368             <primary sortas="b-df">df</primary>
369           </indexterm>
370         </listitem>
371       </varlistentry>
373       <varlistentry id="dir">
374         <term><command>dir</command></term>
375         <listitem>
376           <para>Lists the contents of each given directory (the same as
377           the <command>ls</command> command)</para>
378           <indexterm zone="ch-system-coreutils dir">
379             <primary sortas="b-dir">dir</primary>
380           </indexterm>
381         </listitem>
382       </varlistentry>
384       <varlistentry id="dircolors">
385         <term><command>dircolors</command></term>
386         <listitem>
387           <para>Outputs commands to set the <envar>LS_COLOR</envar>
388           environment variable to change the color scheme used by
389           <command>ls</command></para>
390           <indexterm zone="ch-system-coreutils dircolors">
391             <primary sortas="b-dircolors">dircolors</primary>
392           </indexterm>
393         </listitem>
394       </varlistentry>
396       <varlistentry id="dirname">
397         <term><command>dirname</command></term>
398         <listitem>
399           <para>Strips the non-directory suffix from a file name</para>
400           <indexterm zone="ch-system-coreutils dirname">
401             <primary sortas="b-dirname">dirname</primary>
402           </indexterm>
403         </listitem>
404       </varlistentry>
406       <varlistentry id="du">
407         <term><command>du</command></term>
408         <listitem>
409           <para>Reports the amount of disk space used by the current directory,
410           by each of the given directories (including all subdirectories) or by
411           each of the given files</para>
412           <indexterm zone="ch-system-coreutils du">
413             <primary sortas="b-du">du</primary>
414           </indexterm>
415         </listitem>
416       </varlistentry>
418       <varlistentry id="echo">
419         <term><command>echo</command></term>
420         <listitem>
421           <para>Displays the given strings</para>
422           <indexterm zone="ch-system-coreutils echo">
423             <primary sortas="b-echo">echo</primary>
424           </indexterm>
425         </listitem>
426       </varlistentry>
428       <varlistentry id="env">
429         <term><command>env</command></term>
430         <listitem>
431           <para>Runs a command in a modified environment</para>
432           <indexterm zone="ch-system-coreutils env">
433             <primary sortas="b-env">env</primary>
434           </indexterm>
435         </listitem>
436       </varlistentry>
438       <varlistentry id="expand">
439         <term><command>expand</command></term>
440         <listitem>
441           <para>Converts tabs to spaces</para>
442           <indexterm zone="ch-system-coreutils expand">
443             <primary sortas="b-expand">expand</primary>
444           </indexterm>
445         </listitem>
446       </varlistentry>
448       <varlistentry id="expr">
449         <term><command>expr</command></term>
450         <listitem>
451           <para>Evaluates expressions</para>
452           <indexterm zone="ch-system-coreutils expr">
453             <primary sortas="b-expr">expr</primary>
454           </indexterm>
455         </listitem>
456       </varlistentry>
458       <varlistentry id="factor">
459         <term><command>factor</command></term>
460         <listitem>
461           <para>Prints the prime factors of all specified integer numbers</para>
462           <indexterm zone="ch-system-coreutils factor">
463             <primary sortas="b-factor">factor</primary>
464           </indexterm>
465         </listitem>
466       </varlistentry>
468       <varlistentry id="false">
469         <term><command>false</command></term>
470         <listitem>
471           <para>Does nothing, unsuccessfully; it always exits with a status code
472           indicating failure</para>
473           <indexterm zone="ch-system-coreutils false">
474             <primary sortas="b-false">false</primary>
475           </indexterm>
476         </listitem>
477       </varlistentry>
479       <varlistentry id="fmt">
480         <term><command>fmt</command></term>
481         <listitem>
482           <para>Reformats the paragraphs in the given files</para>
483           <indexterm zone="ch-system-coreutils fmt">
484             <primary sortas="b-fmt">fmt</primary>
485           </indexterm>
486         </listitem>
487       </varlistentry>
489       <varlistentry id="fold">
490         <term><command>fold</command></term>
491         <listitem>
492           <para>Wraps the lines in the given files</para>
493           <indexterm zone="ch-system-coreutils fold">
494             <primary sortas="b-fold">fold</primary>
495           </indexterm>
496         </listitem>
497       </varlistentry>
499       <varlistentry id="groups">
500         <term><command>groups</command></term>
501         <listitem>
502           <para>Reports a user's group memberships</para>
503           <indexterm zone="ch-system-coreutils groups">
504             <primary sortas="b-groups">groups</primary>
505           </indexterm>
506         </listitem>
507       </varlistentry>
509       <varlistentry id="head">
510         <term><command>head</command></term>
511         <listitem>
512           <para>Prints the first ten lines (or the given number of lines)
513           of each given file</para>
514           <indexterm zone="ch-system-coreutils head">
515             <primary sortas="b-head">head</primary>
516           </indexterm>
517         </listitem>
518       </varlistentry>
520       <varlistentry id="hostid">
521         <term><command>hostid</command></term>
522         <listitem>
523           <para>Reports the numeric identifier (in hexadecimal) of the host</para>
524           <indexterm zone="ch-system-coreutils hostid">
525             <primary sortas="b-hostid">hostid</primary>
526           </indexterm>
527         </listitem>
528       </varlistentry>
530       <varlistentry id="id">
531         <term><command>id</command></term>
532         <listitem>
533           <para>Reports the effective user ID, group ID, and group memberships
534           of the current user or specified user</para>
535           <indexterm zone="ch-system-coreutils id">
536             <primary sortas="b-id">id</primary>
537           </indexterm>
538         </listitem>
539       </varlistentry>
541       <varlistentry id="install">
542         <term><command>install</command> </term>
543         <listitem>
544           <para>Copies files while setting their permission modes and, if
545           possible, their owner and group</para>
546           <indexterm zone="ch-system-coreutils install">
547             <primary sortas="b-install">install</primary>
548           </indexterm>
549         </listitem>
550       </varlistentry>
552       <varlistentry id="join">
553         <term><command>join</command></term>
554         <listitem>
555           <para>Joins the lines that have identical join fields from two
556           separate files</para>
557           <indexterm zone="ch-system-coreutils join">
558             <primary sortas="b-join">join</primary>
559           </indexterm>
560         </listitem>
561       </varlistentry>
563       <varlistentry id="link">
564         <term><command>link</command></term>
565         <listitem>
566           <para>Creates a hard link with the given name to a file</para>
567           <indexterm zone="ch-system-coreutils link">
568             <primary sortas="b-link">link</primary>
569           </indexterm>
570         </listitem>
571       </varlistentry>
573       <varlistentry id="ln">
574         <term><command>ln</command></term>
575         <listitem>
576           <para>Makes hard links or soft (symbolic) links between files</para>
577           <indexterm zone="ch-system-coreutils ln">
578             <primary sortas="b-ln">ln</primary>
579           </indexterm>
580         </listitem>
581       </varlistentry>
583       <varlistentry id="logname">
584         <term><command>logname</command></term>
585         <listitem>
586           <para>Reports the current user's login name</para>
587           <indexterm zone="ch-system-coreutils logname">
588             <primary sortas="b-logname">logname</primary>
589           </indexterm>
590         </listitem>
591       </varlistentry>
593       <varlistentry id="ls">
594         <term><command>ls</command></term>
595         <listitem>
596           <para>Lists the contents of each given directory</para>
597           <indexterm zone="ch-system-coreutils ls">
598             <primary sortas="b-ls">ls</primary>
599           </indexterm>
600         </listitem>
601       </varlistentry>
603       <varlistentry id="md5sum">
604         <term><command>md5sum</command></term>
605         <listitem>
606           <para>Reports or checks Message Digest 5 (MD5) checksums</para>
607           <indexterm zone="ch-system-coreutils md5sum">
608             <primary sortas="b-md5sum">md5sum</primary>
609           </indexterm>
610         </listitem>
611       </varlistentry>
613       <varlistentry id="mkdir">
614         <term><command>mkdir</command></term>
615         <listitem>
616           <para>Creates directories with the given names</para>
617           <indexterm zone="ch-system-coreutils mkdir">
618             <primary sortas="b-mkdir">mkdir</primary>
619           </indexterm>
620         </listitem>
621       </varlistentry>
623       <varlistentry id="mkfifo">
624         <term><command>mkfifo</command></term>
625         <listitem>
626           <para>Creates First-In, First-Outs (FIFOs), a "named
627           pipe" in UNIX parlance, with the given names</para>
628           <indexterm zone="ch-system-coreutils mkfifo">
629             <primary sortas="b-mkfifo">mkfifo</primary>
630           </indexterm>
631         </listitem>
632       </varlistentry>
634       <varlistentry id="mknod">
635         <term><command>mknod</command></term>
636         <listitem>
637           <para>Creates device nodes with the given names; a device node is a
638           character special file, a block special file, or a FIFO</para>
639           <indexterm zone="ch-system-coreutils mknod">
640             <primary sortas="b-mknod">mknod</primary>
641           </indexterm>
642         </listitem>
643       </varlistentry>
645       <varlistentry id="mktemp">
646         <term><command>mktemp</command></term>
647         <listitem>
648           <para>Creates temporary files in a secure manner; it is used in scripts</para>
649         <indexterm zone="ch-system-coreutils mktemp">
650           <primary sortas="b-mktemp">mktemp</primary>
651         </indexterm>
652        </listitem>
653      </varlistentry>
655       <varlistentry id="mv">
656         <term><command>mv</command></term>
657         <listitem>
658           <para>Moves or renames files or directories</para>
659           <indexterm zone="ch-system-coreutils mv">
660             <primary sortas="b-mv">mv</primary>
661           </indexterm>
662         </listitem>
663       </varlistentry>
665       <varlistentry id="nice">
666         <term><command>nice</command></term>
667         <listitem>
668           <para>Runs a program with modified scheduling priority</para>
669           <indexterm zone="ch-system-coreutils nice">
670             <primary sortas="b-nice">nice</primary>
671           </indexterm>
672         </listitem>
673       </varlistentry>
675       <varlistentry id="nl">
676         <term><command>nl</command></term>
677         <listitem>
678           <para>Numbers the lines from the given files</para>
679           <indexterm zone="ch-system-coreutils nl">
680             <primary sortas="b-nl">nl</primary>
681           </indexterm>
682         </listitem>
683       </varlistentry>
685       <varlistentry id="nohup">
686         <term><command>nohup</command></term>
687         <listitem>
688           <para>Runs a command immune to hangups, with its output redirected to
689           a log file</para>
690           <indexterm zone="ch-system-coreutils nohup">
691             <primary sortas="b-nohup">nohup</primary>
692           </indexterm>
693         </listitem>
694       </varlistentry>
696       <varlistentry id="nproc">
697         <term><command>nproc</command></term>
698         <listitem>
699           <para>Prints the number of processing units available to a
700           process</para>
701           <indexterm zone="ch-system-coreutils nproc">
702             <primary sortas="b-nproc">nproc</primary>
703           </indexterm>
704         </listitem>
705       </varlistentry>
707       <varlistentry id="numfmt">
708         <term><command>numfmt</command></term>
709         <listitem>
710           <para>Converts numbers to or from human-readable strings</para>
711           <indexterm zone="ch-system-coreutils numfmt">
712             <primary sortas="b-numfmt">numfmt</primary>
713           </indexterm>
714         </listitem>
715       </varlistentry>
717       <varlistentry id="od">
718         <term><command>od</command></term>
719         <listitem>
720           <para>Dumps files in octal and other formats</para>
721           <indexterm zone="ch-system-coreutils od">
722             <primary sortas="b-od">od</primary>
723           </indexterm>
724         </listitem>
725       </varlistentry>
727       <varlistentry id="paste">
728         <term><command>paste</command></term>
729         <listitem>
730           <para>Merges the given files, joining sequentially corresponding lines
731           side by side, separated by tab characters</para>
732           <indexterm zone="ch-system-coreutils paste">
733             <primary sortas="b-paste">paste</primary>
734           </indexterm>
735         </listitem>
736       </varlistentry>
738       <varlistentry id="pathchk">
739         <term><command>pathchk</command></term>
740         <listitem>
741           <para>Checks if file names are valid or portable</para>
742           <indexterm zone="ch-system-coreutils pathchk">
743             <primary sortas="b-pathchk">pathchk</primary>
744           </indexterm>
745         </listitem>
746       </varlistentry>
748       <varlistentry id="pinky">
749         <term><command>pinky</command></term>
750         <listitem>
751           <para>Is a lightweight finger client; it reports some information
752           about the given users</para>
753           <indexterm zone="ch-system-coreutils pinky">
754             <primary sortas="b-pinky">pinky</primary>
755           </indexterm>
756         </listitem>
757       </varlistentry>
759       <varlistentry id="pr">
760         <term><command>pr</command></term>
761         <listitem>
762           <para>Paginates and columnates files for printing</para>
763           <indexterm zone="ch-system-coreutils pr">
764             <primary sortas="b-pr">pr</primary>
765           </indexterm>
766         </listitem>
767       </varlistentry>
769       <varlistentry id="printenv">
770         <term><command>printenv</command></term>
771         <listitem>
772           <para>Prints the environment</para>
773           <indexterm zone="ch-system-coreutils printenv">
774             <primary sortas="b-printenv">printenv</primary>
775           </indexterm>
776         </listitem>
777       </varlistentry>
779       <varlistentry id="printf">
780         <term><command>printf</command></term>
781         <listitem>
782           <para>Prints the given arguments according to the given format, much
783           like the C printf function</para>
784           <indexterm zone="ch-system-coreutils printf">
785             <primary sortas="b-printf">printf</primary>
786           </indexterm>
787         </listitem>
788       </varlistentry>
790       <varlistentry id="ptx">
791         <term><command>ptx</command></term>
792         <listitem>
793           <para>Produces a permuted index from the contents of the given files,
794           with each keyword in its context</para>
795           <indexterm zone="ch-system-coreutils ptx">
796             <primary sortas="b-ptx">ptx</primary>
797           </indexterm>
798         </listitem>
799       </varlistentry>
801       <varlistentry id="pwd">
802         <term><command>pwd</command></term>
803         <listitem>
804           <para>Reports the name of the current working directory</para>
805           <indexterm zone="ch-system-coreutils pwd">
806             <primary sortas="b-pwd">pwd</primary>
807           </indexterm>
808         </listitem>
809       </varlistentry>
811       <varlistentry id="readlink">
812         <term><command>readlink</command></term>
813         <listitem>
814           <para>Reports the value of the given symbolic link</para>
815           <indexterm zone="ch-system-coreutils readlink">
816             <primary sortas="b-readlink">readlink</primary>
817           </indexterm>
818         </listitem>
819       </varlistentry>
821       <varlistentry id="realpath">
822         <term><command>realpath</command></term>
823         <listitem>
824           <para>Prints the resolved path</para>
825           <indexterm zone="ch-system-coreutils realpath">
826             <primary sortas="b-realpath">realpath</primary>
827           </indexterm>
828         </listitem>
829       </varlistentry>
831       <varlistentry id="rm">
832         <term><command>rm</command></term>
833         <listitem>
834           <para>Removes files or directories</para>
835           <indexterm zone="ch-system-coreutils rm">
836             <primary sortas="b-rm">rm</primary>
837           </indexterm>
838         </listitem>
839       </varlistentry>
841       <varlistentry id="rmdir">
842         <term><command>rmdir</command></term>
843         <listitem>
844           <para>Removes directories if they are empty</para>
845           <indexterm zone="ch-system-coreutils rmdir">
846             <primary sortas="b-rmdir">rmdir</primary>
847           </indexterm>
848         </listitem>
849       </varlistentry>
851       <varlistentry id="runcon">
852         <term><command>runcon</command></term>
853         <listitem>
854           <para>Runs a command with specified security context</para>
855           <indexterm zone="ch-system-coreutils runcon">
856             <primary sortas="b-runcon">runcon</primary>
857           </indexterm>
858         </listitem>
859       </varlistentry>
861       <varlistentry id="seq">
862         <term><command>seq</command></term>
863         <listitem>
864           <para>Prints a sequence of numbers within a given range and with a
865           given increment</para>
866           <indexterm zone="ch-system-coreutils seq">
867             <primary sortas="b-seq">seq</primary>
868           </indexterm>
869         </listitem>
870       </varlistentry>
872       <varlistentry id="sha1sum">
873         <term><command>sha1sum</command></term>
874         <listitem>
875           <para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1)
876           checksums</para>
877           <indexterm zone="ch-system-coreutils sha1sum">
878             <primary sortas="b-sha1sum">sha1sum</primary>
879           </indexterm>
880         </listitem>
881       </varlistentry>
883       <varlistentry id="sha224sum">
884         <term><command>sha224sum</command></term>
885         <listitem>
886           <para>Prints or checks 224-bit Secure Hash Algorithm checksums</para>
887           <indexterm zone="ch-system-coreutils sha224sum">
888             <primary sortas="b-sha224sum">sha224sum</primary>
889           </indexterm>
890         </listitem>
891       </varlistentry>
893       <varlistentry id="sha256sum">
894         <term><command>sha256sum</command></term>
895         <listitem>
896           <para>Prints or checks 256-bit Secure Hash Algorithm checksums</para>
897           <indexterm zone="ch-system-coreutils sha256sum">
898             <primary sortas="b-sha256sum">sha256sum</primary>
899           </indexterm>
900         </listitem>
901       </varlistentry>
903       <varlistentry id="sha384sum">
904         <term><command>sha384sum</command></term>
905         <listitem>
906           <para>Prints or checks 384-bit Secure Hash Algorithm checksums</para>
907           <indexterm zone="ch-system-coreutils sha384sum">
908             <primary sortas="b-sha384sum">sha384sum</primary>
909           </indexterm>
910         </listitem>
911       </varlistentry>
913       <varlistentry id="sha512sum">
914         <term><command>sha512sum</command></term>
915         <listitem>
916           <para>Prints or checks 512-bit Secure Hash Algorithm checksums</para>
917           <indexterm zone="ch-system-coreutils sha512sum">
918             <primary sortas="b-sha512sum">sha512sum</primary>
919           </indexterm>
920         </listitem>
921       </varlistentry>
923       <varlistentry id="shred">
924         <term><command>shred</command></term>
925         <listitem>
926           <para>Overwrites the given files repeatedly with complex patterns,
927           making it difficult to recover the data</para>
928           <indexterm zone="ch-system-coreutils shred">
929             <primary sortas="b-shred">shred</primary>
930           </indexterm>
931         </listitem>
932       </varlistentry>
934       <varlistentry id="shuf">
935         <term><command>shuf</command></term>
936         <listitem>
937           <para>Shuffles lines of text</para>
938           <indexterm zone="ch-system-coreutils shuf">
939             <primary sortas="b-shuf">shuf</primary>
940           </indexterm>
941         </listitem>
942       </varlistentry>
944       <varlistentry id="sleep">
945         <term><command>sleep</command></term>
946         <listitem>
947           <para>Pauses for the given amount of time</para>
948           <indexterm zone="ch-system-coreutils sleep">
949             <primary sortas="b-sleep">sleep</primary>
950           </indexterm>
951         </listitem>
952       </varlistentry>
954       <varlistentry id="sort">
955         <term><command>sort</command></term>
956         <listitem>
957           <para>Sorts the lines from the given files</para>
958           <indexterm zone="ch-system-coreutils sort">
959             <primary sortas="b-sort">sort</primary>
960           </indexterm>
961         </listitem>
962       </varlistentry>
964       <varlistentry id="split">
965         <term><command>split</command></term>
966         <listitem>
967           <para>Splits the given file into pieces, by size or by number of
968           lines</para>
969           <indexterm zone="ch-system-coreutils split">
970             <primary sortas="b-split">split</primary>
971           </indexterm>
972         </listitem>
973       </varlistentry>
975       <varlistentry id="stat">
976         <term><command>stat</command></term>
977         <listitem>
978           <para>Displays file or filesystem status</para>
979           <indexterm zone="ch-system-coreutils stat">
980             <primary sortas="b-stat">stat</primary>
981           </indexterm>
982         </listitem>
983       </varlistentry>
985       <varlistentry id="stdbuf">
986         <term><command>stdbuf</command></term>
987         <listitem>
988           <para>Runs commands with altered buffering operations for its standard
989           streams</para>
990           <indexterm zone="ch-system-coreutils stdbuf">
991             <primary sortas="b-stdbuf">stdbuf</primary>
992           </indexterm>
993         </listitem>
994       </varlistentry>
996       <varlistentry id="stty">
997         <term><command>stty</command></term>
998         <listitem>
999           <para>Sets or reports terminal line settings</para>
1000           <indexterm zone="ch-system-coreutils stty">
1001             <primary sortas="b-stty">stty</primary>
1002           </indexterm>
1003         </listitem>
1004       </varlistentry>
1006       <varlistentry id="sum">
1007         <term><command>sum</command></term>
1008         <listitem>
1009           <para>Prints checksum and block counts for each given file</para>
1010           <indexterm zone="ch-system-coreutils sum">
1011             <primary sortas="b-sum">sum</primary>
1012           </indexterm>
1013         </listitem>
1014       </varlistentry>
1016       <varlistentry id="sync">
1017         <term><command>sync</command></term>
1018         <listitem>
1019           <para>Flushes file system buffers; it forces changed blocks to disk
1020           and updates the super block</para>
1021           <indexterm zone="ch-system-coreutils sync">
1022             <primary sortas="b-sync">sync</primary>
1023           </indexterm>
1024         </listitem>
1025       </varlistentry>
1027       <varlistentry id="tac">
1028         <term><command>tac</command></term>
1029         <listitem>
1030           <para>Concatenates the given files in reverse</para>
1031           <indexterm zone="ch-system-coreutils tac">
1032             <primary sortas="b-tac">tac</primary>
1033           </indexterm>
1034         </listitem>
1035       </varlistentry>
1037       <varlistentry id="tail">
1038         <term><command>tail</command></term>
1039         <listitem>
1040           <para>Prints the last ten lines (or the given number of lines) of each
1041           given file</para>
1042           <indexterm zone="ch-system-coreutils tail">
1043             <primary sortas="b-tail">tail</primary>
1044           </indexterm>
1045         </listitem>
1046       </varlistentry>
1048       <varlistentry id="tee">
1049         <term><command>tee</command></term>
1050         <listitem>
1051           <para>Reads from standard input while writing both to standard output
1052           and to the given files</para>
1053           <indexterm zone="ch-system-coreutils tee">
1054             <primary sortas="b-tee">tee</primary>
1055           </indexterm>
1056         </listitem>
1057       </varlistentry>
1059       <varlistentry id="test">
1060         <term><command>test</command></term>
1061         <listitem>
1062           <para>Compares values and checks file types</para>
1063           <indexterm zone="ch-system-coreutils test">
1064             <primary sortas="b-test">test</primary>
1065           </indexterm>
1066         </listitem>
1067       </varlistentry>
1069       <varlistentry id="timeout">
1070         <term><command>timeout</command></term>
1071         <listitem>
1072           <para>Runs a command with a time limit</para>
1073           <indexterm zone="ch-system-coreutils timeout">
1074             <primary sortas="b-timeout">timeout</primary>
1075           </indexterm>
1076         </listitem>
1077       </varlistentry>
1079       <varlistentry id="touch">
1080         <term><command>touch</command></term>
1081         <listitem>
1082           <para>Changes file timestamps, setting the access and modification
1083           times of the given files to the current time; files that do not exist
1084           are created with zero length</para>
1085           <indexterm zone="ch-system-coreutils touch">
1086             <primary sortas="b-touch">touch</primary>
1087           </indexterm>
1088         </listitem>
1089       </varlistentry>
1091       <varlistentry id="tr">
1092         <term><command>tr</command></term>
1093         <listitem>
1094           <para>Translates, squeezes, and deletes the given characters from
1095           standard input</para>
1096           <indexterm zone="ch-system-coreutils tr">
1097             <primary sortas="b-tr">tr</primary>
1098           </indexterm>
1099         </listitem>
1100       </varlistentry>
1102       <varlistentry id="true">
1103         <term><command>true</command></term>
1104         <listitem>
1105           <para>Does nothing, successfully; it always exits with a status code
1106           indicating success</para>
1107           <indexterm zone="ch-system-coreutils true">
1108             <primary sortas="b-true">true</primary>
1109           </indexterm>
1110         </listitem>
1111       </varlistentry>
1113       <varlistentry id="truncate">
1114         <term><command>truncate</command></term>
1115         <listitem>
1116           <para>Shrinks or expands a file to the specified size</para>
1117           <indexterm zone="ch-system-coreutils truncate">
1118             <primary sortas="b-truncate">truncate</primary>
1119           </indexterm>
1120         </listitem>
1121       </varlistentry>
1123       <varlistentry id="tsort">
1124         <term><command>tsort</command></term>
1125         <listitem>
1126           <para>Performs a topological sort; it writes a completely ordered list
1127           according to the partial ordering in a given file</para>
1128           <indexterm zone="ch-system-coreutils tsort">
1129             <primary sortas="b-tsort">tsort</primary>
1130           </indexterm>
1131         </listitem>
1132       </varlistentry>
1134       <varlistentry id="tty">
1135         <term><command>tty</command></term>
1136         <listitem>
1137           <para>Reports the file name of the terminal connected to standard
1138           input</para>
1139           <indexterm zone="ch-system-coreutils tty">
1140             <primary sortas="b-tty">tty</primary>
1141           </indexterm>
1142         </listitem>
1143       </varlistentry>
1145       <varlistentry id="uname">
1146         <term><command>uname</command></term>
1147         <listitem>
1148           <para>Reports system information</para>
1149           <indexterm zone="ch-system-coreutils uname">
1150             <primary sortas="b-uname">uname</primary>
1151           </indexterm>
1152         </listitem>
1153       </varlistentry>
1155       <varlistentry id="unexpand">
1156         <term><command>unexpand</command></term>
1157         <listitem>
1158           <para>Converts spaces to tabs</para>
1159           <indexterm zone="ch-system-coreutils unexpand">
1160             <primary sortas="b-unexpand">unexpand</primary>
1161           </indexterm>
1162         </listitem>
1163       </varlistentry>
1165       <varlistentry id="uniq">
1166         <term><command>uniq</command></term>
1167         <listitem>
1168           <para>Discards all but one of successive identical lines</para>
1169           <indexterm zone="ch-system-coreutils uniq">
1170             <primary sortas="b-uniq">uniq</primary>
1171           </indexterm>
1172         </listitem>
1173       </varlistentry>
1175       <varlistentry id="unlink">
1176         <term><command>unlink</command></term>
1177         <listitem>
1178           <para>Removes the given file</para>
1179           <indexterm zone="ch-system-coreutils unlink">
1180             <primary sortas="b-unlink">unlink</primary>
1181           </indexterm>
1182         </listitem>
1183       </varlistentry>
1185       <varlistentry id="users">
1186         <term><command>users</command></term>
1187         <listitem>
1188           <para>Reports the names of the users currently logged on</para>
1189           <indexterm zone="ch-system-coreutils users">
1190             <primary sortas="b-users">users</primary>
1191           </indexterm>
1192         </listitem>
1193       </varlistentry>
1195       <varlistentry id="vdir">
1196         <term><command>vdir</command></term>
1197         <listitem>
1198           <para>Is the same as <command>ls -l</command></para>
1199           <indexterm zone="ch-system-coreutils vdir">
1200             <primary sortas="b-vdir">vdir</primary>
1201           </indexterm>
1202         </listitem>
1203       </varlistentry>
1205       <varlistentry id="wc">
1206         <term><command>wc</command></term>
1207         <listitem>
1208           <para>Reports the number of lines, words, and bytes for each given
1209           file, as well as a total line when more than one file is given</para>
1210           <indexterm zone="ch-system-coreutils wc">
1211             <primary sortas="b-wc">wc</primary>
1212           </indexterm>
1213         </listitem>
1214       </varlistentry>
1216       <varlistentry id="who">
1217         <term><command>who</command></term>
1218         <listitem>
1219           <para>Reports who is logged on</para>
1220           <indexterm zone="ch-system-coreutils who">
1221             <primary sortas="b-who">who</primary>
1222           </indexterm>
1223         </listitem>
1224       </varlistentry>
1226       <varlistentry id="whoami">
1227         <term><command>whoami</command></term>
1228         <listitem>
1229           <para>Reports the user name associated with the current effective
1230           user ID</para>
1231           <indexterm zone="ch-system-coreutils whoami">
1232             <primary sortas="b-whoami">whoami</primary>
1233           </indexterm>
1234         </listitem>
1235       </varlistentry>
1237       <varlistentry id="yes">
1238         <term><command>yes</command></term>
1239         <listitem>
1240           <para>Repeatedly outputs <quote>y</quote> or a given string until
1241           killed</para>
1242           <indexterm zone="ch-system-coreutils yes">
1243             <primary sortas="b-yes">yes</primary>
1244           </indexterm>
1245         </listitem>
1246       </varlistentry>
1248       <varlistentry id="libstdbuf">
1249         <term><filename class="libraryfile">libstdbuf</filename></term>
1250         <listitem>
1251           <para>Library used by <command>stdbuf</command></para>
1252           <indexterm zone="ch-system-coreutils libstdbuf">
1253             <primary sortas="c-libstdbuf">libstdbuf</primary>
1254           </indexterm>
1255         </listitem>
1256       </varlistentry>
1258     </variablelist>
1260   </sect2>
1262 </sect1>