source: chapter06/coreutils.xml@ 7406bec

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 ml-11.0 multilib old-trunk trunk xry111/git-transition xry111/glibc-2.34 xry111/tester-nohack xry111/usr-move
Last change on this file since 7406bec was 7406bec, checked in by Bruce Dubbs <bdubbs@…>, 19 months ago

Add an unprivileged user, tester, at the
beginning of Chapter 6 for running some tests. This
user is then removed at the end of the chapter.

Update to zstd-1.4.5. Fixes
Update to util-linux-2.35.2. Fixes
Update to bison-3.6.2. Fixes
Update to linux-5.6.15. Fixes

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11864 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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