Selective way to view files
Skill administrator (2000-12-22 22:39) 〖Back〗 〖Forward〗
If you just want to watch the top 5 lines of the file, you can use the head command, such as: head -5 / etc / passwd If you want to view the file 10 line, you can use the tail command, such as: tail -10 / etc / passwd you Do you know how to view the middle of the file? You can use the sed command such as: Sed -n '5, 10p' / etc / passwd, you can only view the fifth line of the file to 10th lines.