Added a few comments here and there
[linux_from_scratch.git] / newxml / appendixa / coreutils.xml
blobf79ff3d0cbeabe51c5a68221296db7d26aec3256
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3CR2//EN" "http://www.docbook.org/xml/4.3CR2/docbookx.dtd" [
3   <!ENTITY % coreutils-entities SYSTEM "../ent/coreutils.ent">
4   %coreutils-entities;
5 ]>
6 <sect1 id="aa-coreutils" xreflabel="Coreutils">
7 <title>Coreutils</title>
8 <?dbhtml filename="coreutils.html"?>
10 <para>For installation instructions see <xref linkend="ch06-coreutils"/>.</para>
12 <sect2><title>Official Download Location</title>
14 <literallayout>Coreutils (&coreutils-version;):
15 <ulink url="ftp://ftp.gnu.org/gnu/coreutils/"/>
17 Coreutils Hostname Patch:
18 <ulink url="http://www.linuxfromscratch.org/patches/lfs/cvs/coreutils-&coreutils-version;-hostname-2.patch"/>
20 Coreutils Uname Patch:
21 <ulink url="http://www.linuxfromscratch.org/patches/lfs/cvs/coreutils-&coreutils-version;-uname.patch"/></literallayout>
22 </sect2>
24 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils-contents.xml"/>
28 <sect2><title>Short descriptions</title>
30 <para><command>basename</command> strips any path and a given suffix from
31 the given file name.</para>
33 <para><command>cat</command> concatenates files to standard output.</para>
35 <para><command>chgrp</command> changes the group ownership of each given
36 file to the given group. The group can be either given a a name or a numeric
37 ID.</para>
39 <para><command>chmod</command> changes the permissions of each given file
40 to the given mode. The mode can be either a symbolic representation of the
41 changes to make, or an octal number representing the new permissions.</para>
43 <para><command>chown</command> changes the user and/or group ownership of
44 each given file to the given user:group pair.</para>
46 <para><command>chroot</command> runs a given command with the specified
47 directory as the <filename>/</filename> directory. The given command can be an
48 interactive shell. On most systems only <emphasis>root</emphasis> can do
49 this.</para>
51 <para><command>cksum</command> prints the CRC checksum and the byte
52 counts of each specified file.</para>
54 <para><command>comm</command> compares two sorted files, outputting in
55 three columns the lines that are unique, and the lines that are common.</para>
57 <para><command>cp</command> copies files.</para>
59 <para><command>csplit</command> splits a given file into several new files,
60 separating them according to given patterns or line numbers, and outputting
61 the byte count of each new file.</para>
63 <para><command>cut</command> prints parts of lines, selecting the parts
64 according to given fields or positions.</para>
66 <para><command>date</command> displays the current time in the given
67 format, or sets the system date.</para>
69 <para><command>dd</command> copies a file using the given blocksize and
70 count, while optionally performing conversions on it.</para>
72 <para><command>df</command> reports the amount of disk space available
73 (and used) on all mounted filesystems, or only on the filesystems holding the
74 given files.</para>
76 <para><command>dir</command> is the same as ls.</para>
78 <para><command>dircolors</command> outputs commands to set the LS_COLOR
79 environment variable, to change the color scheme used by ls.</para>
81 <para><command>dirname</command> strips the non-directory suffix from
82 a given file name.</para>
84 <para><command>du</command> reports the amount of disk space used by the
85 current directory, or by each of the given directories including all their
86 subdirectories, or by each of the given files.</para>
88 <para><command>echo</command> displays the given strings.</para>
90 <para><command>env</command> runs a command in a modified environment.</para>
92 <para><command>expand</command> converts tabs to spaces.</para>
94 <para><command>expr</command> evaluates expressions.</para>
96 <para><command>factor</command> prints the prime factors of all specified
97 integer numbers.</para>
99 <para><command>false</command> does nothing, unsuccessfully. It always
100 exits with a status code indicating failure.</para>
102 <para><command>fmt</command> reformats the paragraphs in the given files.</para>
104 <para><command>fold</command> wraps the lines in the given files.</para>
106 <para><command>groups</command> reports a user's group memberships.</para>
108 <para><command>head</command> prints the first ten lines (or the given
109 number of lines) of each given file.</para>
111 <para><command>hostid</command> reports the numeric identifier
112 (in hexadecimal) of the host.</para>
114 <para><command>hostname</command> reports or sets the name of the
115 host.</para>
117 <para><command>id</command> reports the effective user ID, group ID, and
118 group memberships of the current user, or of a given user.</para>
120 <para><command>install</command> copies files while setting their
121 permission modes and, if possible, their owner and group.</para>
123 <para><command>join</command> joins from two files the lines that have
124 identical join fields.</para>
126 <para><command>link</command> creates a hard link with the given name
127 to the given file.</para>
129 <para><command>ln</command> makes hard links or soft links between files.</para>
131 <para><command>logname</command> reports the current user's login name.</para>
133 <para><command>ls</command> lists the contents of each given directory.
134 By default it orders the files and subdirectories alphabetically.</para>
136 <para><command>md5sum</command> reports or checks MD5 checksums.</para>
138 <para><command>mkdir</command> creates directories with the given names.</para>
140 <para><command>mkfifo</command> creates FIFOs with the given names.</para>
142 <para><command>mknod</command> creates device nodes with the given names.
143 A device node is a character special file, or a block special file, or a FIFO.</para>
145 <para><command>mv</command> moves or renames files or directories.</para>
147 <para><command>nice</command> runs a program with modified scheduling priority.</para>
149 <para><command>nl</command> numbers the lines from the given files.</para>
151 <para><command>nohup</command> runs a command immune to hangups, with
152 output redirected to a log file.</para>
154 <para><command>od</command> dumps files in octal and other formats.</para>
156 <para><command>paste</command> merges the given files, joining
157 sequentially corresponding lines side by side, separated by TABs.</para>
159 <para><command>pathchk</command> checks whether file names are valid
160 or portable.</para>
162 <para><command>pinky</command> is a lightweight finger. It reports
163 some information about the given users.</para>
165 <para><command>pr</command> paginates and columnates files for printing.</para>
167 <para><command>printenv</command> prints the environment.</para>
169 <para><command>printf</command> prints the given arguments according to the
170 given format -- much like the C printf function.</para>
172 <para><command>ptx</command> produces from the contents of the given files
173 a permuted index, with each keyword in its context.</para>
175 <para><command>pwd</command> reports the name of the current directory.</para>
177 <para><command>readlink</command> reports the value of the given symbolic
178 link.</para>
180 <para><command>rm</command> removes files or directories.</para>
182 <para><command>rmdir</command> removes directories, if they are empty.</para>
184 <para><command>seq</command> prints a sequence of numbers, within a given
185 range and with a given increment.</para>
187 <para><command>sha1sum</command> prints or checks 160-bit SHA1
188 checksums.</para>
190 <para><command>shred</command> overwrites the given files repeatedly with
191 strange patterns, to make it real hard to recover the data.</para>
193 <para><command>sleep</command> pauses for the given amount of time.</para>
195 <para><command>sort</command> sorts the lines from the given files.</para>
197 <para><command>split</command> splits the given file into pieces, by size
198 or by number of lines.</para>
200 <para><command>stty</command> sets or reports terminal line settings.</para>
202 <para><command>su</command> runs a shell with substitute user and group IDs.</para>
204 <para><command>sum</command> prints checksum and block counts for each
205 given file.</para>
207 <para><command>sync</command> flushes filesystem buffers. It forces
208 changed blocks to disk and updates the super block.</para>
210 <para><command>tac</command> concatenates the given files in reverse.</para>
212 <para><command>tail</command> prints the last ten lines (or the given
213 number of lines) of each given file.</para>
215 <para><command>tee</command> reads from standard input while writing both
216 to standard output and to the given files.</para>
218 <para><command>test</command> compares values and checks file types.</para>
220 <para><command>touch</command> changes file timestamps, setting the access
221 and modification times of the given files to the current time. Files that do
222 not exist are created with zero length.</para>
224 <para><command>tr</command> translates, squeezes, and deletes the given
225 characters from standard input.</para>
227 <para><command>true</command> does nothing, successfully. It always exits
228 with a status code indicating success.</para>
230 <para><command>tsort</command> performs a topological sort. It writes a
231 totally ordered list according to the partial ordering in a given file.</para>
233 <para><command>tty</command> reports the file name of the terminal
234 connected to standard input.</para>
236 <para><command>uname</command> reports system information.</para>
238 <para><command>unexpand</command> converts spaces to tabs.</para>
240 <para><command>uniq</command> discards all but one of successive
241 identical lines.</para>
243 <para><command>unlink</command> removes the given file.</para>
245 <para><command>uptime</command> reports how long the system has been
246 running, how many users are logged on, and the system load averages.</para>
248 <para><command>users</command> reports the names of the users currently
249 logged on.</para>
251 <para><command>vdir</command> is the same as ls -l.</para>
253 <para><command>wc</command> reports the number of lines, words, and bytes
254 for each given file, and a total line when more than one file is given.</para>
256 <para><command>who</command> reports who is logged on.</para>
258 <para><command>whoami</command> reports the user name associated with the
259 current effective user ID.</para>
261 <para><command>yes</command> outputs 'y' or a given string repeatedly,
262 until killed.</para>
264 </sect2>
268 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils-deps.xml"/>
272 </sect1>