head tail pipes with the use of

Scenario: a file, line 46, I just want content 21-30 rows, how to achieve

Command is as follows: head -n 30 / etc / passwd | tail> /root/password.txt

 

Guess you like

Origin www.cnblogs.com/cloud-yongqing/p/12031495.html