coreutils.xml 43 KB

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