cat查看文件以及sed查看指定行数时间:2023-03-09 19:00:29 https://unix.stackexchange.com/questions/288521/with-the-linux-cat-command-how-do-i-show-only-certain-lines-by-number To print one line (5) $ sed -n 5p file Line 5 To print multiple lines (5 & 8) $ sed -n -e 5p -e 8p file Line 5 Line 8 To print specific range (5 - 8) $ sed -n 5,8p file Line 5 Line 6 Line 7 Line 8