Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

head and tail command in linux

tail -f file # Opens file at the end
head file  # Outputs file start
# Ctrl + "C" to exit
tail -n 10 file # Outputs in terminal last 10 file lines
head -n 10 file # Outputs in terminal first 10 file lines
tail -n +10 file # Outputs file content since 10th line
 
PREVIOUS NEXT
Tagged: #head #tail #command #linux
ADD COMMENT
Topic
Name
7+8 =