Skip to content

Instantly share code, notes, and snippets.

@itomg
Created August 1, 2014 01:31
Show Gist options
  • Save itomg/4033f2d4bff75f3ecb0f to your computer and use it in GitHub Desktop.
Save itomg/4033f2d4bff75f3ecb0f to your computer and use it in GitHub Desktop.
How to display certain lines from a huge file in Linux?
sed -n '10000000,10000020p' filename
# You might be able to speed that up a little like this:
sed -n '10000000,10000020p; 10000021q' filename
# ref http://serverfault.com/questions/133692/how-to-display-certain-lines-from-a-text-file-in-linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment