Saturday 1 December 2012

How to prompt first three lines of the file?


How to show first three lines of the file?


head command is the answer



Lets show usage of this command on file.txt example



Example of head command usage in ubuntu

head -n X file.txt

where X is number of last lines which we want to prompt

head -n 3 file.txt

This is an example how to use head command in Ubuntu os.




No comments:

Post a Comment