The UNIX more&less&head&tail command

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

If the text file is relatively long, a screen cannot display, then use the cat command may not be see.

Here we can simply use more instead of cat commands. The effect of the /p class with typelike.

Use the more command to a display screen displays text, full, stop, and

Indicate the percentage of all the content has been displayed, press space key can see the next screen.

Less can back and forth page

The L Head command:

Function: display of N line in the file contents.

Basic usage: head –n filename

Where n is an integer, said before the N line in filename.

The L Tail command:

Function: display file after N content.

Basic usage: tail –n filename

Where n is an integer, said before the N line in filename.

By default, head filename or tail filename will print out the file before | after 10.

Head and tail use can print the specified a file content.

In addition, tail also has a very interesting parameter -f, exit is not it some contents of the specified file in print, waiting for a period of time, once the file is updated, it will print out the specified content updated.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Lionel at December 21, 2013 - 3:55 PM