%general-entities; ]> Coreutils-&coreutils-version; Coreutils <para>The Coreutils package contains utilities for showing and setting the basic system characteristics.</para> </sect2> <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; Now prepare Coreutils for compilation: FORCE_UNSAFE_CONFIGURE=1 \ ./configure --prefix=/usr \ --enable-no-install-program=kill,uptime \ --enable-install-program=hostname The meaning of the configure options: FORCE_UNSAFE_CONFIGURE=1 Forces Coreutils to compile when using the root user. Compile the package: make The test suite of Coreutils makes several assumptions about the presence of system users and groups that are not valid within the minimal environment that exists at the moment. Therefore, we will reuse the dummy groups and user created during Util-linux. Skip down to Install the package if not running the test suite and you did not create the dummy groups and users during Util-linux. 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 The testsuite will now be run as the dummy user. Fix the permissions for a few files to allow this: chown -Rv dummy . Then run the remainder of the tests as the dummy user: su dummy -s /bin/bash \ -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes -k check || true" When testing is complete, remove the dummy user and groups: sed -i '/dummy/d' /etc/passwd /etc/group Install the package: make install Move programs to the locations specified by the FHS: mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date} /bin mv -v /usr/bin/{dd,df,echo,false,hostname,ln,ls,mkdir,mknod} /bin mv -v /usr/bin/{mv,pwd,rm,rmdir,stty,true,uname} /bin mv -v /usr/bin/chroot /usr/sbin Contents of Coreutils Installed programs Installed library Installed directory [, 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, 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 /usr/lib/coreutils 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 nproc Prints the number of processing units available to the current 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 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 stdbuf Runs a command with modified 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 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 libstdbuf Library used by stdbuf libstdbuf