GNU Core Utilities
Encyclopedia
The GNU Core Utilities or coreutils is a package
Software package (installation)
In package management systems, which are commonly used with Linux-based operating systems, a package is a specific piece of software which the system can install and uninstall....

 of GNU
GNU
GNU is a Unix-like computer operating system developed by the GNU project, ultimately aiming to be a "complete Unix-compatible software system"...

 software containing many of the basic tools, such as cat
Cat (Unix)
The cat command is a standard Unix program used to concatenate and display files. The name is from catenate, a synonym of concatenate.- Specification :...

, ls
Ls
In computing, ls is a command to list files in Unix and Unix-like operating systems. ls is specified by POSIX and the Single UNIX Specification.- History :An ls utility appeared in the original version of AT&T UNIX...

, and rm
Rm (Unix)
rm is a basic UNIX command used to remove objects such as files, directories, device nodes, symbolic links, and so on from the filesystem...

, needed for Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s. It is a combination of a number of earlier packages, including textutils, shellutils, and fileutils, along with some other miscellaneous utilities.

GNU coreutils capabilities

The GNU core utilities support long options as parameters to the commands, as well as (unless the POSIXLY_CORRECT environment variable is set) the relaxed convention allowing options even after the regular arguments. Note that this environment variable enables a different functionality in BSD.

Programs included in coreutils

The list spans the programs from coreutils 7.0.
File Utilities
chcon Change file security context (SELinux)
chgrp
Chgrp
The chgrp command is used by unprivileged users on Unix-like systems to change the group associated with a computer file...

Changes file group ownership
chown
Chown
The chown command is used on Unix-like systems to change the owner of a file. In most implementations, it can only be executed by the superuser. Unprivileged users who wish to change the group of a file that they own may use chgrp.-Usage examples:These examples illustrate typical syntax and use...

Changes file ownership
chmod
Chmod
The chmod command is a Unix command that lets a user tell the system how much access it should permit to a file. It changes the file system modes of files and directories. The modes include permissions and special modes...

Changes the permissions of a file or directory
cp
Cp (Unix)
cp is a UNIX command used to copy a file. Files can be copied either to the same directory or to a completely different directory, possibly on a different file system or hard disk drive. If the file is copied to the same directory, the new file must have a different name to the original; in all...

Copies a file or directory
dd
Dd (Unix)
In computing, dd is a common Unix program whose primary purpose is the low-level copying and conversion of raw data. According to the manual page for Version 7 Unix, it will "convert and copy a file". It is used to copy a specified number of bytes or blocks, performing on-the-fly byte order...

Copies and converts a file
df
Df (Unix)
df is a standard Unix computer program used to display the amount of available disk space for filesystems on which the invoking user has appropriate read access...

Shows disk free space on filesystems
dir
Ls
In computing, ls is a command to list files in Unix and Unix-like operating systems. ls is specified by POSIX and the Single UNIX Specification.- History :An ls utility appeared in the original version of AT&T UNIX...

Is exactly like "ls -C -b". (Files are by default listed in columns and sorted vertically.)
dircolors Setup color for ls
install
Install (Unix)
The install command is a standard Unix program used to copy files and set file permissions....

Copies files and set attributes
ln
Ln (Unix)
ln is a standard Unix command used to create links to files.- Link files :Links allow more than one file name to refer to the same file, elsewhere.There are two types of links, both of which are created by ln:...

Creates a link to a file
ls
Ls
In computing, ls is a command to list files in Unix and Unix-like operating systems. ls is specified by POSIX and the Single UNIX Specification.- History :An ls utility appeared in the original version of AT&T UNIX...

Lists the files in a directory
mkdir
Mkdir
The mkdir command in the Unix, DOS, OS/2 and Microsoft Windows operating systems is used to make a new directory. In DOS, OS/2 and Windows the command is often abbreviated to md.-Usage:Normal usage is as straightforward as follows:...

Creates a directory
mkfifo Makes named pipe
Named pipe
In computing, a named pipe is an extension to the traditional pipe concept on Unix and Unix-like systems, and is one of the methods of inter-process communication. The concept is also found in Microsoft Windows, although the semantics differ substantially...

