Professional Documents
Culture Documents
Linux Commands For Exams
Linux Commands For Exams
Linux Commands For Exams
LINUX Commands
Basic Linux commands and their options
I.
II. cat : Reads file sequentially and writes them to the standard
output. Also used to take input from the standard input and
redirect into a file. Terminated with Ctrl-L
J
N
O
C
J
N
O
C
S
J
N
O
C
S
IX. echo : Writes the arguments give to the standard output. The
output can be redirected to any file using the output/input
redirection methods.
X. cmp : Compare two files byte by byte. The differences line and
column numbers if any encountered in the file are printed on
the standard output
A. -b : Print the differing bytes
B. -n : Compare at most n number of bytes
C. -s : Output nothing, only exit status
XI. head : Displays first 10 lines of the file
A. -n : Displays the n number of lines of the file
B. -c : Displays the c number of bytes of the file
XII.tail : Displays the last 10 lines (by default) of the file
A. -n : Displays the last n lines of the file
B. -c : Displays the last c bytes of the file
XIII.sort : Sorting and concatenating the files and print the output
on the standard output
A. -b : Ignoring the leading blanks
B. -f : Ignore the case of the letter
C. -n : Numeric sort
D. -r : Reverse the sorted output
E. -o file : Write the result to the output file
XIV.tee : This command copies standard input to standard output,
making a copy of it in zero or more files. Basically it divides
the standard input into any number of streams, one of the
streams being the terminal screen
J
N
O
C