List of GNU Core Utilities commands

Last updated

This is a list of commands from the GNU Core Utilities for Unix environments. These commands can be found on Unix operating systems and most Unix-like operating systems.

Contents

GNU Core Utilities include basic file, shell and text manipulation utilities. Coreutils includes all of the basic command-line tools that are expected in a POSIX system.

List [1]

File Utilities

NameDescription
chcon Changes file security context (SELinux)
chgrp Changes file group ownership
chown Changes file ownership
chmod Changes the permissions of a file or directory
cp Copies a file or directory
dd Copies and converts a file
df Shows disk free space on file systems
dir Is exactly like "ls -C -b". (Files are by default listed in columns and sorted vertically.)
dircolors Set up color for ls
install Copies files and set attributes
ln Creates a link to a file
ls Lists the files in a directory
mkdir Creates a directory
mkfifo Makes named pipes (FIFOs)
mknod Makes block or character special files
mktemp Creates a temporary file or directory
mv Moves files or rename files
realpath Returns the resolved absolute or relative path for a file
rm Removes (deletes) files, directories, device nodes and symbolic links
rmdir Removes empty directories
shred Overwrites a file to hide its contents, and optionally deletes it
sync Flushes file system buffers
touch Changes file timestamps; creates file
truncateShrink or extend the size of a file to the specified size
vdir Is exactly like "ls -l -b". (Files are by default listed in long format.)

Text Utilities

NameDescription
b2sum Computes and checks BLAKE2b message digest
base32Encodes or decodes Base32, and prints result to standard output
base64Encodes or decodes Base64, and prints result to standard output
cat Concatenates and prints files on the standard output
cksum Checksums (IEEE Ethernet CRC-32) and count the bytes in a file.
Supersedes other *sum utilities with -a option from version 9.0.
comm Compares two sorted files line by line
csplit Splits a file into sections determined by context lines
cut Removes sections from each line of files
expand Converts tabs to spaces
fmt Simple optimal text formatter
fold Wraps each input line to fit in specified width
head Outputs the first part of files
join Joins lines of two files on a common field
md5sum Computes and checks MD5 message digest
nl Numbers lines of files
numfmt Reformat numbers
od Dumps files in octal and other formats
paste Merges lines of files
ptx Produces a permuted index of file contents
pr Converts text files for printing
sha1sum ,
sha224sum,
sha256sum,
sha384sum,
sha512sum
Computes and checks SHA-1/SHA-2 message digests
shuf generate random permutations
sort sort lines of text files
split Splits a file into pieces
sum Checksums and counts the blocks in a file
tacConcatenates and prints files in reverse order line by line
tail Outputs the last part of files
tr Translates or deletes characters
tsort Performs a topological sort
unexpand Converts spaces to tabs
uniq Removes duplicate lines from a sorted file
wc Prints the number of bytes, words, and lines in files

Shell Utilities

