%general-entities; ]> Coreutils-&coreutils-version; Coreutils <para>The Coreutils package contains utilities for showing and setting the basic system characteristics.</para> </sect2> &env-target; <sect2 role="installation"> <title>Installation of Coreutils A known issue with the uname program from this package is that the switch always returns unknown. The following patch fixes this behavior for all architectures: patch -Np1 -i ../&coreutils-uname-patch; The following command updates the timestamps on the uname and hostname man pages so that the Makefile does not attempt to regenerate them: touch man/uname.1 man/hostname.1 Configure can not properly determine how to get free space when cross-compiling - as a result, the df program will not be built. Add the following entries to config.cache to correct this, and fix various cross-compiling issues: cat > config.cache << EOF fu_cv_sys_stat_statfs2_bsize=yes gl_cv_func_rename_trailing_slash_bug=no gl_cv_func_mbrtowc_incomplete_state=yes gl_cv_func_mbrtowc_nul_retval=yes gl_cv_func_mbrtowc_null_arg=yes gl_cv_func_mbrtowc_retval=yes gl_cv_func_btowc_eof=yes gl_cv_func_wcrtomb_retval=yes gl_cv_func_wctob_works=yes EOF Now prepare Coreutils for compilation: ./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \ --prefix=/usr --cache-file=config.cache \ --enable-no-install-program=kill,uptime \ --enable-install-program=hostname Compile the package: make Install the package: make DESTDIR=${CLFS} install Move programs to the locations specified by the FHS: mv -v ${CLFS}/usr/bin/{cat,chgrp,chmod,chown,cp,date} ${CLFS}/bin mv -v ${CLFS}/usr/bin/{dd,df,echo,false,hostname,ln,ls,mkdir} ${CLFS}/bin mv -v ${CLFS}/usr/bin/{mv,pwd,rm,rmdir,stty,true,uname} ${CLFS}/bin mv -v ${CLFS}/usr/bin/chroot ${CLFS}/usr/sbin Other Coreutils programs are used by some of the scripts in the CLFS-Bootscripts package. As /usr may not be available during the early stages of booting, those binaries need to be on the root partition: mv -v ${CLFS}/usr/bin/{[,basename,head,install,nice} ${CLFS}/bin mv -v ${CLFS}/usr/bin/{readlink,sleep,sync,test,touch} ${CLFS}/bin ln -sfv ../../bin/install ${CLFS}/usr/bin Contents of Coreutils Installed programs [, base64, basename, cat, chcon, 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, mktemp, mv, nice, nl, nohup, od, paste, pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, rm, rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, shuf, sleep, sort, split, stat, stty, sum, sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and yes Short Descriptions base64 Base64 encode/decode data and print to standard output base64 basename Strips any path and a given suffix from a file name basename cat Concatenates files to standard output cat chcon Changes security context for files and directories chcon chgrp Changes the group ownership of files and directories 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 files and directories 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 mktemp Creates temporary files in a secure manner; it is used in scripts mktemp 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 runcon Runs a command with specified security context runcon 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 sha224sum Prints or checks SHA224 checksums sha224sum sha256sum Prints or checks SHA256 checksums sha256sum sha384sum Prints or checks SHA384 checksums sha384sum sha512sum Prints or checks SHA512 checksums sha512sum shred Overwrites the given files repeatedly with complex patterns, making it difficult to recover the data shred shuf Write a random permutation of the input lines to standard output or a file shuf 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 or [ Compares values and checks file types test timeout Runs a command with a time limit timeout 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 truncate Shrinks or expands a file to the specified size truncate 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 uniq 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