Switches - Reverse Flashcards
type
returns all of the places that contain an executable named file
type -a
uname
show all information
uname -a
history
clear the history
history -c
man
search man pages for a topic; requires the whatis database to work
man -k
man -k ““system information””
man
select the section in the man page to open
man #
man 5 passwd
xargs
specify the delimiter
xargs -d
defaults to space
cat
display a “”$”” at the end of each line
cat -E
–show-ends
cat
adds line numbers to the beginning of every line.
cat -n
–number
cat
adds line numbers to the beginning of every line that contains text
cat -b
–number-nonblank
cat
compresses groups of blank lines down to a single blank line
cat -s
–squeeze-blank
cat
displays tab characters as ““∧I””
cat -T
–show-tabs
cat
displays most control and other special characters using carat ( ∧ ) and M- notations.
cat -v
–show-nonprinting
join
use CHAR as input and output field separator
join -t CHAR
join
ignore differences in case when comparing fields
join -i
–ignore-case
expand
have tabs NUMBER characters apart; not 8
expand -t NUMBER
–tabs=NUMBER
sort
ignore case
sort -f
–ignore-case; (fold)
sort
sort by three-letter month abbreviation ( JAN through DEC )
sort -M
–month-sort
sort
compare according to string numerical value
sort -n
–numeric-sort
sort
reverse the result of comparisons
sort -r
–reverse
sort
sort via a key; KEYDEF gives location and type
sort -k KEYDEF
–key=KEYDEF
(KEYDEF can be two numbered fields separated by commas; to sort on multiple fields.)
E.G. sort -k 3 listing1.1.txt
split
put NUMBER bytes per output file
split -b NUMBER
–bytes=NUMBER
split
put at most NUMBER bytes of records per output file
split -C NUMBER
–line-bytes=NUMBER
split
put NUMBER lines/records per output file
split -l NUMBER
–lines=NUMBER
tr
first truncate SET1 to length of SET2
tr -t
–truncate-set1