With the flag -n | N, the head command prints out the first N lines of file(s) head -n 7 file.txt #Prints first 7 lines of file.txt
# credit to Stack Overflow user in the source link head -1 your_file