source: chapter06/coreutils.xml@ 4594811

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 4594811 was 4594811, checked in by Matthew Burgess <matthew@…>, 18 years ago

Remove a redundant fix for a buffer overflow in Coreutils

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

  • Property mode set to 100644
File size: 36.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/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 <title>Coreutils-&coreutils-version;</title>
12
13 <indexterm zone="ch-system-coreutils">
14 <primary sortas="a-Coreutils">Coreutils</primary>
15 </indexterm>
16
17 <sect2 role="package">
18 <title/>
19
20 <para>The Coreutils package contains utilities for showing and setting the
21 basic system characteristics.</para>
22
23 <segmentedlist>
24 <segtitle>&buildtime;</segtitle>
25 <segtitle>&diskspace;</segtitle>
26
27 <seglistitem>
28 <seg>&coreutils-ch6-sbu;</seg>
29 <seg>&coreutils-ch6-du;</seg>
30 </seglistitem>
31 </segmentedlist>
32
33 </sect2>
34
35 <sect2 role="installation">
36 <title>Installation of Coreutils</title>
37
38 <para>A known issue with the <command>uname</command> program from
39 this package is that the <parameter>-p</parameter> switch always
40 returns <computeroutput>unknown</computeroutput>. The following patch
41 fixes this behavior for Intel architectures:</para>
42
43<screen><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen>
44
45 <para>Prevent Coreutils from installing binaries that will be installed by
46 other packages later:</para>
47
48<screen><userinput>patch -Np1 -i ../&coreutils-suppress-patch;</userinput></screen>
49
50 <para>POSIX requires that programs from Coreutils recognize character
51 boundaries correctly even in multibyte locales. The following patch
52 fixes this non-compliance and other internationalization-related bugs:</para>
53
54<screen><userinput>patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen>
55
56 <para>In order for the tests added by this patch to pass, the permissions for
57 the test file have to be changed:</para>
58
59<screen><userinput>chmod +x tests/sort/sort-mb-tests</userinput></screen>
60
61 <note>
62 <para>In the past, many bugs were found in this patch. When reporting new
63 bugs to Coreutils maintainers, please check first if they are reproducible
64 without this patch.</para>
65 </note>
66
67 <para>Now prepare Coreutils for compilation:</para>
68
69<screen><userinput>./configure --prefix=/usr</userinput></screen>
70
71 <para>Compile the package:</para>
72
73<screen><userinput>make</userinput></screen>
74
75 <para>The test suite of Coreutils makes several assumptions about the
76 presence of system users and groups that are not valid within the minimal
77 environment that exists at the moment. Therefore, additional items need
78 to be set up before running the tests. Skip down to <quote>Install the
79 package</quote> if not running the test suite.</para>
80
81 <para>Create two dummy groups and a dummy user:</para>
82
83<screen><userinput>echo "dummy1:x:1000:" &gt;&gt; /etc/group
84echo "dummy2:x:1001:dummy" &gt;&gt; /etc/group
85echo "dummy:x:1000:1000::/root:/bin/bash" &gt;&gt; /etc/passwd</userinput></screen>
86
87 <para>Now the test suite is ready to be run. First, run the tests that are
88 meant to be run as user <systemitem class="username">root</systemitem>:</para>
89
90<screen><userinput>make NON_ROOT_USERNAME=dummy check-root</userinput></screen>
91
92 <para>Then run the remainder of the tests as the
93 <systemitem class="username">dummy</systemitem> user:</para>
94
95<screen><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
96
97 <para>When testing is complete, remove the dummy user and groups:</para>
98
99<screen><userinput>sed -i '/dummy/d' /etc/passwd /etc/group</userinput></screen>
100
101 <para>Install the package:</para>
102
103<screen><userinput>make install</userinput></screen>
104
105 <para>Move programs to the locations specified by the FHS:</para>
106
107<screen><userinput>mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
108mv -v /usr/bin/{false,hostname,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
109mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
110mv -v /usr/bin/chroot /usr/sbin</userinput></screen>
111
112 <para>Some of the scripts in the LFS-Bootscripts package depend on
113 <command>head</command>, <command>sleep</command>, and
114 <command>nice</command>. As <filename class="directory">/usr</filename>
115 may not be available during the early stages of booting, those binaries
116 need to be on the root partition:</para>
117
118<screen><userinput>mv -v /usr/bin/{head,sleep,nice} /bin</userinput></screen>
119
120 </sect2>
121
122
123 <sect2 id="contents-coreutils" role="content">
124 <title>Contents of Coreutils</title>
125
126 <segmentedlist>
127 <segtitle>Installed programs</segtitle>
128
129 <seglistitem>
130 <seg>basename, cat, chgrp, chmod, chown, chroot, cksum, comm, cp,
131 csplit, cut, date, dd, df, dir, dircolors, dirname, du, echo, env,
132 expand, expr, factor, false, fmt, fold, groups, head, hostid,
133 hostname, id, install, join, link, ln, logname, ls, md5sum, mkdir,
134 mkfifo, mknod, mv, nice, nl, nohup, od, paste, pathchk, pinky, pr,
135 printenv, printf, ptx, pwd, readlink, rm, rmdir, seq, sha1sum, shred,
136 sleep, sort, split, stat, stty, sum, sync, tac, tail, tee, test,
137 touch, tr, true, tsort, tty, uname, unexpand, uniq, unlink, users,
138 vdir, wc, who, whoami, and yes</seg>
139 </seglistitem>
140 </segmentedlist>
141
142 <variablelist>
143 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
144 <?dbfo list-presentation="list"?>
145 <?dbhtml list-presentation="table"?>
146
147 <varlistentry id="basename">
148 <term><command>basename</command></term>
149 <listitem>
150 <para>Strips any path and a given suffix from a file name</para>
151 <indexterm zone="ch-system-coreutils basename">
152 <primary sortas="b-basename">basename</primary>
153 </indexterm>
154 </listitem>
155 </varlistentry>
156
157 <varlistentry id="cat">
158 <term><command>cat</command></term>
159 <listitem>
160 <para>Concatenates files to standard output</para>
161 <indexterm zone="ch-system-coreutils cat">
162 <primary sortas="b-cat">cat</primary>
163 </indexterm>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry id="chgrp">
168 <term><command>chgrp</command></term>
169 <listitem>
170 <para>Changes the group ownership of files and directories</para>
171 <indexterm zone="ch-system-coreutils chgrp">
172 <primary sortas="b-chgrp">chgrp</primary>
173 </indexterm>
174 </listitem>
175 </varlistentry>
176
177 <varlistentry id="chmod">
178 <term><command>chmod</command></term>
179 <listitem>
180 <para>Changes the permissions of each file to the given mode; the mode
181 can be either a symbolic representation of the changes to make or an
182 octal number representing the new permissions</para>
183 <indexterm zone="ch-system-coreutils chmod">
184 <primary sortas="b-chmod">chmod</primary>
185 </indexterm>
186 </listitem>
187 </varlistentry>
188
189 <varlistentry id="chown">
190 <term><command>chown</command></term>
191 <listitem>
192 <para>Changes the user and/or group ownership of files and
193 directories</para>
194 <indexterm zone="ch-system-coreutils chown">
195 <primary sortas="b-chown">chown</primary>
196 </indexterm>
197 </listitem>
198 </varlistentry>
199
200 <varlistentry id="chroot">
201 <term><command>chroot</command></term>
202 <listitem>
203 <para>Runs a command with the specified directory as the
204 <filename class="directory">/</filename> directory</para>
205 <indexterm zone="ch-system-coreutils chroot">
206 <primary sortas="b-chroot">chroot</primary>
207 </indexterm>
208 </listitem>
209 </varlistentry>
210
211 <varlistentry id="cksum">
212 <term><command>cksum</command></term>
213 <listitem>
214 <para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte
215 counts of each specified file</para>
216 <indexterm zone="ch-system-coreutils cksum">
217 <primary sortas="b-cksum">cksum</primary>
218 </indexterm>
219 </listitem>
220 </varlistentry>
221
222 <varlistentry id="comm">
223 <term><command>comm</command></term>
224 <listitem>
225 <para>Compares two sorted files, outputting in three columns the lines
226 that are unique and the lines that are common</para>
227 <indexterm zone="ch-system-coreutils comm">
228 <primary sortas="b-comm">comm</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232
233 <varlistentry id="cp">
234 <term><command>cp</command></term>
235 <listitem>
236 <para>Copies files</para>
237 <indexterm zone="ch-system-coreutils cp">
238 <primary sortas="b-cp">cp</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="csplit">
244 <term><command>csplit</command></term>
245 <listitem>
246 <para>Splits a given file into several new files, separating them
247 according to given patterns or line numbers and outputting the byte
248 count of each new file</para>
249 <indexterm zone="ch-system-coreutils csplit">
250 <primary sortas="b-csplit">csplit</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 <varlistentry id="cut">
256 <term><command>cut</command></term>
257 <listitem>
258 <para>Prints sections of lines, selecting the parts according to given
259 fields or positions</para>
260 <indexterm zone="ch-system-coreutils cut">
261 <primary sortas="b-cut">cut</primary>
262 </indexterm>
263 </listitem>
264 </varlistentry>
265
266 <varlistentry id="date">
267 <term><command>date</command></term>
268 <listitem>
269 <para>Displays the current time in the given format, or sets the
270 system date</para>
271 <indexterm zone="ch-system-coreutils date">
272 <primary sortas="b-date">date</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 <varlistentry id="dd">
278 <term><command>dd</command> </term>
279 <listitem>
280 <para>Copies a file using the given block size and count, while
281 optionally performing conversions on it</para>
282 <indexterm zone="ch-system-coreutils dd">
283 <primary sortas="b-dd">dd</primary>
284 </indexterm>
285 </listitem>
286 </varlistentry>
287
288 <varlistentry id="df">
289 <term><command>df</command></term>
290 <listitem>
291 <para>Reports the amount of disk space available (and used) on all
292 mounted file systems, or only on the file systems holding the selected
293 files</para>
294 <indexterm zone="ch-system-coreutils df">
295 <primary sortas="b-df">df</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="dir">
301 <term><command>dir</command></term>
302 <listitem>
303 <para>Lists the contents of each given directory (the same as
304 the <command>ls</command> command)</para>
305 <indexterm zone="ch-system-coreutils dir">
306 <primary sortas="b-dir">dir</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="dircolors">
312 <term><command>dircolors</command></term>
313 <listitem>
314 <para>Outputs commands to set the <envar>LS_COLOR</envar>
315 environment variable to change the color scheme used by
316 <command>ls</command></para>
317 <indexterm zone="ch-system-coreutils dircolors">
318 <primary sortas="b-dircolors">dircolors</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="dirname">
324 <term><command>dirname</command></term>
325 <listitem>
326 <para>Strips the non-directory suffix from a file name</para>
327 <indexterm zone="ch-system-coreutils dirname">
328 <primary sortas="b-dirname">dirname</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry id="du">
334 <term><command>du</command></term>
335 <listitem>
336 <para>Reports the amount of disk space used by the current directory,
337 by each of the given directories (including all subdirectories) or by
338 each of the given files</para>
339 <indexterm zone="ch-system-coreutils du">
340 <primary sortas="b-du">du</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry id="echo">
346 <term><command>echo</command></term>
347 <listitem>
348 <para>Displays the given strings</para>
349 <indexterm zone="ch-system-coreutils echo">
350 <primary sortas="b-echo">echo</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="env">
356 <term><command>env</command></term>
357 <listitem>
358 <para>Runs a command in a modified environment</para>
359 <indexterm zone="ch-system-coreutils env">
360 <primary sortas="b-env">env</primary>
361 </indexterm>
362 </listitem>
363 </varlistentry>
364
365 <varlistentry id="expand">
366 <term><command>expand</command></term>
367 <listitem>
368 <para>Converts tabs to spaces</para>
369 <indexterm zone="ch-system-coreutils expand">
370 <primary sortas="b-expand">expand</primary>
371 </indexterm>
372 </listitem>
373 </varlistentry>
374
375 <varlistentry id="expr">
376 <term><command>expr</command></term>
377 <listitem>
378 <para>Evaluates expressions</para>
379 <indexterm zone="ch-system-coreutils expr">
380 <primary sortas="b-expr">expr</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
385 <varlistentry id="factor">
386 <term><command>factor</command></term>
387 <listitem>
388 <para>Prints the prime factors of all specified integer numbers</para>
389 <indexterm zone="ch-system-coreutils factor">
390 <primary sortas="b-factor">factor</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="false">
396 <term><command>false</command></term>
397 <listitem>
398 <para>Does nothing, unsuccessfully; it always exits with a status code
399 indicating failure</para>
400 <indexterm zone="ch-system-coreutils false">
401 <primary sortas="b-false">false</primary>
402 </indexterm>
403 </listitem>
404 </varlistentry>
405
406 <varlistentry id="fmt">
407 <term><command>fmt</command></term>
408 <listitem>
409 <para>Reformats the paragraphs in the given files</para>
410 <indexterm zone="ch-system-coreutils fmt">
411 <primary sortas="b-fmt">fmt</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="fold">
417 <term><command>fold</command></term>
418 <listitem>
419 <para>Wraps the lines in the given files</para>
420 <indexterm zone="ch-system-coreutils fold">
421 <primary sortas="b-fold">fold</primary>
422 </indexterm>
423 </listitem>
424 </varlistentry>
425
426 <varlistentry id="groups">
427 <term><command>groups</command></term>
428 <listitem>
429 <para>Reports a user's group memberships</para>
430 <indexterm zone="ch-system-coreutils groups">
431 <primary sortas="b-groups">groups</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
436 <varlistentry id="head">
437 <term><command>head</command></term>
438 <listitem>
439 <para>Prints the first ten lines (or the given number of lines)
440 of each given file</para>
441 <indexterm zone="ch-system-coreutils head">
442 <primary sortas="b-head">head</primary>
443 </indexterm>
444 </listitem>
445 </varlistentry>
446
447 <varlistentry id="hostid">
448 <term><command>hostid</command></term>
449 <listitem>
450 <para>Reports the numeric identifier (in hexadecimal) of the host</para>
451 <indexterm zone="ch-system-coreutils hostid">
452 <primary sortas="b-hostid">hostid</primary>
453 </indexterm>
454 </listitem>
455 </varlistentry>
456
457 <varlistentry id="hostname">
458 <term><command>hostname</command></term>
459 <listitem>
460 <para>Reports or sets the name of the host</para>
461 <indexterm zone="ch-system-coreutils hostname">
462 <primary sortas="b-hostname">hostname</primary>
463 </indexterm>
464 </listitem>
465 </varlistentry>
466
467 <varlistentry id="id">
468 <term><command>id</command></term>
469 <listitem>
470 <para>Reports the effective user ID, group ID, and group memberships
471 of the current user or specified user</para>
472 <indexterm zone="ch-system-coreutils id">
473 <primary sortas="b-id">id</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
478 <varlistentry id="install">
479 <term><command>install</command> </term>
480 <listitem>
481 <para>Copies files while setting their permission modes and, if
482 possible, their owner and group</para>
483 <indexterm zone="ch-system-coreutils install">
484 <primary sortas="b-install">install</primary>
485 </indexterm>
486 </listitem>
487 </varlistentry>
488
489 <varlistentry id="join">
490 <term><command>join</command></term>
491 <listitem>
492 <para>Joins the lines that have identical join fields from two
493 separate files</para>
494 <indexterm zone="ch-system-coreutils join">
495 <primary sortas="b-join">join</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499
500 <varlistentry id="link">
501 <term><command>link</command></term>
502 <listitem>
503 <para>Creates a hard link with the given name to a file</para>
504 <indexterm zone="ch-system-coreutils link">
505 <primary sortas="b-link">link</primary>
506 </indexterm>
507 </listitem>
508 </varlistentry>
509
510 <varlistentry id="ln">
511 <term><command>ln</command></term>
512 <listitem>
513 <para>Makes hard links or soft (symbolic) links between files</para>
514 <indexterm zone="ch-system-coreutils ln">
515 <primary sortas="b-ln">ln</primary>
516 </indexterm>
517 </listitem>
518 </varlistentry>
519
520 <varlistentry id="logname">
521 <term><command>logname</command></term>
522 <listitem>
523 <para>Reports the current user's login name</para>
524 <indexterm zone="ch-system-coreutils logname">
525 <primary sortas="b-logname">logname</primary>
526 </indexterm>
527 </listitem>
528 </varlistentry>
529
530 <varlistentry id="ls">
531 <term><command>ls</command></term>
532 <listitem>
533 <para>Lists the contents of each given directory</para>
534 <indexterm zone="ch-system-coreutils ls">
535 <primary sortas="b-ls">ls</primary>
536 </indexterm>
537 </listitem>
538 </varlistentry>
539
540 <varlistentry id="md5sum">
541 <term><command>md5sum</command></term>
542 <listitem>
543 <para>Reports or checks Message Digest 5 (MD5) checksums</para>
544 <indexterm zone="ch-system-coreutils md5sum">
545 <primary sortas="b-md5sum">md5sum</primary>
546 </indexterm>
547 </listitem>
548 </varlistentry>
549
550 <varlistentry id="mkdir">
551 <term><command>mkdir</command></term>
552 <listitem>
553 <para>Creates directories with the given names</para>
554 <indexterm zone="ch-system-coreutils mkdir">
555 <primary sortas="b-mkdir">mkdir</primary>
556 </indexterm>
557 </listitem>
558 </varlistentry>
559
560 <varlistentry id="mkfifo">
561 <term><command>mkfifo</command></term>
562 <listitem>
563 <para>Creates First-In, First-Outs (FIFOs), a <quote>named
564 pipe</quote> in UNIX parlance, with the given names</para>
565 <indexterm zone="ch-system-coreutils mkfifo">
566 <primary sortas="b-mkfifo">mkfifo</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="mknod">
572 <term><command>mknod</command></term>
573 <listitem>
574 <para>Creates device nodes with the given names; a device node is a
575 character special file, a block special file, or a FIFO</para>
576 <indexterm zone="ch-system-coreutils mknod">
577 <primary sortas="b-mknod">mknod</primary>
578 </indexterm>
579 </listitem>
580 </varlistentry>
581
582 <varlistentry id="mv">
583 <term><command>mv</command></term>
584 <listitem>
585 <para>Moves or renames files or directories</para>
586 <indexterm zone="ch-system-coreutils mv">
587 <primary sortas="b-mv">mv</primary>
588 </indexterm>
589 </listitem>
590 </varlistentry>
591
592 <varlistentry id="nice">
593 <term><command>nice</command></term>
594 <listitem>
595 <para>Runs a program with modified scheduling priority</para>
596 <indexterm zone="ch-system-coreutils nice">
597 <primary sortas="b-nice">nice</primary>
598 </indexterm>
599 </listitem>
600 </varlistentry>
601
602 <varlistentry id="nl">
603 <term><command>nl</command></term>
604 <listitem>
605 <para>Numbers the lines from the given files</para>
606 <indexterm zone="ch-system-coreutils nl">
607 <primary sortas="b-nl">nl</primary>
608 </indexterm>
609 </listitem>
610 </varlistentry>
611
612 <varlistentry id="nohup">
613 <term><command>nohup</command></term>
614 <listitem>
615 <para>Runs a command immune to hangups, with its output redirected to
616 a log file</para>
617 <indexterm zone="ch-system-coreutils nohup">
618 <primary sortas="b-nohup">nohup</primary>
619 </indexterm>
620 </listitem>
621 </varlistentry>
622
623 <varlistentry id="od">
624 <term><command>od</command></term>
625 <listitem>
626 <para>Dumps files in octal and other formats</para>
627 <indexterm zone="ch-system-coreutils od">
628 <primary sortas="b-od">od</primary>
629 </indexterm>
630 </listitem>
631 </varlistentry>
632
633 <varlistentry id="paste">
634 <term><command>paste</command></term>
635 <listitem>
636 <para>Merges the given files, joining sequentially corresponding lines
637 side by side, separated by tab characters</para>
638 <indexterm zone="ch-system-coreutils paste">
639 <primary sortas="b-paste">paste</primary>
640 </indexterm>
641 </listitem>
642 </varlistentry>
643
644 <varlistentry id="pathchk">
645 <term><command>pathchk</command></term>
646 <listitem>
647 <para>Checks if file names are valid or portable</para>
648 <indexterm zone="ch-system-coreutils pathchk">
649 <primary sortas="b-pathchk">pathchk</primary>
650 </indexterm>
651 </listitem>
652 </varlistentry>
653
654 <varlistentry id="pinky">
655 <term><command>pinky</command></term>
656 <listitem>
657 <para>Is a lightweight finger client; it reports some information
658 about the given users</para>
659 <indexterm zone="ch-system-coreutils pinky">
660 <primary sortas="b-pinky">pinky</primary>
661 </indexterm>
662 </listitem>
663 </varlistentry>
664
665 <varlistentry id="pr">
666 <term><command>pr</command></term>
667 <listitem>
668 <para>Paginates and columnates files for printing</para>
669 <indexterm zone="ch-system-coreutils pr">
670 <primary sortas="b-pr">pr</primary>
671 </indexterm>
672 </listitem>
673 </varlistentry>
674
675 <varlistentry id="printenv">
676 <term><command>printenv</command></term>
677 <listitem>
678 <para>Prints the environment</para>
679 <indexterm zone="ch-system-coreutils printenv">
680 <primary sortas="b-printenv">printenv</primary>
681 </indexterm>
682 </listitem>
683 </varlistentry>
684
685 <varlistentry id="printf">
686 <term><command>printf</command></term>
687 <listitem>
688 <para>Prints the given arguments according to the given format, much
689 like the C printf function</para>
690 <indexterm zone="ch-system-coreutils printf">
691 <primary sortas="b-printf">printf</primary>
692 </indexterm>
693 </listitem>
694 </varlistentry>
695
696 <varlistentry id="ptx">
697 <term><command>ptx</command></term>
698 <listitem>
699 <para>Produces a permuted index from the contents of the given files,
700 with each keyword in its context</para>
701 <indexterm zone="ch-system-coreutils ptx">
702 <primary sortas="b-ptx">ptx</primary>
703 </indexterm>
704 </listitem>
705 </varlistentry>
706
707 <varlistentry id="pwd">
708 <term><command>pwd</command></term>
709 <listitem>
710 <para>Reports the name of the current working directory</para>
711 <indexterm zone="ch-system-coreutils pwd">
712 <primary sortas="b-pwd">pwd</primary>
713 </indexterm>
714 </listitem>
715 </varlistentry>
716
717 <varlistentry id="readlink">
718 <term><command>readlink</command></term>
719 <listitem>
720 <para>Reports the value of the given symbolic link</para>
721 <indexterm zone="ch-system-coreutils readlink">
722 <primary sortas="b-readlink">readlink</primary>
723 </indexterm>
724 </listitem>
725 </varlistentry>
726
727 <varlistentry id="rm">
728 <term><command>rm</command></term>
729 <listitem>
730 <para>Removes files or directories</para>
731 <indexterm zone="ch-system-coreutils rm">
732 <primary sortas="b-rm">rm</primary>
733 </indexterm>
734 </listitem>
735 </varlistentry>
736
737 <varlistentry id="rmdir">
738 <term><command>rmdir</command></term>
739 <listitem>
740 <para>Removes directories if they are empty</para>
741 <indexterm zone="ch-system-coreutils rmdir">
742 <primary sortas="b-rmdir">rmdir</primary>
743 </indexterm>
744 </listitem>
745 </varlistentry>
746
747 <varlistentry id="seq">
748 <term><command>seq</command></term>
749 <listitem>
750 <para>Prints a sequence of numbers within a given range and with a
751 given increment</para>
752 <indexterm zone="ch-system-coreutils seq">
753 <primary sortas="b-seq">seq</primary>
754 </indexterm>
755 </listitem>
756 </varlistentry>
757
758 <varlistentry id="sha1sum">
759 <term><command>sha1sum</command></term>
760 <listitem>
761 <para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1)
762 checksums</para>
763 <indexterm zone="ch-system-coreutils sha1sum">
764 <primary sortas="b-sha1sum">sha1sum</primary>
765 </indexterm>
766 </listitem>
767 </varlistentry>
768
769 <varlistentry id="shred">
770 <term><command>shred</command></term>
771 <listitem>
772 <para>Overwrites the given files repeatedly with complex patterns,
773 making it difficult to recover the data</para>
774 <indexterm zone="ch-system-coreutils shred">
775 <primary sortas="b-shred">shred</primary>
776 </indexterm>
777 </listitem>
778 </varlistentry>
779
780 <varlistentry id="sleep">
781 <term><command>sleep</command></term>
782 <listitem>
783 <para>Pauses for the given amount of time</para>
784 <indexterm zone="ch-system-coreutils sleep">
785 <primary sortas="b-sleep">sleep</primary>
786 </indexterm>
787 </listitem>
788 </varlistentry>
789
790 <varlistentry id="sort">
791 <term><command>sort</command></term>
792 <listitem>
793 <para>Sorts the lines from the given files</para>
794 <indexterm zone="ch-system-coreutils sort">
795 <primary sortas="b-sort">sort</primary>
796 </indexterm>
797 </listitem>
798 </varlistentry>
799
800 <varlistentry id="split">
801 <term><command>split</command></term>
802 <listitem>
803 <para>Splits the given file into pieces, by size or by number of
804 lines</para>
805 <indexterm zone="ch-system-coreutils split">
806 <primary sortas="b-split">split</primary>
807 </indexterm>
808 </listitem>
809 </varlistentry>
810
811 <varlistentry id="stat">
812 <term><command>stat</command></term>
813 <listitem>
814 <para>Displays file or filesystem status</para>
815 <indexterm zone="ch-system-coreutils stat">
816 <primary sortas="b-stat">stat</primary>
817 </indexterm>
818 </listitem>
819 </varlistentry>
820
821 <varlistentry id="stty">
822 <term><command>stty</command></term>
823 <listitem>
824 <para>Sets or reports terminal line settings</para>
825 <indexterm zone="ch-system-coreutils stty">
826 <primary sortas="b-stty">stty</primary>
827 </indexterm>
828 </listitem>
829 </varlistentry>
830
831 <varlistentry id="sum">
832 <term><command>sum</command></term>
833 <listitem>
834 <para>Prints checksum and block counts for each given file</para>
835 <indexterm zone="ch-system-coreutils sum">
836 <primary sortas="b-sum">sum</primary>
837 </indexterm>
838 </listitem>
839 </varlistentry>
840
841 <varlistentry id="sync">
842 <term><command>sync</command></term>
843 <listitem>
844 <para>Flushes file system buffers; it forces changed blocks to disk
845 and updates the super block</para>
846 <indexterm zone="ch-system-coreutils sync">
847 <primary sortas="b-sync">sync</primary>
848 </indexterm>
849 </listitem>
850 </varlistentry>
851
852 <varlistentry id="tac">
853 <term><command>tac</command></term>
854 <listitem>
855 <para>Concatenates the given files in reverse</para>
856 <indexterm zone="ch-system-coreutils tac">
857 <primary sortas="b-tac">tac</primary>
858 </indexterm>
859 </listitem>
860 </varlistentry>
861
862 <varlistentry id="tail">
863 <term><command>tail</command></term>
864 <listitem>
865 <para>Prints the last ten lines (or the given number of lines) of each
866 given file</para>
867 <indexterm zone="ch-system-coreutils tail">
868 <primary sortas="b-tail">tail</primary>
869 </indexterm>
870 </listitem>
871 </varlistentry>
872
873 <varlistentry id="tee">
874 <term><command>tee</command></term>
875 <listitem>
876 <para>Reads from standard input while writing both to standard output
877 and to the given files</para>
878 <indexterm zone="ch-system-coreutils tee">
879 <primary sortas="b-tee">tee</primary>
880 </indexterm>
881 </listitem>
882 </varlistentry>
883
884 <varlistentry id="test">
885 <term><command>test</command></term>
886 <listitem>
887 <para>Compares values and checks file types</para>
888 <indexterm zone="ch-system-coreutils test">
889 <primary sortas="b-test">test</primary>
890 </indexterm>
891 </listitem>
892 </varlistentry>
893
894 <varlistentry id="touch">
895 <term><command>touch</command></term>
896 <listitem>
897 <para>Changes file timestamps, setting the access and modification
898 times of the given files to the current time; files that do not exist
899 are created with zero length</para>
900 <indexterm zone="ch-system-coreutils touch">
901 <primary sortas="b-touch">touch</primary>
902 </indexterm>
903 </listitem>
904 </varlistentry>
905
906 <varlistentry id="tr">
907 <term><command>tr</command></term>
908 <listitem>
909 <para>Translates, squeezes, and deletes the given characters from
910 standard input</para>
911 <indexterm zone="ch-system-coreutils tr">
912 <primary sortas="b-tr">tr</primary>
913 </indexterm>
914 </listitem>
915 </varlistentry>
916
917 <varlistentry id="true">
918 <term><command>true</command></term>
919 <listitem>
920 <para>Does nothing, successfully; it always exits with a status code
921 indicating success</para>
922 <indexterm zone="ch-system-coreutils true">
923 <primary sortas="b-true">true</primary>
924 </indexterm>
925 </listitem>
926 </varlistentry>
927
928 <varlistentry id="tsort">
929 <term><command>tsort</command></term>
930 <listitem>
931 <para>Performs a topological sort; it writes a completely ordered list
932 according to the partial ordering in a given file</para>
933 <indexterm zone="ch-system-coreutils tsort">
934 <primary sortas="b-tsort">tsort</primary>
935 </indexterm>
936 </listitem>
937 </varlistentry>
938
939 <varlistentry id="tty">
940 <term><command>tty</command></term>
941 <listitem>
942 <para>Reports the file name of the terminal connected to standard
943 input</para>
944 <indexterm zone="ch-system-coreutils tty">
945 <primary sortas="b-tty">tty</primary>
946 </indexterm>
947 </listitem>
948 </varlistentry>
949
950 <varlistentry id="uname">
951 <term><command>uname</command></term>
952 <listitem>
953 <para>Reports system information</para>
954 <indexterm zone="ch-system-coreutils uname">
955 <primary sortas="b-uname">uname</primary>
956 </indexterm>
957 </listitem>
958 </varlistentry>
959
960 <varlistentry id="unexpand">
961 <term><command>unexpand</command></term>
962 <listitem>
963 <para>Converts spaces to tabs</para>
964 <indexterm zone="ch-system-coreutils unexpand">
965 <primary sortas="b-unexpand">unexpand</primary>
966 </indexterm>
967 </listitem>
968 </varlistentry>
969
970 <varlistentry id="uniq">
971 <term><command>uniq</command></term>
972 <listitem>
973 <para>Discards all but one of successive identical lines</para>
974 <indexterm zone="ch-system-coreutils uniq">
975 <primary sortas="b-uniq">uniq</primary>
976 </indexterm>
977 </listitem>
978 </varlistentry>
979
980 <varlistentry id="unlink">
981 <term><command>unlink</command></term>
982 <listitem>
983 <para>Removes the given file</para>
984 <indexterm zone="ch-system-coreutils unlink">
985 <primary sortas="b-unlink">unlink</primary>
986 </indexterm>
987 </listitem>
988 </varlistentry>
989
990 <varlistentry id="users">
991 <term><command>users</command></term>
992 <listitem>
993 <para>Reports the names of the users currently logged on</para>
994 <indexterm zone="ch-system-coreutils users">
995 <primary sortas="b-users">users</primary>
996 </indexterm>
997 </listitem>
998 </varlistentry>
999
1000 <varlistentry id="vdir">
1001 <term><command>vdir</command></term>
1002 <listitem>
1003 <para>Is the same as <command>ls -l</command></para>
1004 <indexterm zone="ch-system-coreutils vdir">
1005 <primary sortas="b-vdir">vdir</primary>
1006 </indexterm>
1007 </listitem>
1008 </varlistentry>
1009
1010 <varlistentry id="wc">
1011 <term><command>wc</command></term>
1012 <listitem>
1013 <para>Reports the number of lines, words, and bytes for each given
1014 file, as well as a total line when more than one file is given</para>
1015 <indexterm zone="ch-system-coreutils wc">
1016 <primary sortas="b-wc">wc</primary>
1017 </indexterm>
1018 </listitem>
1019 </varlistentry>
1020
1021 <varlistentry id="who">
1022 <term><command>who</command></term>
1023 <listitem>
1024 <para>Reports who is logged on</para>
1025 <indexterm zone="ch-system-coreutils who">
1026 <primary sortas="b-who">who</primary>
1027 </indexterm>
1028 </listitem>
1029 </varlistentry>
1030
1031 <varlistentry id="whoami">
1032 <term><command>whoami</command></term>
1033 <listitem>
1034 <para>Reports the user name associated with the current effective
1035 user ID</para>
1036 <indexterm zone="ch-system-coreutils whoami">
1037 <primary sortas="b-whoami">whoami</primary>
1038 </indexterm>
1039 </listitem>
1040 </varlistentry>
1041
1042 <varlistentry id="yes">
1043 <term><command>yes</command></term>
1044 <listitem>
1045 <para>Repeatedly outputs <quote>y</quote> or a given string until
1046 killed</para>
1047 <indexterm zone="ch-system-coreutils yes">
1048 <primary sortas="b-yes">yes</primary>
1049 </indexterm>
1050 </listitem>
1051 </varlistentry>
1052
1053 </variablelist>
1054
1055 </sect2>
1056
1057</sect1>
Note: See TracBrowser for help on using the repository browser.