coreutils.xml 44 KB

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