Loading…
head & tailWhen files are hundreds of lines long, you don't want to print the entire thing. Two commands help:
head — shows the first lines of a file (default: 10)tail — shows the last lines of a file (default: 10)head -n 5 file.txt — shows only the first 5 linestail -n 3 file.txt — shows only the last 3 linesA file called server-log.txt has been prepared with 20 lines of log entries. Use tail to display only the last 5 lines of the file.
Loading terminal engine...
This may take a moment on first load