s (FIFOs)
mknod Makes block or character special files
mktemp Create a temporary file
Temporary file
Temporary files may be created by computer programs for a variety of purposes; principally when a program cannot allocate enough memory for its tasks, when the program is working on data bigger than the architecture's address space, or as a primitive form of inter-process communication.- Auxiliary...

 or directory
mv
Mv
mv is a Unix command that moves one or more files or directories from one place to another. Since it can "move" files from one filename to another, it is also used to rename files. Using mv requires the user to have write permission for the directories which the file will move between...

Moves files or rename files
rm
Rm (Unix)
rm is a basic UNIX command used to remove objects such as files, directories, device nodes, symbolic links, and so on from the filesystem...

Removes (deletes) files
rmdir
Rmdir
rmdir is a command which will remove an empty directory on a Unix, DOS, OS/2 or Microsoft Windows operating system. In Unix, Linux, and MacOS, it is case sensitive, whereas DOS, OS/2 and Windows , you can type the characters in any combination of upper case and lower case letters, and rd/rmdir...

Removes empty directories
shred
Shred (Unix)
shred is a Unix command that can be used to securely delete files and devices so that they can be recovered only with great difficulty with specialised hardware, if at all. It is a part of GNU Core Utilities.-Background:...

Overwrites a file to hide its contents, and optionally delete it
sync
Sync (Unix)
sync is a standard system call in the Unix operating system, which commits to disk all data in the kernel filesystem buffers, i.e., data which has been scheduled for writing via low-level I/O system calls. Note that higher-level I/O layers such as stdio may maintain separate buffers of their...

Flushes file system buffers
touch
Touch (Unix)
touch is a standard Unix program used to change a file's access and modification timestamps. It is also used to create a new empty file.- History :A touch utility appeared in Version 7 AT&T UNIX...

Changes file timestamps
truncate Shrink or extend the size of a file to the specifed size
vdir
Ls
In computing, ls is a command to list files in Unix and Unix-like operating systems. ls is specified by POSIX and the Single UNIX Specification.- History :An ls utility appeared in the original version of AT&T UNIX...

 
Is exactly like "ls -l -b". (Files are by default listed in long format.)
Text utilities
base64
Base64
Base64 is a group of similar encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation...

 
base64 encode/decode data and print to standard output
cat
Cat (Unix)
The cat command is a standard Unix program used to concatenate and display files. The name is from catenate, a synonym of concatenate.- Specification :...

Concatenates and prints files on the standard output
cksum
Cksum
cksum' is a command in Unix-like operating systems that generates a checksum value for a file or stream of data. The cksum command reads each file given in its arguments, or standard input if no arguments are provided, and outputs the file's CRC checksum and byte count.The cksum command can be...

Checksums and count the bytes in a file
comm
Comm
The comm command in the Unix family of computer operating systems is a utility that is used to compare two files for common and distinct lines. comm is specified in the POSIX standard. It has been widely available on Unix-like operating systems since the mid to late 1980s.-Usage:comm reads two...

Compares two sorted files line by line
csplit Splits a file into sections determined by context lines
cut
Cut (Unix)
In computing, cut is a Unix command line utility which is used to extract sections from each line of input — usually from a file.Extraction of line segments can typically be done by bytes , characters , or fields separated by a delimiter...

Removes sections from each line of files
expand
Expand (Unix)
expand is a program that converts tab characters into groups of space characters. It is available in Unix operating systems and many Unix-like operating systems.For example: $ echo -e "foo\tbar" | expand | xxd -g 1 -u...

Converts tabs to spaces
fmt
Fmt (Unix)
The fmt command in Unix is used to format human-language text. It has been traditionally used to reformat email messages after composition and prior to delivery. Its syntax is similar among various Unixes, but not identical...

Simple optimal text formatter
fold
Fold (Unix)
Fold is a Unix command used for making a file with long lines more readable on a limited width terminal. Most Linux terminals have a default screen width of 80, and therefore reading files with long lines could get annoying. The fold command puts a line feed every X characters if it doesn't...

Wraps each input line to fit in specified width
head
Head (Unix)
head is a program on Unix and Unix-like systems used to display the first few lines of a text file or piped data. The command syntax is: head [options] <file_name>...

