How do you read the first few lines in Unix?

Khang Lê

New member
How do you read the first few lines in Unix?
Answer
To look at the first few lines of a file,
type head filename, where filename is the name of the file you want to look at, and then press <Enter>. By default, head shows you the first 10 lines of a file. You can change this by typing head -number filename, where number is the number of lines you want to see.
 

Tìm kiếm

Back
Top