Introduction to Linux shell commands
Chapter 2: Commands
Visualising Files
Use the following commands to view files in terminal.
head fileNameshows the first few lines of a file (default 10)tail fileNameshows the last few lines of a file (default 10)- for both
headandtailyou can specify the number of lines to show with-n #
- for both
cat file1 file2 file3concatenates files and prints them in orderless fileNameprints the file however, shows you less at a time. You can use the arrow keys to scroll through the document. To exitlesstypeq.wc fileNameshows line, word and character count