From 81fd230419b0cfd052b08fc1ed352bb7d49975df Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Sat, 19 Feb 2005 22:16:42 +0000 Subject: Trunk is now identical to Testing git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/coreutils.xml | 785 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 776 insertions(+), 9 deletions(-) (limited to 'chapter06/coreutils.xml') diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index d4c93c84b..6df281e33 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -3,13 +3,15 @@ %general-entities; ]> - + Coreutils-&coreutils-version; Coreutils +<para>The Coreutils package contains utilities for showing and setting the +basic system characteristics.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> @@ -17,16 +19,25 @@ <seglistitem><seg>0.9 SBU</seg><seg>69 MB</seg></seglistitem> </segmentedlist> +<segmentedlist> +<segtitle>Coreutils installation depends on</segtitle> +<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, GCC, +Gettext, Glibc, Grep, Make, Perl, and Sed</seg></seglistitem> +</segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Coreutils -Apply a patch: +A known issue with the uname program from +this package is that the -p switch always +returns unknown. The following patch +fixes this behavior for Intel architectures: patch -Np1 -i ../coreutils-&coreutils-version;-uname-2.patch -Apply another patch: +Prevent Coreutils from installing binaries that will be later be +installed by other packages: patch -Np1 -i \ ../coreutils-&coreutils-version;-suppress_uptime_kill_su-1.patch @@ -39,21 +50,30 @@ make +The test suite of Coreutils makes several assumptions about the +presence of files and users that are not valid this early in the LFS +build. Therefore, additional items need to be set up before running +the tests. Skip down to Install the package if +not running the test suite. + Create two dummy groups and a dummy user name: echo "dummy1:x:1000:" >> /etc/group echo "dummy2:x:1001:dummy" >> /etc/group echo "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd -Run the root tests: +Now the test suite is ready to be run. First, run the tests that +are meant to be run as user root: make NON_ROOT_USERNAME=dummy check-root -Run the user tests: +Then run the remainder of the tests as the +dummy user: src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check" -Remove the dummy user and groups: +When testing is complete, remove the dummy user and +groups: sed -i '/dummy/d' /etc/passwd /etc/group @@ -61,7 +81,7 @@ echo "dummy:x:1000:1000:::/bin/bash" >> /etc/passwd make install -And move some programs to their proper locations: +Move programs to the proper locations: mv /usr/bin/{[,basename,cat,chgrp,chmod,chown,cp,dd,df} /bin mv /usr/bin/{date,echo,false,head,hostname,install,ln} /bin @@ -69,7 +89,7 @@ mv /usr/bin/{ls,mkdir,mknod,mv,pwd,rm,rmdir,sync} /bin mv /usr/bin/{sleep,stty,test,touch,true,uname} /bin mv /usr/bin/chroot /usr/sbin -Create a symlink: +Finally, create a symlink to be FHS-compliant: ln -s ../../bin/install /usr/bin @@ -78,8 +98,755 @@ mv /usr/bin/chroot /usr/sbin Contents of Coreutils -See testing + +Installed programs +basename, cat, chgrp, chmod, chown, chroot, cksum, +comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du, +echo, env, expand, expr, factor, false, fmt, fold, groups, head, +hostid, hostname, id, install, join, link, ln, logname, ls, md5sum, +mkdir, mkfifo, mknod, mv, nice, nl, nohup, od, paste, pathchk, pinky, +pr, printenv, printf, ptx, pwd, readlink, rm, rmdir, seq, sha1sum, +shred, sleep, sort, split, stat, stty, sum, sync, tac, tail, tee, +test, touch, tr, true, tsort, tty, uname, unexpand, uniq, unlink, +users, vdir, wc, who, whoami, and yes + + +Short Descriptions + + + +basename + +Strips any path and a given suffix from a file name +basename + + + + +cat + +Concatenates files to standard output +cat + + + + +chgrp + +Changes the group ownership of each given file to the given +group; the group can either be either given a name or a numeric +ID +chgrp + + + + +chmod + +Changes the permissions of each file to the given mode; the mode +can be either a symbolic representation of the changes to make or an +octal number representing the new permissions +chmod + + + + +chown + +Changes the user and/or group ownership of +each given file to the given user/group pair +chown + + + + +chroot + +Runs a command with the specified directory as the +/ directory +chroot + + + + +cksum + +Prints the Cyclic Redundancy Check (CRC) checksum and the byte +counts of each specified file +cksum + + + + +comm + +Compares two sorted files, outputting in three columns the lines +that are unique and the lines that are common +comm + + + + +cp + +Copies files +cp + + + + +csplit + +Splits a given file into several new files, separating them +according to given patterns or line numbers and outputting the byte +count of each new file +csplit + + + + +cut + +Prints sections of lines, selecting the parts according to given +fields or positions +cut + + + + +date + +Displays the current time in the given format, or sets the +system date +date + + + + +dd + +Copies a file using the given block size and count, while +optionally performing conversions on it +dd + + + + +df + +Reports the amount of disk space available (and used) on all +mounted file systems, or only on the file systems holding the selected +files +df + + + + +dir + +Lists the contents of each given directory (the same as +the ls command) +dir + + + + +dircolors + +Outputs commands to set the LS_COLOR +environment variable to change the color scheme used by +ls +dircolors + + + + +dirname + +Strips the non-directory suffix from a file name +dirname + + + + +du + +Reports the amount of disk space used by the current directory, +by each of the given directories (including all subdirectories) or by +each of the given files +du + + + + +echo + +Displays the given strings +echo + + + + +env + +Runs a command in a modified environment +env + + + + +expand + +Converts tabs to spaces +expand + + + + +expr + +Evaluates expressions +expr + + + + +factor + +Prints the prime factors of all specified integer numbers +factor + + + + +false + +Does nothing, unsuccessfully; it always exits with a status code +indicating failure +false + + + + +fmt + +Reformats the paragraphs in the given files +fmt + + + + +fold + +Wraps the lines in the given files +fold + + + + +groups + +Reports a user's group memberships +groups + + + + +head + +Prints the first ten lines (or the given number of lines) of each given file +head + + + + +hostid + +Reports the numeric identifier (in hexadecimal) of the host +hostid + + + + +hostname + +Reports or sets the name of the host +hostname + + + + +id + +Reports the effective user ID, group ID, and +group memberships of the current user or specified user +id + + + + +install + +Copies files while setting their +permission modes and, if possible, their owner and group +install + + + + +join + +Joins the lines that have identical join fields from two +separate files +join + + + + +link + +Creates a hard link with the given name to a file +link + + + + +ln + +Makes hard links or soft (symbolic) links between files +ln + + + + +logname + +Reports the current user's login name +logname + + + + +ls + +Lists the contents of each given directory +ls + + + + +md5sum + +Reports or checks Message Digest 5 (MD5) checksums +md5sum + + + + +mkdir + +Creates directories with the given names +mkdir + + + + +mkfifo + +Creates First-In, First-Outs (FIFOs), a named +pipe in UNIX parlance, with the given names +mkfifo + + + + +mknod + +Creates device nodes with the given names; a device node is a +character special file, a block special file, or a FIFO +mknod + + + + +mv + +Moves or renames files or directories +mv + + + + +nice + +Runs a program with modified scheduling priority +nice + + + + +nl + +Numbers the lines from the given files +nl + + + + +nohup + +Runs a command immune to hangups, with its output redirected to +a log file +nohup + + + + +od + +Dumps files in octal and other formats +od + + + + +paste + +Merges the given files, joining sequentially corresponding lines +side by side, separated by tab characters +paste + + + + +pathchk + +Checks if file names are valid or portable +pathchk + + + + +pinky + +Is a lightweight finger client; it reports some information about the given users +pinky + + + + +pr + +Paginates and columnates files for printing +pr + + + + +printenv + +Prints the environment +printenv + + + + +printf + +Prints the given arguments according to the given format, much +like the C printf function +printf + + + + +ptx + +Produces a permuted index from the contents of the given files, +with each keyword in its context +ptx + + + + +pwd + +Reports the name of the current working directory +pwd + + + + +readlink + +Reports the value of the given symbolic link +readlink + + + + +rm + +Removes files or directories +rm + + + + +rmdir + +Removes directories if they are empty +rmdir + + + + +seq + +Prints a sequence of numbers within a given range and with a +given increment +seq + + + + +sha1sum + +Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1) checksums +sha1sum + + + + +shred + +Overwrites the given files repeatedly with complex patterns, +making it difficult to recover the data +shred + + + + +sleep + +Pauses for the given amount of time +sleep + + + + +sort + +Sorts the lines from the given files +sort + + + + +split + +Splits the given file into pieces, by size or by number of lines +split + + + + +stat + +Displays file or filesystem status +stat + + + + +stty + +Sets or reports terminal line settings +stty + + + + +sum + +Prints checksum and block counts for each given file +sum + + + + +sync + +Flushes file system buffers; it forces changed blocks to disk +and updates the super block +sync + + + + +tac + +Concatenates the given files in reverse +tac + + + + +tail + +Prints the last ten lines (or the given number of lines) of each +given file +tail + + + + +tee + +Reads from standard input while writing both to standard output +and to the given files +tee + + + + +test + +Compares values and checks file types +test + + + + +touch + +Changes file timestamps, setting the access and modification +times of the given files to the current time; files that do not exist +are created with zero length +touch + + + + +tr + +Translates, squeezes, and deletes the given characters from +standard input +tr + + + + +true + +Does nothing, successfully; it always exits with a status code +indicating success +true + + + + +tsort + +Performs a topological sort; it writes a completely ordered list +according to the partial ordering in a given file +tsort + + + + +tty + +Reports the file name of the terminal connected to standard +input +tty + + + + +uname + +Reports system information +uname + + + + +unexpand + +Converts spaces to tabs +unexpand + + + + +uniq + +Discards all but one of successive identical lines +unexpand + + + + +unlink + +Removes the given file +unlink + + + + +users + +Reports the names of the users currently logged on +users + + + + +vdir + +Is the same as ls -l +vdir + + + + +wc + +Reports the number of lines, words, and bytes for each given +file, as well as a total line when more than one file is given +wc + + + + +who + +Reports who is logged on +who + + + + +whoami + +Reports the user name associated with the current effective user ID +whoami + + + + +yes + +Repeatedly outputs y or a given string until +killed +yes + + + + -- cgit v1.2.3-54-g00ecf