GNU Core Utilities
Template:Short description Template:Refimprove {{#invoke:Infobox|infobox}}Template:Template other{{#invoke:Check for unknown parameters | check | showblankpositional=1 | unknown = Template:Main other | preview = Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y | AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo upright | logo size | logo title | logo_alt | logo_caption | logo_upright | logo_size | logo_title | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot upright | screenshot size | screenshot title | screenshot_alt | screenshot_upright | screenshot_size | screenshot_title | service_name | size | standard | title | ver layout | website | qid }}Template:Main other The GNU Core Utilities or coreutils is a collection of GNU software that implements many standard, Unix-based shell commands. The utilities generally provide POSIX compliant interface when the Template:Mono environment variable is set, but otherwise offers a superset to the standard interface. For example, the utilities support long options and options after parameters. This environment variable enables a different functionality in BSD.
Similar collections are available in the FOSS ecosystem, with a slightly different scope and focus (less functionality), or license. For example, BusyBox which is licensed under GPL-2.0-only, and Toybox which is licensed under 0BSD.
CommandsEdit
The commands implemented by coreutils are listed below. Throughout this article and customary for Unix-based systems, the term file refers to all file system items including regular files and special files such as directories.
File utilitiesEdit
chcon
Template:Endash Changes file security context (SELinux)chgrp
Template:Endash Changes file group ownershipchown
Template:Endash Changes file user ownershipchmod
Template:Endash Changes file permissionscp
Template:Endash Copies filesdd
Template:Endash Copies and converts file datadf
Template:Endash Reports file system free spacedir
Template:Endash Likels -C -b
; by default lists files in columns, sorted verticallydircolors
Template:Endash Configures colors used forls
outputinstall
Template:Endash Copies files and sets file attributesln
Template:Endash Creates a link to a filels
Template:Endash Lists filesmkdir
Template:Endash Creates directoriesmkfifo
Template:Endash Creates named pipes (FIFOs)mknod
Template:Endash Creates block or character special filesmktemp
Template:Endash Creates temporary regular files or directoriesmv
Template:Endash Moves and renames filesrealpath
Template:Endash Reports the absolute or relative path of a filerm
Template:Endash Deletes filesrmdir
Template:Endash Deletes empty directoriesshred
Template:Endash Overwrites a file to hide its contents and optionally deletes itsync
Template:Endash Flushes file system bufferstouch
Template:Endash Changes file timestamps; creating files if they do not existtruncate
Template:Endash Sets the size of a file via truncation or extensionvdir
Template:Endash Likels -l -b
; by default lists files in long format
Text utilitiesEdit
b2sum
Template:Endash Computes and checks BLAKE2b message digestbase32
Template:Endash Encodes or decodes base32base64
Template:Endash Encodes or decodes base64basenc
Template:Endash Encodes or decodes various encodings including hexadecimal, base32, base64, and Z85cat
Template:Endash Concatenates filescksum
Template:Endash Report or compute the checksum of filescomm
Template:Endash Compares two sorted files line by linecsplit
Template:Endash Splits a file into sections determined by context linescut
Template:Endash Removes sections from each line of filesexpand
Template:Endash Converts tabs to spacesfmt
Template:Endash Formats textfold
Template:Endash Wraps each input line to fit in specified widthhead
Template:Endash Outputs the first part of filesjoin
Template:Endash Joins lines of two files on a common fieldmd5sum
Template:Endash Computes and checks MD5 message digestnl
Template:Endash Numbers lines of filesnumfmt
Template:Endash Formats numbersod
Template:Endash Dumps files in octal and other formatspaste
Template:Endash Merges lines of filesptx
Template:Endash Produces a permuted index of file contentspr
Template:Endash Paginates or columnates filessha1sum
,sha224sum
,sha256sum
,sha384sum
,sha512sum
Template:Endash Computes and checks SHA-1/SHA-2 message digestsshuf
Template:Endash Generates random permutationssort
Template:Endash Sorts lines of text filessplit
Template:Endash Splits a file into piecessum
Template:Endash Checksums and counts the blocks in a filetac
Template:Endash Concatenates files in reverse order; line by linetail
Template:Endash Outputs the last part of filestr
Template:Endash Translates or deletes characterstsort
Template:Endash Performs a topological sortunexpand
Template:Endash Converts spaces to tabsuniq
Template:Endash Removes duplicate lines from a sorted filewc
Template:Endash Reports the number of bytes, words, and lines in files
Shell utilitiesEdit
arch
Template:Endash Reports machine hardware name; same as <syntaxhighlight lang="text" class="" style="" inline="1">uname -m</syntaxhighlight>basename
Template:Endash Removes the path prefix from a given pathnamechroot
Template:Endash Changes the root directorydate
Template:Endash Reports or sets the system date and timedirname
Template:Endash Strips non-directory suffix from file namedu
Template:Endash Shows disk usage on file systemsecho
Template:Endash Outputs textenv
Template:Endash Reports and modifies environment variablesexpr
Template:Endash Evaluates expressionsfactor
Template:Endash Factors numbersfalse
Template:Endash Does nothing but exit with unsuccessful statusgroups
Template:Endash Reports the groups of which the user is a memberhostid
Template:Endash Reports the numeric identifier for the current hostid
Template:Endash Reports the real or effective UID and GIDlink
Template:Endash Creates a link to a filelogname
Template:Endash Reports the user's login namenice
Template:Endash Modifies scheduling prioritynohup
Template:Endash Allows a command to continue running after logging outnproc
Template:Endash Queries the number of (active) processorspathchk
Template:Endash Checks whether file names are valid or portablepinky
Template:Endash A lightweight version of fingerprintenv
Template:Endash Reports environment variablesprintf
Template:Endash Formats textpwd
Template:Endash Reports the current working directoryreadlink
Template:Endash Reports the value of a symbolic linkruncon
Template:Endash Run command with specified security contextseq
Template:Endash Reports a sequence of numberssleep
Template:Endash Blocks (delays, waits) for a specified amount of timestat
Template:Endash Reports information about an inodestdbuf
Template:Endash Runs a command with custom standard streams configurationstty
Template:Endash Changes and reports terminal line settingstee
Template:Endash Sends output to multiple filestest
Template:Endash Evaluates an expressiontimeout
Template:Endash Runs a command with a time limittrue
Template:Endash Does nothing but exit with success statustty
Template:Endash Reports the terminal nameuname
Template:Endash Reports system informationunlink
Template:Endash Removes files viaunlink()
functionuptime
Template:Endash Reports how long the system has been runningusers
Template:Endash Reports the user names of users currently logged into the current hostwho
Template:Endash Reports logged-in userswhoami
Template:Endash Reports the effective useridyes
Template:Endash Outputs a string repeatedly[
Template:Endash Synonym for test that enables expressions like[ expression ]
HistoryEdit
In 1990, David MacKenzie announced GNU fileutils.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
In 1991, MacKenzie announced GNU shellutils and GNU textutils.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Moreover, Jim Meyering became the maintainer of the packages (known now as coreutils) and has remained so since.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
In September 2002, the GNU coreutils were created by merging the earlier packages textutils, shellutils, and fileutils, along with some other miscellaneous utilities.<ref name=merge>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
In July 2007, the license of the GNU coreutils was updated from GPL-2.0-or-later to GPL-3.0-or-later.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
See alsoEdit
- Template:Annotated link
- Template:Annotated link
- Template:Annotated link
- Template:Annotated link
- Template:Annotated link
- Template:Annotated link
- Template:Annotated link
- Template:Annotated link
- Template:Annotated link
- Template:Annotated link
ReferencesEdit
External linksEdit
- Template:Official website
- Manual
- README
- The Heirloom Toolchest - An alternative set of utilities
- opensource.com article: gnu-core-utilities on 4 Apr 2018 by David Both (Correspondent)
- Rosetta Stone For *Nix – configurable list of equivalent programs for *nix systems.
- The Unix Acronym List – explains the names of many Unix commands.
- The UNIX System Homepage
Template:GNU Template:Core Utilities commands Template:Unix commands