%general-entities; ]> coreutils &coreutils-version;
&coreutils-url;
Coreutils-&coreutils-version; Coreutils <para>The Coreutils package contains the basic utility programs needed by every operating system.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> <seg>&coreutils-fin-sbu;</seg> <seg>&coreutils-fin-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Coreutils POSIX requires that programs from Coreutils recognize character boundaries correctly even in multibyte locales. The following patch fixes this non-compliance and other internationalization-related bugs. patch -Np1 -i ../&coreutils-i18n-patch; Many bugs have been found in this patch. When reporting new bugs to the Coreutils maintainers, please check first to see if those bugs are reproducible without this patch. Now prepare Coreutils for compilation: autoreconf -fiv FORCE_UNSAFE_CONFIGURE=1 ./configure \ --prefix=/usr \ --enable-no-install-program=kill,uptime The meaning of the configure options: autoreconf The patch for internationalization has modified the build system, so the configuration files must be regenerated. FORCE_UNSAFE_CONFIGURE=1 This environment variable allows the package to be built by the root user. --enable-no-install-program=kill,uptime The purpose of this switch is to prevent Coreutils from installing programs that will be installed by other packages. Compile the package: make Skip down to Install the package if not running the test suite. 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=tester check-root We're going to run the remainder of the tests as the tester user. Certain tests require that the user be a member of more than one group. So that these tests are not skipped, add a temporary group and make the user tester a part of it: echo "dummy:x:102:tester" >> /etc/group Fix some of the permissions so that the non-&root; user can compile and run the tests: chown -Rv tester . Now run the tests: su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" The test-getlogin test may fail in the LFS chroot environment. Remove the temporary group: sed -i '/dummy/d' /etc/group Install the package: make install Move programs to the locations specified by the FHS: mv -v /usr/bin/chroot /usr/sbin mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8 Contents of Coreutils Installed programs Installed library Installed directory [, b2sum, base32, base64, basename, basenc, 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, id, install, join, link, ln, logname, ls, md5sum, mkdir, mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste, pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, 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 libstdbuf.so (in /usr/libexec/coreutils) /usr/libexec/coreutils Short Descriptions [ Is an actual command, /usr/bin/[; it is a synonym for the test command [ base32 Encodes and decodes data according to the base32 specification (RFC 4648) base64 base64 Encodes and decodes data according to the base64 specification (RFC 4648) base64 b2sum Prints or checks BLAKE2 (512-bit) checksums b2sum basename Strips any path and a given suffix from a file name basename basenc Encodes or decodes data using various algorithms basenc 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 be made, 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 date and time in the given format, or sets the system date and time 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 Extracts the directory portion(s) of the given name(s) 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 the specified integers 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 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), "named pipes" 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 nproc Prints the number of processing units available to a process nproc numfmt Converts numbers to or from human-readable strings numfmt 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 realpath Prints the resolved path realpath 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 224-bit Secure Hash Algorithm checksums sha224sum sha256sum Prints or checks 256-bit Secure Hash Algorithm checksums sha256sum sha384sum Prints or checks 384-bit Secure Hash Algorithm checksums sha384sum sha512sum Prints or checks 512-bit Secure Hash Algorithm checksums sha512sum shred Overwrites the given files repeatedly with complex patterns, making it difficult to recover the data shred shuf Shuffles lines of text 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 stdbuf Runs commands with altered buffering operations for its standard streams stdbuf 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 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 grand totals 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 libstdbuf Library used by stdbuf libstdbuf