1
0

coreutils.xml 43 KB

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