Created
October 11, 2014 02:15
-
-
Save yanhua365/ed56f5099473f3767cb0 to your computer and use it in GitHub Desktop.
读取大文件的前几行的命令
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#这样的速度快 | |
sed -n '10,20p' test.txt | |
#用cat配合head或tail也可以,但大文件会内存溢出 | |
cat test.txt|head -n 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment