1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
4 | %general-entities;
|
---|
5 | ]>
|
---|
6 | <sect1 id="ch-system-coreutils" xreflabel="Coreutils">
|
---|
7 | <title>Coreutils-&coreutils-version;</title>
|
---|
8 | <?dbhtml filename="coreutils.html"?>
|
---|
9 |
|
---|
10 | <indexterm zone="ch-system-coreutils"><primary sortas="a-Coreutils">Coreutils</primary></indexterm>
|
---|
11 |
|
---|
12 | <para>The Coreutils package contains utilities for showing and setting the
|
---|
13 | basic system characteristics.</para>
|
---|
14 |
|
---|
15 | <screen>&buildtime; 0.9 SBU
|
---|
16 | &diskspace; 69 MB</screen>
|
---|
17 |
|
---|
18 | <para>Coreutils installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC,
|
---|
19 | Gettext, Glibc, Grep, Make, Perl, Sed.</para>
|
---|
20 |
|
---|
21 |
|
---|
22 |
|
---|
23 | <sect2>
|
---|
24 | <title>Installation of Coreutils</title>
|
---|
25 |
|
---|
26 | <para>Normally the functionality of <command>uname</command> is somewhat
|
---|
27 | broken, in that the <emphasis>-p</emphasis> switch always returns
|
---|
28 | <quote>unknown</quote>. The following patch fixes this behavior for Intel
|
---|
29 | architectures:</para>
|
---|
30 |
|
---|
31 | <screen><userinput>patch -Np1 -i ../coreutils-&coreutils-version;-uname-1.patch</userinput></screen>
|
---|
32 |
|
---|
33 | <para>We do not want Coreutils to install its version of the
|
---|
34 | <command>hostname</command> program, because it is inferior to the version
|
---|
35 | provided by Net-tools. Prevent its installation by applying a patch:</para>
|
---|
36 |
|
---|
37 | <screen><userinput>patch -Np1 -i ../coreutils-&coreutils-version;-hostname-1.patch</userinput></screen>
|
---|
38 |
|
---|
39 | <para>Now prepare Coreutils for compilation:</para>
|
---|
40 |
|
---|
41 | <screen><userinput>DEFAULT_POSIX2_VERSION=199209 ./configure --prefix=/usr</userinput></screen>
|
---|
42 |
|
---|
43 | <para>Compile the package:</para>
|
---|
44 |
|
---|
45 | <screen><userinput>make</userinput></screen>
|
---|
46 |
|
---|
47 | <para>The test suite of Coreutils makes several assumptions about the presence
|
---|
48 | of files and users that aren't valid this early in the LFS build. We will
|
---|
49 | therefore have to set up a few things before being able to run the tests. If
|
---|
50 | you choose not to run these tests, skip down to <quote>Install the
|
---|
51 | package</quote>.</para>
|
---|
52 |
|
---|
53 | <para>To be able to run the full test suite, the <command>su</command> program
|
---|
54 | needs to be installed. We didn't bother to install this little program in
|
---|
55 | <xref linkend="chapter-temporary-tools"/> because it requires root privileges,
|
---|
56 | so do it now:</para>
|
---|
57 |
|
---|
58 | <screen><userinput>make install-root</userinput></screen>
|
---|
59 |
|
---|
60 | <para>Create a 'table of mounted filesystems' file with:</para>
|
---|
61 |
|
---|
62 | <screen><userinput>touch /etc/mtab</userinput></screen>
|
---|
63 |
|
---|
64 | <para>And create two dummy groups and a dummy user name:</para>
|
---|
65 |
|
---|
66 | <screen><userinput>echo "dummy1:x:1000" >> /etc/group
|
---|
67 | echo "dummy2:x:1001:dummy" >> /etc/group
|
---|
68 | echo "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd</userinput></screen>
|
---|
69 |
|
---|
70 | <para>Now you're all set to run the test suite. First run the few tests that
|
---|
71 | are meant to be run as <emphasis>root</emphasis>:</para>
|
---|
72 |
|
---|
73 | <screen><userinput>export NON_ROOT_USERNAME=dummy; make check-root</userinput></screen>
|
---|
74 |
|
---|
75 | <para>Then run the remainder of the tests as the <emphasis>dummy</emphasis>
|
---|
76 | user:</para>
|
---|
77 |
|
---|
78 | <screen><userinput>su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
|
---|
79 |
|
---|
80 | <para>When you're done testing, remove the dummy user and groups:</para>
|
---|
81 |
|
---|
82 | <screen><userinput>sed -i.bak '/dummy/d' /etc/passwd /etc/group</userinput></screen>
|
---|
83 |
|
---|
84 | <para>Install the package:</para>
|
---|
85 |
|
---|
86 | <screen><userinput>make install</userinput></screen>
|
---|
87 |
|
---|
88 | <para>And move some programs to their proper locations:</para>
|
---|
89 |
|
---|
90 | <screen><userinput>mv /usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} /bin
|
---|
91 | mv /usr/bin/{date,echo,false,head,install,ln,ls} /bin
|
---|
92 | mv /usr/bin/{mkdir,mknod,mv,pwd,rm,rmdir,sync} /bin
|
---|
93 | mv /usr/bin/{sleep,stty,su,test,touch,true,uname} /bin
|
---|
94 | mv /usr/bin/chroot /usr/sbin</userinput></screen>
|
---|
95 |
|
---|
96 | <para>We'll be using the <filename>kill</filename> program from the Procps
|
---|
97 | package (installed as <filename>/bin/kill</filename> later in the chapter).
|
---|
98 | Remove the one installed by Coreutils:</para>
|
---|
99 |
|
---|
100 | <screen><userinput>rm /usr/bin/kill</userinput></screen>
|
---|
101 |
|
---|
102 | <para>Finally, create two symlinks to be FHS-compliant:</para>
|
---|
103 |
|
---|
104 | <screen><userinput>ln -s test /bin/[
|
---|
105 | ln -s ../../bin/install /usr/bin</userinput></screen>
|
---|
106 |
|
---|
107 | </sect2>
|
---|
108 |
|
---|
109 |
|
---|
110 | <sect2 id="contents-coreutils"><title>Contents of Coreutils</title>
|
---|
111 |
|
---|
112 | <para><emphasis>Installed programs</emphasis>: basename, cat, chgrp, chmod,
|
---|
113 | chown, chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors,
|
---|
114 | dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups, head,
|
---|
115 | hostid, hostname, id, install, join, link, ln, logname, ls, md5sum,
|
---|
116 | mkdir, mkfifo, mknod, mv, nice, nl, nohup, od, paste, pathchk, pinky, pr,
|
---|
117 | printenv, printf, ptx, pwd, readlink, rm, rmdir, seq, sha1sum, shred, sleep,
|
---|
118 | sort, split, stat, stty, su, sum, sync, tac, tail, tee, test, touch, tr, true,
|
---|
119 | tsort, tty, uname, unexpand, uniq, unlink, uptime, users, vdir, wc, who,
|
---|
120 | whoami and yes</para>
|
---|
121 |
|
---|
122 | </sect2>
|
---|
123 |
|
---|
124 |
|
---|
125 | <sect2><title>Short descriptions</title>
|
---|
126 |
|
---|
127 | <indexterm zone="ch-system-coreutils basename"><primary sortas="b-basename">basename</primary></indexterm>
|
---|
128 | <para id="basename"><command>basename</command> strips any path and a given suffix from
|
---|
129 | the given file name.</para>
|
---|
130 |
|
---|
131 | <indexterm zone="ch-system-coreutils cat"><primary sortas="b-cat">cat</primary></indexterm>
|
---|
132 | <para id="cat"><command>cat</command> concatenates files to standard output.</para>
|
---|
133 |
|
---|
134 | <indexterm zone="ch-system-coreutils chgrp"><primary sortas="b-chgrp">chgrp</primary></indexterm>
|
---|
135 | <para id="chgrp"><command>chgrp</command> changes the group ownership of each given
|
---|
136 | file to the given group. The group can be either given a a name or a numeric
|
---|
137 | ID.</para>
|
---|
138 |
|
---|
139 | <indexterm zone="ch-system-coreutils chmod"><primary sortas="b-chmod">chmod</primary></indexterm>
|
---|
140 | <para id="chmod"><command>chmod</command> changes the permissions of each given file
|
---|
141 | to the given mode. The mode can be either a symbolic representation of the
|
---|
142 | changes to make, or an octal number representing the new permissions.</para>
|
---|
143 |
|
---|
144 | <indexterm zone="ch-system-coreutils chown"><primary sortas="b-chown">chown</primary></indexterm>
|
---|
145 | <para id="chown"><command>chown</command> changes the user and/or group ownership of
|
---|
146 | each given file to the given user:group pair.</para>
|
---|
147 |
|
---|
148 | <indexterm zone="ch-system-coreutils chroot"><primary sortas="b-chroot">chroot</primary></indexterm>
|
---|
149 | <para id="chroot"><command>chroot</command> runs a given command with the specified
|
---|
150 | directory as the <filename>/</filename> directory. The given command can be an
|
---|
151 | interactive shell. On most systems only <emphasis>root</emphasis> can do
|
---|
152 | this.</para>
|
---|
153 |
|
---|
154 | <indexterm zone="ch-system-coreutils cksum"><primary sortas="b-cksum">cksum</primary></indexterm>
|
---|
155 | <para id="cksum"><command>cksum</command> prints the CRC (Cyclic Redundancy Check) checksum and the byte
|
---|
156 | counts of each specified file.</para>
|
---|
157 |
|
---|
158 | <indexterm zone="ch-system-coreutils comm"><primary sortas="b-comm">comm</primary></indexterm>
|
---|
159 | <para id="comm"><command>comm</command> compares two sorted files, outputting in
|
---|
160 | three columns the lines that are unique, and the lines that are common.</para>
|
---|
161 |
|
---|
162 | <indexterm zone="ch-system-coreutils cp"><primary sortas="b-cp">cp</primary></indexterm>
|
---|
163 | <para id="cp"><command>cp</command> copies files.</para>
|
---|
164 |
|
---|
165 | <indexterm zone="ch-system-coreutils csplit"><primary sortas="b-csplit">csplit</primary></indexterm>
|
---|
166 | <para id="csplit"><command>csplit</command> splits a given file into several new files,
|
---|
167 | separating them according to given patterns or line numbers, and outputting
|
---|
168 | the byte count of each new file.</para>
|
---|
169 |
|
---|
170 | <indexterm zone="ch-system-coreutils cut"><primary sortas="b-cut">cut</primary></indexterm>
|
---|
171 | <para id="cut"><command>cut</command> prints parts of lines, selecting the parts
|
---|
172 | according to given fields or positions.</para>
|
---|
173 |
|
---|
174 | <indexterm zone="ch-system-coreutils date"><primary sortas="b-date">date</primary></indexterm>
|
---|
175 | <para id="date"><command>date</command> displays the current time in the given
|
---|
176 | format, or sets the system date.</para>
|
---|
177 |
|
---|
178 | <indexterm zone="ch-system-coreutils dd"><primary sortas="b-dd">dd</primary></indexterm>
|
---|
179 | <para id="dd"><command>dd</command> copies a file using the given block size and
|
---|
180 | count, while optionally performing conversions on it.</para>
|
---|
181 |
|
---|
182 | <indexterm zone="ch-system-coreutils df"><primary sortas="b-df">df</primary></indexterm>
|
---|
183 | <para id="df"><command>df</command> reports the amount of disk space available
|
---|
184 | (and used) on all mounted file systems, or only on the file systems holding the
|
---|
185 | given files.</para>
|
---|
186 |
|
---|
187 | <indexterm zone="ch-system-coreutils dir"><primary sortas="b-dir">dir</primary></indexterm>
|
---|
188 | <para id="dir"><command>dir</command> is the same as ls.</para>
|
---|
189 |
|
---|
190 | <indexterm zone="ch-system-coreutils dircolors"><primary sortas="b-dircolors">dircolors</primary></indexterm>
|
---|
191 | <para id="dircolors"><command>dircolors</command> outputs commands to set the LS_COLOR
|
---|
192 | environment variable, to change the color scheme used by ls.</para>
|
---|
193 |
|
---|
194 | <indexterm zone="ch-system-coreutils dirname"><primary sortas="b-dirname">dirname</primary></indexterm>
|
---|
195 | <para id="dirname"><command>dirname</command> strips the non-directory suffix from
|
---|
196 | a given file name.</para>
|
---|
197 |
|
---|
198 | <indexterm zone="ch-system-coreutils du"><primary sortas="b-du">du</primary></indexterm>
|
---|
199 | <para id="du"><command>du</command> reports the amount of disk space used by the
|
---|
200 | current directory, or by each of the given directories including all their
|
---|
201 | subdirectories, or by each of the given files.</para>
|
---|
202 |
|
---|
203 | <indexterm zone="ch-system-coreutils echo"><primary sortas="b-echo">echo</primary></indexterm>
|
---|
204 | <para id="echo"><command>echo</command> displays the given strings.</para>
|
---|
205 |
|
---|
206 | <indexterm zone="ch-system-coreutils env"><primary sortas="b-env">env</primary></indexterm>
|
---|
207 | <para id="env"><command>env</command> runs a command in a modified environment.</para>
|
---|
208 |
|
---|
209 | <indexterm zone="ch-system-coreutils expand"><primary sortas="b-expand">expand</primary></indexterm>
|
---|
210 | <para id="expand"><command>expand</command> converts tabs to spaces.</para>
|
---|
211 |
|
---|
212 | <indexterm zone="ch-system-coreutils expr"><primary sortas="b-expr">expr</primary></indexterm>
|
---|
213 | <para id="expr"><command>expr</command> evaluates expressions.</para>
|
---|
214 |
|
---|
215 | <indexterm zone="ch-system-coreutils factor"><primary sortas="b-factor">factor</primary></indexterm>
|
---|
216 | <para id="factor"><command>factor</command> prints the prime factors of all specified
|
---|
217 | integer numbers.</para>
|
---|
218 |
|
---|
219 | <indexterm zone="ch-system-coreutils false"><primary sortas="b-false">false</primary></indexterm>
|
---|
220 | <para id="false"><command>false</command> does nothing, unsuccessfully. It always
|
---|
221 | exits with a status code indicating failure.</para>
|
---|
222 |
|
---|
223 | <indexterm zone="ch-system-coreutils mt"><primary sortas="b-mt">mt</primary></indexterm>
|
---|
224 | <para id="mt"><command>fmt</command> reformats the paragraphs in the given files.</para>
|
---|
225 |
|
---|
226 | <indexterm zone="ch-system-coreutils fold"><primary sortas="b-fold">fold</primary></indexterm>
|
---|
227 | <para id="fold"><command>fold</command> wraps the lines in the given files.</para>
|
---|
228 |
|
---|
229 | <indexterm zone="ch-system-coreutils groups-coreutils"><primary sortas="b-groups-coreutils">groups</primary></indexterm>
|
---|
230 | <para id="groups-coreutils"><command>groups</command> reports a user's group memberships.</para>
|
---|
231 |
|
---|
232 | <indexterm zone="ch-system-coreutils head"><primary sortas="b-head">head</primary></indexterm>
|
---|
233 | <para id="head"><command>head</command> prints the first ten lines (or the given
|
---|
234 | number of lines) of each given file.</para>
|
---|
235 |
|
---|
236 | <indexterm zone="ch-system-coreutils hostid"><primary sortas="b-hostid">hostid</primary></indexterm>
|
---|
237 | <para id="hostid"><command>hostid</command> reports the numeric identifier
|
---|
238 | (in hexadecimal) of the host.</para>
|
---|
239 |
|
---|
240 | <indexterm zone="ch-system-coreutils hostname-coreutils"><primary sortas="b-hostname-coreutils">hostname</primary></indexterm>
|
---|
241 | <para id="hostname-coreutils"><command>hostname</command> reports or sets the name of the
|
---|
242 | host.</para>
|
---|
243 |
|
---|
244 | <indexterm zone="ch-system-coreutils id"><primary sortas="b-id">id</primary></indexterm>
|
---|
245 | <para id="id"><command>id</command> reports the effective user ID, group ID, and
|
---|
246 | group memberships of the current user, or of a given user.</para>
|
---|
247 |
|
---|
248 | <indexterm zone="ch-system-coreutils install"><primary sortas="b-install">install</primary></indexterm>
|
---|
249 | <para id="install"><command>install</command> copies files while setting their
|
---|
250 | permission modes and, if possible, their owner and group.</para>
|
---|
251 |
|
---|
252 | <indexterm zone="ch-system-coreutils join"><primary sortas="b-join">join</primary></indexterm>
|
---|
253 | <para id="join"><command>join</command> joins from two files the lines that have
|
---|
254 | identical join fields.</para>
|
---|
255 |
|
---|
256 | <indexterm zone="ch-system-coreutils link"><primary sortas="b-link">link</primary></indexterm>
|
---|
257 | <para id="link"><command>link</command> creates a hard link with the given name
|
---|
258 | to the given file.</para>
|
---|
259 |
|
---|
260 | <indexterm zone="ch-system-coreutils ln"><primary sortas="b-ln">ln</primary></indexterm>
|
---|
261 | <para id="ln"><command>ln</command> makes hard links or soft links between files.</para>
|
---|
262 |
|
---|
263 | <indexterm zone="ch-system-coreutils logname"><primary sortas="b-logname">logname</primary></indexterm>
|
---|
264 | <para id="logname"><command>logname</command> reports the current user's login name.</para>
|
---|
265 |
|
---|
266 | <indexterm zone="ch-system-coreutils ls"><primary sortas="b-ls">ls</primary></indexterm>
|
---|
267 | <para id="ls"><command>ls</command> lists the contents of each given directory.
|
---|
268 | By default it orders the files and subdirectories alphabetically.</para>
|
---|
269 |
|
---|
270 | <indexterm zone="ch-system-coreutils md5sum"><primary sortas="b-md5sum">md5sum</primary></indexterm>
|
---|
271 | <para id="md5sum"><command>md5sum</command> reports or checks MD5 (Message Digest 5) checksums.</para>
|
---|
272 |
|
---|
273 | <indexterm zone="ch-system-coreutils mkdir"><primary sortas="b-mkdir">mkdir</primary></indexterm>
|
---|
274 | <para id="mkdir"><command>mkdir</command> creates directories with the given names.</para>
|
---|
275 |
|
---|
276 | <indexterm zone="ch-system-coreutils mkfifo"><primary sortas="b-mkfifo">mkfifo</primary></indexterm>
|
---|
277 | <para id="mkfifo"><command>mkfifo</command> creates FIFOs (First-In, First-Out, a "named pipe" in UNIX parlance) with the given names.</para>
|
---|
278 |
|
---|
279 | <indexterm zone="ch-system-coreutils mknod"><primary sortas="b-mknod">mknod</primary></indexterm>
|
---|
280 | <para id="mknod"><command>mknod</command> creates device nodes with the given names.
|
---|
281 | A device node is a character special file, or a block special file, or a FIFO.</para>
|
---|
282 |
|
---|
283 | <indexterm zone="ch-system-coreutils mv"><primary sortas="b-mv">mv</primary></indexterm>
|
---|
284 | <para id="mv"><command>mv</command> moves or renames files or directories.</para>
|
---|
285 |
|
---|
286 | <indexterm zone="ch-system-coreutils nice"><primary sortas="b-nice">nice</primary></indexterm>
|
---|
287 | <para id="nice"><command>nice</command> runs a program with modified scheduling priority.</para>
|
---|
288 |
|
---|
289 | <indexterm zone="ch-system-coreutils nl"><primary sortas="b-nl">nl</primary></indexterm>
|
---|
290 | <para id="nl"><command>nl</command> numbers the lines from the given files.</para>
|
---|
291 |
|
---|
292 | <indexterm zone="ch-system-coreutils nohup"><primary sortas="b-nohup">nohup</primary></indexterm>
|
---|
293 | <para id="nohup"><command>nohup</command> runs a command immune to hangups, with
|
---|
294 | output redirected to a log file.</para>
|
---|
295 |
|
---|
296 | <indexterm zone="ch-system-coreutils od"><primary sortas="b-od">od</primary></indexterm>
|
---|
297 | <para id="od"><command>od</command> dumps files in octal and other formats.</para>
|
---|
298 |
|
---|
299 | <indexterm zone="ch-system-coreutils paste"><primary sortas="b-paste">paste</primary></indexterm>
|
---|
300 | <para id="paste"><command>paste</command> merges the given files, joining
|
---|
301 | sequentially corresponding lines side by side, separated by tab characters..</para>
|
---|
302 |
|
---|
303 | <indexterm zone="ch-system-coreutils pathchk"><primary sortas="b-pathchk">pathchk</primary></indexterm>
|
---|
304 | <para id="pathchk"><command>pathchk</command> checks whether file names are valid
|
---|
305 | or portable.</para>
|
---|
306 |
|
---|
307 | <indexterm zone="ch-system-coreutils pinky"><primary sortas="b-pinky">pinky</primary></indexterm>
|
---|
308 | <para id="pinky"><command>pinky</command> is a lightweight finger. It reports
|
---|
309 | some information about the given users.</para>
|
---|
310 |
|
---|
311 | <indexterm zone="ch-system-coreutils pr"><primary sortas="b-pr">pr</primary></indexterm>
|
---|
312 | <para id="pr"><command>pr</command> paginates and columnates files for printing.</para>
|
---|
313 |
|
---|
314 | <indexterm zone="ch-system-coreutils printenv"><primary sortas="b-printenv">printenv</primary></indexterm>
|
---|
315 | <para id="printenv"><command>printenv</command> prints the environment.</para>
|
---|
316 |
|
---|
317 | <indexterm zone="ch-system-coreutils printf"><primary sortas="b-printf">printf</primary></indexterm>
|
---|
318 | <para id="printf"><command>printf</command> prints the given arguments according to the
|
---|
319 | given format -- much like the C printf function.</para>
|
---|
320 |
|
---|
321 | <indexterm zone="ch-system-coreutils ptx"><primary sortas="b-ptx">ptx</primary></indexterm>
|
---|
322 | <para id="ptx"><command>ptx</command> produces from the contents of the given files
|
---|
323 | a permuted index, with each keyword in its context.</para>
|
---|
324 |
|
---|
325 | <indexterm zone="ch-system-coreutils pwd"><primary sortas="b-pwd">pwd</primary></indexterm>
|
---|
326 | <para id="pwd"><command>pwd</command> reports the name of the current directory.</para>
|
---|
327 |
|
---|
328 | <indexterm zone="ch-system-coreutils readlink"><primary sortas="b-readlink">readlink</primary></indexterm>
|
---|
329 | <para id="readlink"><command>readlink</command> reports the value of the given symbolic
|
---|
330 | link.</para>
|
---|
331 |
|
---|
332 | <indexterm zone="ch-system-coreutils rm"><primary sortas="b-rm">rm</primary></indexterm>
|
---|
333 | <para id="rm"><command>rm</command> removes files or directories.</para>
|
---|
334 |
|
---|
335 | <indexterm zone="ch-system-coreutils rmdir"><primary sortas="b-rmdir">rmdir</primary></indexterm>
|
---|
336 | <para id="rmdir"><command>rmdir</command> removes directories, if they are empty.</para>
|
---|
337 |
|
---|
338 | <indexterm zone="ch-system-coreutils seq"><primary sortas="b-seq">seq</primary></indexterm>
|
---|
339 | <para id="seq"><command>seq</command> prints a sequence of numbers, within a given
|
---|
340 | range and with a given increment.</para>
|
---|
341 |
|
---|
342 | <indexterm zone="ch-system-coreutils sha1sum"><primary sortas="b-sha1sum">sha1sum</primary></indexterm>
|
---|
343 | <para id="sha1sum"><command>sha1sum</command> prints or checks 160-bit SHA1
|
---|
344 | checksums.</para>
|
---|
345 |
|
---|
346 | <indexterm zone="ch-system-coreutils shred"><primary sortas="b-shred">shred</primary></indexterm>
|
---|
347 | <para id="shred"><command>shred</command> overwrites the given files repeatedly with
|
---|
348 | strange patterns, to make it real hard to recover the data.</para>
|
---|
349 |
|
---|
350 | <indexterm zone="ch-system-coreutils sleep"><primary sortas="b-sleep">sleep</primary></indexterm>
|
---|
351 | <para id="sleep"><command>sleep</command> pauses for the given amount of time.</para>
|
---|
352 |
|
---|
353 | <indexterm zone="ch-system-coreutils sort"><primary sortas="b-sort">sort</primary></indexterm>
|
---|
354 | <para id="sort"><command>sort</command> sorts the lines from the given files.</para>
|
---|
355 |
|
---|
356 | <indexterm zone="ch-system-coreutils split"><primary sortas="b-split">split</primary></indexterm>
|
---|
357 | <para id="split"><command>split</command> splits the given file into pieces, by size
|
---|
358 | or by numbspliter of lines.</para>
|
---|
359 |
|
---|
360 | <indexterm zone="ch-system-coreutils stty"><primary sortas="b-stty">stty</primary></indexterm>
|
---|
361 | <para id="stty"><command>stty</command> sets or reports terminal line settings.</para>
|
---|
362 |
|
---|
363 | <indexterm zone="ch-system-coreutils su"><primary sortas="b-su">su</primary></indexterm>
|
---|
364 | <para id="su"><command>su</command> runs a shell with substitute user and group IDs.</para>
|
---|
365 |
|
---|
366 | <indexterm zone="ch-system-coreutils sum"><primary sortas="b-sum">sum</primary></indexterm>
|
---|
367 | <para id="sum"><command>sum</command> prints checksum and block counts for each
|
---|
368 | given file.</para>
|
---|
369 |
|
---|
370 | <indexterm zone="ch-system-coreutils sync"><primary sortas="b-sync">sync</primary></indexterm>
|
---|
371 | <para id="sync"><command>sync</command> flushes file system buffers. It forces
|
---|
372 | changed blocks to disk and updates the super block.</para>
|
---|
373 |
|
---|
374 | <indexterm zone="ch-system-coreutils tac"><primary sortas="b-tac">tac</primary></indexterm>
|
---|
375 | <para id="tac"><command>tac</command> concatenates the given files in reverse.</para>
|
---|
376 |
|
---|
377 | <indexterm zone="ch-system-coreutils tail"><primary sortas="b-tail">tail</primary></indexterm>
|
---|
378 | <para id="tail"><command>tail</command> prints the last ten lines (or the given
|
---|
379 | number of lines) of each given file.</para>
|
---|
380 |
|
---|
381 | <indexterm zone="ch-system-coreutils tee"><primary sortas="b-tee">tee</primary></indexterm>
|
---|
382 | <para id="tee"><command>tee</command> reads from standard input while writing both
|
---|
383 | to standard output and to the given files.</para>
|
---|
384 |
|
---|
385 | <indexterm zone="ch-system-coreutils test"><primary sortas="b-test">test</primary></indexterm>
|
---|
386 | <para id="test"><command>test</command> compares values and checks file types.</para>
|
---|
387 |
|
---|
388 | <indexterm zone="ch-system-coreutils touch"><primary sortas="b-touch">touch</primary></indexterm>
|
---|
389 | <para id="touch"><command>touch</command> changes file timestamps, setting the access
|
---|
390 | and modification times of the given files to the current time. Files that do
|
---|
391 | not exist are created with zero length.</para>
|
---|
392 |
|
---|
393 | <indexterm zone="ch-system-coreutils tr"><primary sortas="b-tr">tr</primary></indexterm>
|
---|
394 | <para id="tr"><command>tr</command> translates, squeezes, and deletes the given
|
---|
395 | characters from standard input.</para>
|
---|
396 |
|
---|
397 | <indexterm zone="ch-system-coreutils true"><primary sortas="b-true">true</primary></indexterm>
|
---|
398 | <para id="true"><command>true</command> does nothing, successfully. It always exits
|
---|
399 | with a status code indicating success.</para>
|
---|
400 |
|
---|
401 | <indexterm zone="ch-system-coreutils tsort"><primary sortas="b-tsort">tsort</primary></indexterm>
|
---|
402 | <para id="tsort"><command>tsort</command> performs a topological sort. It writes a
|
---|
403 | totally ordered list according to the partial ordering in a given file.</para>
|
---|
404 |
|
---|
405 | <indexterm zone="ch-system-coreutils tty"><primary sortas="b-tty">tty</primary></indexterm>
|
---|
406 | <para id="tty"><command>tty</command> reports the file name of the terminal
|
---|
407 | connected to standard input.</para>
|
---|
408 |
|
---|
409 | <indexterm zone="ch-system-coreutils uname"><primary sortas="b-uname">uname</primary></indexterm>
|
---|
410 | <para id="uname"><command>uname</command> reports system information.</para>
|
---|
411 |
|
---|
412 | <indexterm zone="ch-system-coreutils unexpand"><primary sortas="b-unexpand">unexpand</primary></indexterm>
|
---|
413 | <para id="unexpand"><command>unexpand</command> converts spaces to tabs.</para>
|
---|
414 |
|
---|
415 | <indexterm zone="ch-system-coreutils uniq"><primary sortas="b-uniq">uniq</primary></indexterm>
|
---|
416 | <para id="uniq"><command>uniq</command> discards all but one of successive
|
---|
417 | identical lines.</para>
|
---|
418 |
|
---|
419 | <indexterm zone="ch-system-coreutils unlink"><primary sortas="b-unlink">unlink</primary></indexterm>
|
---|
420 | <para id="unlink"><command>unlink</command> removes the given file.</para>
|
---|
421 |
|
---|
422 | <indexterm zone="ch-system-coreutils uptime-coreutils"><primary sortas="b-uptime-coreutils">uptime</primary></indexterm>
|
---|
423 | <para id="uptime-coreutils"><command>uptime</command> reports how long the system has been
|
---|
424 | running, how many users are logged on, and the system load averages.</para>
|
---|
425 |
|
---|
426 | <indexterm zone="ch-system-coreutils users"><primary sortas="b-users">users</primary></indexterm>
|
---|
427 | <para id="users"><command>users</command> reports the names of the users currently
|
---|
428 | logged on.</para>
|
---|
429 |
|
---|
430 | <indexterm zone="ch-system-coreutils vdir"><primary sortas="b-vdir">vdir</primary></indexterm>
|
---|
431 | <para id="vdir"><command>vdir</command> is the same as ls -l.</para>
|
---|
432 |
|
---|
433 | <indexterm zone="ch-system-coreutils wc"><primary sortas="b-wc">wc</primary></indexterm>
|
---|
434 | <para id="wc"><command>wc</command> reports the number of lines, words, and bytes
|
---|
435 | for each given file, and a total line when more than one file is given.</para>
|
---|
436 |
|
---|
437 | <indexterm zone="ch-system-coreutils who"><primary sortas="b-who">who</primary></indexterm>
|
---|
438 | <para id="who"><command>who</command> reports who is logged on.</para>
|
---|
439 |
|
---|
440 | <indexterm zone="ch-system-coreutils whoami"><primary sortas="b-whoami">whoami</primary></indexterm>
|
---|
441 | <para id="whoami"><command>whoami</command> reports the user name associated with the
|
---|
442 | current effective user ID.</para>
|
---|
443 |
|
---|
444 | <indexterm zone="ch-system-coreutils yes"><primary sortas="b-yes">yes</primary></indexterm>
|
---|
445 | <para id="yes"><command>yes</command> outputs 'y' or a given string repeatedly,
|
---|
446 | until killed.</para>
|
---|
447 |
|
---|
448 | </sect2>
|
---|
449 |
|
---|
450 |
|
---|
451 |
|
---|
452 | </sect1>
|
---|