head

The head command is used to display the first 10 lines of any text passed to it.

Example

head info.log

This will display the first 10 lines of the info.log file

n option (-n)

This option will display the number of lines following the option instead of the default 10 lines.

Example

head -n 5 info.log

This will display the first 5 lines of the info.log file

c option (-c)

This option will display the number of bytes following the option instead of the default 10 lines.

Example

head -c 50 info.log

This will display the first 50 bytes of the info.log file

results matching ""

    No results matching ""