Outputs the first part of files
join
Join (Unix)
join is a command in Unix-like operating systems that merges the lines of two sorted text files based on the presence of a common field. It is similar to the join operator used in relational databases but operating on text files....

Joins lines of two files on a common field
md5sum Computes and checks MD5 message digest
nl
Nl (Unix)
nl is a Unix utility for numbering lines, either from a file or from standard input, reproducing output on standard output.It has a number of switches:*a - number all lines*t - number lines with printable text only*n - no line numbering...

Numbers lines of files
od
Od (Unix)
od is an octal dumping program for Unix and Unix-like systems. It can also dump hexadecimal or decimal data.od is one of the earliest Unix programs, having appeared in version 1 AT&T Unix. It is also specified in the POSIX standards...

Dumps files in octal and other formats
paste
Paste (Unix)
paste is a Unix command line utility which is used to join files horizontally by outputting lines consisting of the sequentially corresponding lines of each file specified, separated by tabs, to the standard output...

Merges lines of files
ptx
Ptx (Unix)
ptx is a Unix utility, named for the permuted index which can perform the function of the Keyword in Context search mode. There is a corresponding IBM mainframe utility which performs the same function....

Produces a permuted index of file contents
pr
Pr (Unix)
pr is used to paginate or columnate files for printing.It is a required program in a POSIX-compliant environment and has been implemented by GNU as part of the GNU Core Utilities.-External links:*]]*...

Converts text files for printing
sha1sum,
sha224sum,
sha256sum,
sha384sum,
sha512sum
Computes and checks SHA-1, SHA-224/256/384/512 message digest
shuf
Shuf
shuf is a command-line utility included in the textutils package of GNU Core Utilities for creating a standard output consisting of random permutations of the input: $ ls Wikibooks Wikipedia Wiktionary $ # Shuffles input $ ls | shuf Wikibooks...

generate random permutations
sort
Sort (Unix)
sort is a standard Unix command line program that prints the lines of its input or concatenation of all files listed in its argument list in sorted order. Sorting is done based on one or more sort keys extracted from each line of input. By default, the entire input is taken as sort key...

sort lines of text files
split
Split (Unix)
split is a Unix utility most commonly used to split a file into two or more smaller files.-Usage:The command-syntax is: split [OPTION] [INPUT [PREFIX]]...

split a file into pieces
sum
Sum (Unix)
Sum is a core GNU utility written by Kayvan Aghaiepour and David MacKenzie and distributed with the UNIX- and Linux-based operating systems. This utility outputs the checksum of each argument file, as well as the number of blocks they take on disk....

Checksums and counts the blocks in a file
tac
Tac (Unix)
tac is a Linux command that allows you to see a file line-by-line backwards. It is named by analogy with cat. Its standard Unix equivalent is tail -r.Usage:Usage: tac [OPTION].....

Concatenates and prints files in reverse
tail
Tail (Unix)
tail is a program on Unix and Unix-like systems used to display the last few lines of a text file or piped data.-Syntax:The command-syntax is: tail [options]...

Outputs the last part of files
tr
Tr (Unix)
tr is a command in Unix-like operating systems.When executed, the program reads from the standard input and writes to the standard output. It takes as parameters two sets of characters, and replaces occurrences of the characters in the first set with the corresponding elements from the other set...

Translates or deletes characters
tsort
Tsort (Unix)
The tsort program is a command line utility on Unix-like platforms, that performs a topological sort on its input.-History:According to its info page, this command was initially written for providing an ordering of object files that allowed the linker to process them sequentially .Note that the...

Performs a topological sort
unexpand
Unexpand
unexpand is a command in the UNIX Operating System. It is used to convert groups of space characters into tabs.For example: $ echo " asdf sdf" | unexpand | od -c 0000000 \t \t a s d f s d f \n 0000014...

Converts spaces to tabs
uniq
Uniq
uniq is a Unix utility which, when fed a text file, outputs the file with adjacent identical lines collapsed to one. It is a kind of filter program. Typically it is used after sort...

Removes duplicate lines from a sorted file
wc
Wc (Unix)
wc is a command in Unix-like operating systems.The program reads either standard input or a list of files and generates one or more of the following statistics: number of bytes, number of words, and number of lines...