NameDescription
arch Prints machine hardware name (same as uname -m)
basename Removes the path prefix from a given pathname
chroot Changes the root directory
date Prints or sets the system date and time
dirname Strips non-directory suffix from file name
du Shows disk usage on file systems
echo Displays a specified line of text
env Displays and modifies environment variables
expr Evaluates expressions
factor Factors numbers
false Does nothing, but exits unsuccessfully
groups Prints the groups of which the user is a member
hostid Prints the numeric identifier for the current host
id Prints real or effective UID and GID
link Creates a link to a file
logname Print the user's login name
nice Modifies scheduling priority
nohup Allows a command to continue running after logging out
nproc Queries the number of (active) processors
pathchk Checks whether file names are valid or portable
pinky A lightweight version of finger
printenv Prints environment variables
printf Formats and prints data
pwd Prints the current working directory
readlink Displays value of a symbolic link
runcon Run command with specified security context
seq Prints a sequence of numbers
sleep Delays for a specified amount of time
stat Returns data about an inode
stdbuf Controls buffering for commands that use stdio
stty Changes and prints terminal line settings
tee Sends output to multiple files
test Evaluates an expression
timeout Run a command with a time limit
true Does nothing, but exits successfully
ttyPrints terminal name
uname Prints system information
unlink Removes the specified file using the unlink function
uptime Tells how long the system has been running
users Prints the user names of users currently logged into the current host
who Prints a list of all users currently logged in
whoami Prints the effective userid
yes Prints a string repeatedly
[A synonym for test; this program permits expressions like [expression].

See also

Related Research Articles

<span class="mw-page-title-main">Cygwin</span> Unix-like environment for Windows

Cygwin is a Unix-like environment and command-line interface for Microsoft Windows.

ed (software) Line-oriented text editor for Unix

ed is a line editor for Unix and Unix-like operating systems. It was one of the first parts of the Unix operating system that was developed, in August 1969. It remains part of the POSIX and Open Group standards for Unix-based operating systems, alongside the more sophisticated full-screen editor vi.

The Portable Operating System Interface is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system and user-level application programming interfaces (APIs), along with command line shells and utility interfaces, for software compatibility (portability) with variants of Unix and other operating systems. POSIX is also a trademark of the IEEE. POSIX is intended to be used by both application and system developers.

uniq is a utility command on Unix, Plan 9, Inferno, and Unix-like operating systems which, when fed a text file or standard input, outputs the text with adjacent identical lines collapsed to one, unique line of text.

In computing, tar is a computer software utility for collecting many files into one archive file, often referred to as a tarball, for distribution or backup purposes. The name is derived from "tape archive", as it was originally developed to write data to sequential I/O devices with no file system of their own, such as devices that use magnetic tape. The archive data sets created by tar contain various file system parameters, such as name, timestamps, ownership, file-access permissions, and directory organization. POSIX abandoned tar in favor of pax, yet tar sees continued widespread use.

pwd Directory information command on various operating systems

In Unix-like and some other operating systems, the pwd command writes the full pathname of the current working directory to the standard output.

basename is a standard computer program on Unix and Unix-like operating systems. When basename is given a pathname, it will delete any prefix up to the last slash ('/') character and return the result. basename is described in the Single UNIX Specification and is primarily used in shell scripts.

uname Standard UNIX utility that prints name and other details about the machine

uname is a computer 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.

<span class="mw-page-title-main">MinGW</span> Free and open-source software for developing applications in Microsoft Windows

MinGW, formerly mingw32, is a free and open source software development environment to create Microsoft Windows applications.

The archiver, also known simply as ar, is a Unix utility that maintains groups of files as a single archive file. Today, ar is generally used only to create and update static library files that the link editor or linker uses and for generating .deb packages for the Debian family; it can be used to create archives for any purpose, but has been largely replaced by tar for purposes other than static libraries. An implementation of ar is included as one of the GNU Binutils.

tr (Unix) Unix text formatting utility

tr is a command in Unix, Plan 9, Inferno, and Unix-like operating systems. It is an abbreviation of translate or transliterate, indicating its operation of replacing or removing specific characters in its input data set.

wc (Unix) Unix command utility

wc is a command in Unix, Plan 9, Inferno, and Unix-like operating systems. The program reads either standard input or a list of computer files and generates one or more of the following statistics: newline count, word count, and byte count. If a list of files is provided, both individual file and total statistics follow.

In Unix and Unix-like operating systems, iconv is a command-line program and a standardized application programming interface (API) used to convert between different character encodings. "It can convert from any of these encodings to any other, through Unicode conversion."

cksum Unix command

cksum is a command in Unix and 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 32-bit cyclic redundancy check (CRC) checksum and byte count. The CRC output by cksum is different from the CRC-32 used in zip, PNG and zlib.

The GNU Core Utilities or coreutils is a package of GNU software containing implementations for many of the basic tools, such as cat, ls, and rm, which are used on Unix-like operating systems.

rm (Unix) Unix command utility

rm is a basic command on Unix and Unix-like operating systems used to remove objects such as computer files, directories and symbolic links from file systems and also special files such as device nodes, pipes and sockets, similar to the del command in MS-DOS, OS/2, and Microsoft Windows. The command is also available in the EFI shell.

whoami Command on various operating systems

In computing, whoami is a command found on most Unix-like operating systems, Intel iRMX 86, every Microsoft Windows operating system since Windows Server 2003, and on ReactOS. It is a concatenation of the words "Who am I?" and prints the effective username of the current user when invoked.

<span class="mw-page-title-main">Unix-like</span> Operating system that behaves similarly to Unix, e.g. Linux

A Unix-like operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-like application is one that behaves like the corresponding Unix command or shell. Although there are general philosophies for Unix design, there is no technical standard defining the term, and opinions can differ about the degree to which a particular operating system or application is Unix-like.

<span class="mw-page-title-main">Unix</span> Family of computer operating systems

Unix is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.

References

  1. "README".