1. less command
Syntax
# less (filename)
# less http.conf (Use up and down arrow to scroll respectively)
2. more command
This command can also be used to views files with huge contents but things are a bit complicated as compared to less command. To scroll up and down the page you need to memorize specific buttons.
Syntax
# more (filename)
# more http.conf
SPACE : To scroll down
d : To scroll to the very next line
b : To scroll back to the previous line
3. tail command
This command if used without any additional switches displays the last 10 lines of the file you are trying to view. This command can be helpful in case you are specific to view particular content of any file.
Syntax
# tail (filename)
# tail http.conf
# tail -20 http.conf
This will list last 20 lines of http.conf
4. head command
This command is similar to tail command with one difference that it shows top 10 lines of any file if used without any switches.
# head (filename)
# head http.conf
# head -20 http.conf
This will list first 20 lines of http.conf
5. vi or vim command
This command is basically used to edit files but again you can't ignore the fact can it can also be used to view files and close it without editing.
Synatx
# vi (filename)# vi http.conf
Use up and down arrow to scroll up and down. For more information on extra switches use man command
# man vi
6. pr command
This command can also be used to view the contents of any file but its not much user friendly. Alternatively you can utilize this using pipe and less command.
Syntax
# pr (filename) | less
# pr http.conf | less
7. cat command
This command can also be used to read a file but it has a demerit, you won't get any option to scroll up and down if the file content is very huge. It can be useful if the file you are trying to view has less contents or else you might have to use less command along with pipe as shown above.
Syntax
# cat (filename)
# cat http.conf | less (In case the file content is more)