Prints the number of bytes, words, and lines in files
Shell utilities
arch
Uname
uname is a software program in Unix and Unix-like computer operating systems that prints the name, version and other details about the current machine and the operating system running on it...

print machine hardware name (same as uname -m)
basename
Basename
basename is a standard UNIX computer program. When basename is given a pathname, it will delete any prefix up to the last slash character and return the result...

Removes the path prefix from a given pathname
chroot Changes the root directory
date
Date (Unix)
The Unix date command displays the time and date. The super-user can use it to set the system clock.- Usage :With no options, the date command displays the current date and time, including the abbreviated day name, abbreviated month name, day of the month, the time separated by colons, the timezone...

Prints/sets the system date and time
dirname
Dirname
dirname is a standard UNIX computer program. When dirname is given a pathname, it will delete any suffix beginning with the last slash character and return the result...

Strips non-directory suffix from file name
du
Du (Unix)
du is a standard Unix program used to estimate file space usage—space used under a particular directory or files on a file system.- Specification :...

Shows disk usage on file systems
echo Displays a specified line of text
env
Env
env is a shell command for Unix and Unix-like operating systems. It is used to either print a list of environment variables or run another utility in an altered environment without having to modify the currently existing environment. Using env, variables may be added or removed, and the values of...

Displays and modifies environment variable
Environment variable
Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.They can be said in some sense to create the operating environment in which a process runs...

s
expr Evaluates expressions
factor Factors numbers
Integer factorization
In number theory, integer factorization or prime factorization is the decomposition of a composite number into smaller non-trivial divisors, which when multiplied together equal the original integer....

false Does nothing, but exits unsuccessfully
groups Prints the groups
Group identifier (Unix)
In Unix-like systems, multiple users can be categorized into groups. POSIX and conventional Unix file system permissions are organized into three classes, user, group, and others. The use of groups allows additional abilities to be delegated in an organized fashion, such as access to disks,...

 of which the user is a member
hostid Prints the numeric identifier for the current host
id
Id (Unix)
In computer software, id is a program in Unix-like operating systems that prints the user or group identifier of the account by which the program is executed; an example of the command id as executed by user alice:alice@darkstar:~$ id...

Prints real/effective UID and GID
Group identifier (Unix)
In Unix-like systems, multiple users can be categorized into groups. POSIX and conventional Unix file system permissions are organized into three classes, user, group, and others. The use of groups allows additional abilities to be delegated in an organized fashion, such as access to disks,...

link
Link (Unix)
The link utility is a Unix command line program that creates a hard link from an existing directory entry to a new directory entry. It does no more than call the link system function. It does not perform error checking before attempting to create the link. It returns an exit status that indicates...

Creates a link
Hard link
In computing, a hard link is a directory entry that associates a name with a file on a file system. . The term is used in file systems which allow multiple hard links to be created for the same file. This has the effect of creating multiple names for the same file, causing an aliasing effect: e.g...

 to a file
logname Print the user's login name
nice
Nice (Unix)
nice is a program found on Unix and Unix-like operating systems such as Linux. nice directly maps to a kernel call of the same name. For a given process, it changes the priority in the kernel's scheduler. A niceness of −20 is the highest priority and 19 or 20 is the lowest priority...

Modifies scheduling
Scheduling (computing)
In computer science, a scheduling is the method by which threads, processes or data flows are given access to system resources . This is usually done to load balance a system effectively or achieve a target quality of service...

 priority
nohup
Nohup
nohup is a POSIX command to ignore the HUP signal, enabling the command to keep running after the user who issues the command has logged out. The HUP signal is by convention the way a terminal warns depending processes of logout....

Allows a command to continue running after logging out
pathchk Checks whether file names are valid or portable
pinky A lightweight version of finger
Finger protocol
In computer networking, the Name/Finger protocol and the Finger user information protocol are simple network protocols for the exchange of human-oriented status and user information.-Name/Finger protocol:...

printenv Prints environment variable
Environment variable
Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.They can be said in some sense to create the operating environment in which a process runs...

s
printf
Printf
Printf format string refers to a control parameter used by a class of functions typically associated with some types of programming languages. The format string specifies a method for rendering an arbitrary number of varied data type parameter into a string...

Formats and prints data
pwd
Pwd
In Unix-like and some other operating systems, the pwd command is used to output the path of the current working directory.The command is a shell builtin in certain Unix shells such as sh, and bash...

