coreutils.xml 43 KB

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