cat: concatenate; combine an arbitrary number of files and send it to a file. It’s also commonly used to display the content of short files.
Options for cat:
|-E||–show-ends||see where line ends|
|-n||–number||add numbers to the beginning of every line|
|-b||–number-nonblank||numbers only lines that contain text|
|-s||–squeeze-blank||compress groups of blank lines down to a single one|
|-t||–show-tabs||display tabs as ^I|
tac: it reverses the order of lines in the output.
join: combines two files matching the content of specified fields. Fields are usually separated by a space. -t [char] option lets you specify another character to be used as separator.
paste: merges file line by line, separating the lines from each file with tabs.
expand: convert tabs with spaces; by default it assumes a tab stop every 8 characters.
od: octal dump, used for files that don’t use ASCII.
sort: sort an output in several ways, -f -ignore-case, -M –month-sort (3-letter month abbreviation), -n –numeric-sort, -r -reverse
split: you have to specify a fine name (a prefix) and how large you want the individual files, option -b [size]
unexpand: convert spaces into tabs
uniq: remove duplicate lines
ftm: tries to clean up paragraphs (it assumes are delimited by two or more blank lines) and limits them to 75 characters
nl: adds numbers to the non-blank lines in a file
pr: format text for printing (80 characters length), -d –double-space, –l [lines] length of the page in lines, -h [text] set header
head: echoes the first 10 lines of a file, -n [num] –lines=[num]
tail: shows the last 10 lines of a file, -n [num], -f –follow keep the file open and display new lines as they are added, –pid=[pid] terminate tracking once a process with that PID terminates
cut: extracts portions of input lines and displaying them to STDOUT. This command is frequently used in scripts to extract data from other commands.
wc: word count, display [lines] [words] [bytes]