Most Linux configuration files are plain text and we can use cat to view them. If text files are long, we can view them one page at a time with a pager.
- [Instructor] Any command output that goes to the screen…can be saved as a file using a redirect,…as well as sent to other commands using a pipe.…Let's redirect the output of a command to a file.…For this demonstration we'll use the journalctl command…that shows system messages.…If we type in journalctl,…we can see that it shows a lot of useful information…that we might want to save somewhere.…Press Q to quit.…Type in journalctl again.…Space, greater than symbol, and then name the file…journal.txt.…Hit enter.…
Notice no output went to the screen.…If we use the cat command to read this file…we'll see that the output is in the file.…The cat command is a very simple way of viewing a text file.…If you want to view the file in reverse order,…you could type in tac, space journal.txt and hit enter.…Tac is cat backwards.…If you like to sort the file you could just type in sort…journal.txt and it'll sort it in alphabetical order.…You might notice that cat views the whole file…and it scrolls off the screen.…
It might be nice to view the file one page at a time…
- Distinguish the difference between the –help option and the output of the man command.
- Define what the uptime command is used for.
- Compare the more command with the less command.
- State which compression algorithm is built into the tar command.
- Write where all operating system files in Linux are stored.
- List the three mods in vi.