coreutils.xml 43 KB

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