Veiwing file in Terminal
You can use two utilites for viewing text files on the screen: cat and more
cat is used for viewing short files (less than one page), and more is used for wiewing longer, multi-0page files.
cat merely writes the file to the screen and then exites.
more provides a simple interface to move backwards and forwards through a file.
"f" or "Space" key to move a page forward,
"Enter" key to move a line forward,
"b" to move a page back and
"q" to quit.
if you want to just look at the beginneing or end of the file you can use the
head and tail commands.
Actually there is a third utility for viewing files, called less
less is better than more. In fact, less is an improved version of the more program that allows more flexible scrolling and searching within the file.
Too see how it works, run less words (assum there is a text file named words),
Then press the "h" key for help. more is a good starting point for viewing files, but many expert user prefer less
| |
|
Welcome to AstaHost - Dear Guest | |
Toggle shoutbox
Shoutbox
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||



