Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a 2.8GB sql dump file in linux. I need to delete lines 18 through 3000, but I can't open it in a text editor like vim because it's so big.

Any suggestions? I assume you could use sed or something similar, I just don't know the command.

share|improve this question
add comment

1 Answer

up vote 12 down vote accepted

I think that's what sed was designed for:

sed '18,3000d' input.txt > output.txt

Resources

share|improve this answer
    
I love sed! sed rocks! –  Paul Sep 11 '10 at 8:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.