awk [-f progfile] [-Fsep] ['program'] [file[s]] | UF |
Pattern scanning and processing language. Process file[s] or STDIN according to program (or progfile) (setting the record separator to sep). | |
bzip2 [-cdfkqstvzVL1..9] [file[s]] | GF |
Compress or expand file[s]. See a complete list of options with -h -c write on standard output -d force decompression of file[s] -z force compression of file[s] -l list compressed file contents -9 set maximum compression block size | |
cat [-entv] [file[s]] | UF |
Concatenate file[s] and print on the standard output. Print line numbers with -n, line ends as $ with -ve, tabs as ^I and form feeds as ^L with -vt. | |
cmp [-l] [-s] file1 file2 | Uf |
Compares two (binary) files. Display the first (or with -l all) difference(s). | |
compress[-cCdfv] [-b bits] [file[s]] | UF |
Compress and expand data. Obsolete, use gzip instead. | |
cpio -p [-adlmuvLV] [-R id] directory | Uf |
Copy files to and from archives. Use normally the more flexible tar command. Useful to copy directory hierarchies from current to new dir: find . -depth -print | cpio -pdlmv new | |
csplit [-ks] [-f prefix] [-n n] file pattern[s] | U |
Split a file into sections determined by context lines. See also split. | |
cut [-b] [-c] list [file[s]] | UF |
cut -f list [-n sep] [-s] [file[s]] | |
Remove sections from each line of file[s]. Cut out columns specified by a comma separated list of ranges n1[-n2], where n is given as byte count (-b), character count (-c) or field number (-f). Fields are separated by Tab or by character sep. | |
diff [-biw] [-ce] [-r] name1 name2 | U |
Compare the contents of files name1 and name2, the contents of file name1 and the same file in directory name2 or all files in directories name1 and name2. Use cmp to compare binary files. The more common options are: -b ignore trailing blanks, treat strings of blanks as equivalent -i ignore the case of letters -w ignore whitespace in comparisons -c produce context diffs -e produce a script for ed that creates name2 from name1 -r descend recursively directories | |
egrep [-bchilnsvx] [-e]pattern [-fpatternfile] [file[s]] | UF |
grep [-E] [-bchilnsvx] [-e]pattern [-fpatternfile] [file[s]] | |
Print lines matching a pattern (optionally from patternfile). Use regular or (with egrep and grep -E) extended regular expressions. -c print a count of matching lines only -h do not print file names, if used with multiple files -i ignore the case of letters -l print only file names with matching lines -n precede each output line by its relative line number in the file -v print only lines that do not match -x print only lines that do match the whole matching string | |
groff [-hi] [-mmacro] [-nnum] [-orange] [-Tdev] [file[s]] | UF |
Format documents for display or printer using a macro package (usually an). Output only pages in range. Generate Postscript (-Tps) or terminal (-Tlp, default) output | |
gunzip [-cfhlLnNrtvV] [-S suffix] [file[s]] | GF |
Expand files. Equivalent to gzip -d | |
gzip [-cdfhlLnNrtvV19] [-S suffix] [file[s]] | GF |
Compress or expand file[s]. See a complete list of options with -h -c write on standard output, keep original files unchanged -d decompress (expand) file[s] -l list compressed file contents -r operate recursively on directories -S use suffix on compressed files -9 use best (slowest) compression algorithm | |
head [-n] [-n n] [file[s]] | UF |
Output the first 10 or the first n lines of file[s] | |
paste [-s] [-d separator[s]] [file[s]] | UF |
Merge lines of files. Roughly the opposite of cut. | |
sed [-n] [-e script] [-f scriptfile] [file[s]] | UF |
Stream editor. Copies file[s] or STDIN to STDOUT by modifying the input according to script. Default output is suppressed with -n. To replace all occurences of old in file by new in newfile use sed -e 's/old/new/g' > newfile | |
sort [-cmu] [-t sep] [-o file] [-T dir] [-bdfiMnr] [-k n1[,n2]] [file[s]] | UF |
Sort, merge (-m) or sequence check (-c) text file[s]. The basic options are -b ignore leading blanks in each line -d consider only blanks and alphanumeric characters in keys -f sort case insensitively -i ignore non printing characters in sorting -n treat field elements to be sorted as numbers -r reverse the sorting direction -t sep Use sep as field delimiter The sort fields can be given with -k. In the most general case it has the syntax start_field[.first_char][bdfiMnr][,end_field[.last_char][bdfiMnr]] | |
split [-lines] [-l lines] [-b bytes[km]] [file [prefix]] | Uf |
Split a file into pieces. Store a number of lines (default 1000) or bytes (where k is 1024 and m is 1048576) in each outputfile (named prefixaa,prefixab,..., default xaa,xab,...). | |
strings [-a] [-n] [-n n] [-o] [-t oxd] [file[s]] | Uf |
Print the strings of printable characters in binary file[s]. With -a look in all sections of executables for strings. Minimum string length is 4 (or n). | |
tail [-f] [-n] [-n n] [-c n] [file[s]] | UF |
Output the last 10 or the last n lines (or with -c the last n bytes) of file[s]. Wait for further records from the input file, if -f given. | |
tar [-]mode[options] [archive] [file[s]] | UF |
gtar [-]mode[options] [archive] [file[s]] | |
Tape archiver. Many of the options described below are found only in the GNU version gtar. On Linux tar is already the GNU version. The modes -c create a new archive -d find differences between archive and file system -r append files to the end of an archive -t list the contents of an archive -u only append files newer than copy in archive -x extract files from an archive can be combined with options -M create/list/extract multi-volume archive (useful e.g. for diskettes) -N date only store files newer than date -O extract files to standard output -X file exclude files listed in file -f [host:]file use archive file (on host) -j filter the archive through bzip2 (was -I in older versions) -l stay in local file system when creating archive -p extract all protection information of files -v verbosely list files processed -z filter the archive through gzip For even more options see gtar --help. To copy directory hierarchies use cd old_dir; gtar clOS . | (cd new_dir; gtar xpvf -) | |
tee [-ai] [file[s]] | UF |
Pass STDIN to STDOUT and make a copy to file[s] (append with -a) | |
tr [-csd] [string1 [string2]] | UF |
Translate or delete chars. Chars in string1 are mapped to chars in string2 or deleted (-d) or repeated chars found in string2 are squeezed to single chars (-s). With -c all chars not in string1 are used instead. For string1 and string2 a range of chars can be given. To convert all chars in file to upercase chars in newfile use tr a-z A-Z < file > newfile | |
uniq [-cdu] [-f fields] [-s chars] [infile [outfile]] | UF |
Remove duplicate lines from a sorted file (by ignoring the first fields or the first chars in comparisons). Only print unique lines (-u), duplicate lines (-d) or precede the output lines with a repetition count (-c). | |
unzip [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir] | P |
List, test and extract compressed files in a ZIP archive. See unzip -h or man unzip for details. Provided for interoperability with DOS. | |
uudecode [file] | UF |
Decode a file created by uuencode | |
uuencode [file] decode_name | UF |
Encode a binary file (or STDIN) that will be uudecoded as file decode_name | |
wc [-clw] [file[s]] | Uf |
Print the number of bytes (-c), words (-w), and lines (-l) in file[s] | |
xargs [-pt] [-e[eofstr]] [-i[repstr]] [cmd [args]] | UF |
Build and execute command lines from STDIN. Each input line is appended to cmd [args] and then executed. More efficient than find -exec. -t list (trace) executed commands -p prompt before each command -i [repstr] replace each occurrence of repstr (default {}) with full input line For more options see the man page. Move old_dir to new_dir with ls old_dir | xargs -ti mv old_dir/{} new_dir/{} | |
zcat [-fhLV] [file[s]] | GF |
Uncompress file[s] (or STDIN) to STDOUT. Is the same as gunzip -c. | |
zip [-options] [-b path] [-t mmddyy] [-n suffixes] [zipfile list] [-xi list] | PF |
Package and compress (archive) files in a ZIP archive. See zip -h or man zip for details. Provided for interoperability with DOS. |