From Christoph's Personal Wiki
Revision as of 23:35, 6 February 2013 by Christoph (Talk | contribs) (Programs included in coreutils)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Coreutils is a package of GNU software containing many of the basic tools such as cat, ls, and rm needed for Unix-like operating systems.

GNU coreutils capabilities

The GNU core utilities support long options as parameters to the commands, as well as the relaxation of the convention of specifying options before the regular arguments, unless the POSIXLY_CORRECT environment variable is set. Additionally, as the GNU philosophy shifts information away from manual pages (and uses tools such as info), usage information is more extensive.

Coreutils categories

Output of entire files 
cat tac nl od
Formatting file contents 
fmt pr fold
Output of parts of files 
head tail split csplit
Summarizing files 
wc sum cksum md5sum
Operating on sorted files 
sort uniq comm ptx tsort
Operating on fields within a line 
cut paste join
Operating on characters 
tr expand unexpand
Directory listing 
ls dir vdir d v dircolors
Basic operations 
cp dd install mv rm shred
Special file types 
ln mkdir rmdir mkfifo mknod
Changing file attributes 
chgrp chmod chown touch
Disk usage 
df du stat sync
Printing text 
echo printf yes
false true test expr
File name manipulation 
dirname basename pathchk
Working context 
pwd stty printenv tty
User information 
id logname whoami groups users who
System context 
date uname hostname
Modified command invocation 
chroot env nice nohup su
Process control 
Numeric operations 
factor seq

Programs included in coreutils

  • basename — return non-directory portion of a pathname (or the last component of a pathname)
  • cat — concatenate files and print on the standard output
  • chgrp — change the file group ownership
  • chmod — change file access permissions
  • chown — change file owner and group
  • chroot — run command or interactive shell with special root directory
  • cksum — checksum and count the bytes in a file
  • comm — compare and select/reject two sorted files line by line
  • cp — copy files and directories
  • csplit — split a file into sections determined by context lines
  • cut — cut out selected fields of each line of a file
  • date — print or set the system date and time
  • dd — convert and copy a file
  • df — report file system disk space usage
  • dir — list directory contents
  • dircolors — colour setup for ls
  • dirname — return the directory portion of a pathname
  • du — estimate file space usage
  • echo — display a line of text and/or write arguments to standard output
  • env — set the environment for command invocation
  • expand — convert tabs to spaces
  • expr — evaluate arguments as an expression
  • factor — factor a number, generate primes
  • false — do nothing, unsuccessfully (ie, return false value)
  • fmt — simple optimal text formatter
  • fold — wrap each input line to fit in specified width
  • groups — print the groups a user is in
  • head — output the first part of files
  • hostid — set or print system's host id.
  • id — print/return user identity
  • install — copy files and set attributes
  • join — join lines of two files on a common field
  • link — call the link function to create a link to a file
  • ln — make links between files
  • logname — print/return user's login name
  • ls — list directory contents
  • md5sum — compute and check MD5 message digest
  • mkdir — make/create directories
  • mkfifo — make a FIFO special file (a named pipe)
  • mknod — make block or character special files
  • mv — move/rename files
  • nice — run a program with modified scheduling priority
  • nl — number lines of files (a line numbering filter)
  • nohup — run a command immune to hangups, with output to a non-tty
  • od — dump files in octal and other formats
  • paste — merge corresponding or subsequent lines of files
  • pathchk — check whether file names (and pathnames) are valid or portable
  • pinky — lightweight finger
  • pr — convert text files for printing
  • printenv — print all or part of environment
  • printf — format and print data
  • ptx — produce a permuted index of file contents
  • pwd — Return the absolute path of the current working directory
  • readlink — display value of a symbolic link
  • rm — remove/delete files or directories
  • rmdir — remove/delete empty directories
  • seq — print a sequence of numbers
  • sha1sum — compute and check SHA1 message digest
  • shred — overwrite a file to hide its contents, and optionally delete it
  • sleep — sleep/deley (or suspend execution) for the specified number of seconds
  • sort — sort lines of text files
  • split — split a file into pieces
  • stat — display file or file system status
  • stty — change/set the options and/or print terminal line settings
  • sum — checksum and count the blocks in a file
  • sync — flush file system buffers (or synchronize data on disk with memory). Also schedule file system updates
  • tac — concatenate and print files in reverse
  • tail — output the last part of files
  • tee — read from standard input and write to standard output and files (ie, duplicate stdin)
  • test — check file types and compare values (or evaluate expression)
  • touch — change file access and modification times/timestamps
  • tr — translate or delete characters
  • true — do nothing, successfully (or return true value)
  • tsort — perform topological sort
  • tty — print the file name of the terminal connected to standard input (or return user's terminal name)
  • uname — get name and information about current kernel and other system information
  • unexpand — convert spaces to tabs
  • uniq — report or filter out repeated lines in a file
  • unlink — call the unlink function to remove the specified file
  • users — print the user names of users currently logged in to the current host
  • vdir — list directory contents
  • wc — print the number of newlines, words, and bytes in files
  • who — show who is logged on (the system)
  • whoami — print effective userid
  • yes — output a string repeatedly until killed

Other useful non-coreutils

  • rev — reverse lines of a file
  • w — show who is logged on and what they are doing
  • whereis — locate the binary, source, and manual page files for a command
  • which — shows the full path of (shell) commands

See also

External link

Linux command line programs
File and file system management: cat | cd | chmod | chown | chgrp | umask | cp | du | df | file | fsck | ln | ls | lsof | mkdir | more | mount | mv | pwd | rcp | rm | rmdir | split | touch | tree
Process management: anacron | at | chroot | cron/crontab | kill | nice | ps | sleep | screen | time | timex | top | nice/renice | wait
User Management/Environment: env | finger | id | locale | mesg | passwd | su | sudo | uname | uptime | w | wall | who | write
Text processing: awk | cut | diff | ex | head | tac | tee | iconv | join | less | more | paste | sed | sort | tail | tr | uniq | wc | xargs | perl
Shell programming: echo | expr | unset Printing: lp
inetd | netstat | ping | rlogin | traceroute

find | grep/egrep/fgrep | strings


banner | bc | cal | man | yes