Computer Science Fundamentals Operating Systems Subjective
Mar 12, 2013

What is the use of ‘head’ command in UNIX system?

Detailed Explanation

Head command displays the head or start of the file.
Syntax--
     head [options] file
Common Options:-
     -n number    number of lines to display, counting from the top of the file
     -number     same as above
Examples:-
By default head displays the first 10 lines. You can display more with the "-n number",
        or
"-number" options, e.g., to display the first 40 lines: % head -40 filename or head -n 40 filename

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback