In Linux system, which command will print the output of log file in reverse ?
- less
- cat
- tac
- rcs
EXPLANATION
Let's assume that we have a log file named "Letters" that contains: A B C D (in separate lines).To view the content of the log file in Linux terminal, the command will be:
linux@machine:~$ sudo cat LettersAnd we will get the output:
A
B
C
D
To view the content of the log file in reverse, the command will be:
linux@machine:~$ sudo tac LettersAnd we will get the output:
D
C
B
A
0 comments:
Post a Comment