head
tail
- head displays first lines of a file.
- defaults to first 10 lines
- argument allows different number to be shown - Display the top of a file with the command below. How many lines do you
count?
head filename
- Now try this command and note how many lines are displayed this time?
head -5 filename
tail
- tail displays the last lines of the file.
- defaults to 10 lines, or you can specified a number. - Display the same file with the tail command. How is it different and
how many lines do you count?
tail filename
- Now try this command and note how many lines are displayed this time?
tail -5 filename
0 comments:
Post a Comment