Prints the current working directory
readlink Displays value of a symbolic link
Symbolic link
In computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in mini-computer operating systems from DEC and Data...

runcon Run command with specified security context
seq Prints a sequence of numbers
sleep
Sleep (Unix)
sleep is a Unix command line program that suspends program execution for a specified period of time.The sleep instruction suspends the calling process for at least the specified number of seconds , minutes, hours or days.-Usage:...

Delays for a specified amount of time
stat
Stat (Unix)
stat is a Unix system call that returns useful data about a file inode. The semantics of stat vary between operating systems. As an example, the Unix command ls uses it to retrieve information on : time of last modification , time of last status change and time of last access .-stat functions and...

Returns useful data about an inode
Inode
In computing, an inode is a data structure on a traditional Unix-style file system such as UFS. An inode stores all the information about a regular file, directory, or other file system object, except its data and name....

stty Changes and prints terminal line settings
su
Su (Unix)
The su command, also referred to as super user substitute user, spoof user, set user or switch user, allows a computer operator to change the current user account associated with the running virtual console....

Run a shell or command with substitute user and group IDs
tee Sends output to multiple files
test
Test (Unix)
test is a command in Unix that evaluates conditional expressions.-Description:The test command evaluates the expression parameter. In some shells , it is actually a shell builtin, even though external version still exists. In the second form of the command, the [ ] must be surrounded by blank...

Evaluates an expression
timeout Run a command with a time limit
true
True (Unix)
In Unix-like operating systems, true and false are commands whose only function is to always return the value 0 or 1.-Usage:The exit status of a command is often used to indicate success or failure of the command. The true and false commands represent the logical value of command success, because...

Does nothing, but exits successfully
tty
Tty (Unix)
tty is a Unix command that prints to standard output the name of the terminal connected to standard input. The name of the program comes from teletypewriter, abbreviated "TTY".When the program runs, it will output something like this:$ tty/dev/pts/4...

Prints terminal name
uname
Uname
uname is a software program in Unix and Unix-like computer operating systems that prints the name, version and other details about the current machine and the operating system running on it...

Prints system information
unlink
Unlink (Unix)
In Unix-like operating systems, unlink is a system call and a command line utility to delete files. The program directly interfaces the system call, which removes the file name and directories like rm and rmdir...

Removes the specified file using the unlink function
uptime
Uptime
Uptime is a measure of the time a machine has been up without any downtime.It is often used as a measure of computer operating system reliability or stability, in that this time represents the time a computer can be left unattended without crashing, or needing to be rebooted for administrative or...

Tell how long the system has been running
users Prints the user names of users currently logged in to the current host
who
Who (Unix)
The standard Unix command who displays a list of users who are currently logged into a computer.The who command is related to the command w, which provides the same information but also displays additional data and statistics.- Specification :...

Prints a list of all users currently logged in.
whoami Prints the effective userid
yes
Yes (Unix)
yes is a Unix command, which outputs an affirmative response, or a user-defined string of text continuously until killed.-Description:By itself, the yes command outputs 'y' or whatever is specified as an argument, followed by a newline repeatedly until stopped by the user or otherwise killed; when...

Prints a string repeatedly
Other Utilities
[ A synonym for test
Test (Unix)
test is a command in Unix that evaluates conditional expressions.-Description:The test command evaluates the expression parameter. In some shells , it is actually a shell builtin, even though external version still exists. In the second form of the command, the [ ] must be surrounded by blank...

, this program permits expressions like [ expression ].
System Utilities

See also

  • List of Unix programs
  • BusyBox
    BusyBox
    BusyBox provides several stripped-down Unix tools in a single executable. It runs in a variety of POSIX environments such as Linux, Android, FreeBSD and others, such as proprietary kernels, although many of the tools it provides are designed to work with interfaces provided by the Linux kernel. It...

    , a coreutils-like package for embedded Linux
  • GNU Binary Utilities
    GNU Binary Utilities
    The GNU Binary Utilities, or binutils, comprise a collection of programming tools for the manipulation of object code in various object file formats. The current versions were originally written by programmers at Cygnus Solutions using the Binary File Descriptor library...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK