Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Text Editor for very big file - Windows

NOt a programming question I know but related to a program I am writing, and probably a problem only likely to be encountered by programmers.

I have a really big text file which I need to edit - just need to delete the first line.

None of the standard windows programs can handle the 200MB+ file

What is the best way to edit it?

share|improve this question

migrated from Oct 5 '09 at 7:04

This question came from our site for professional and enthusiast programmers.

marked as duplicate by alex, hyperslug, harrymc, BinaryMisfit Oct 6 '09 at 10:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This question has been asked before. You can find more information here:… and here:… – alex Oct 5 '09 at 7:28

Use the sed command:

sed 1d largefile > newfile
mv newfile largefile

If you don't have sed, get Cygwin or UnxUtils for Windows.

share|improve this answer
if you are going to edit just 1 line and you know exactly where the line is, its far easier to use sed rather than opening the file in an interactive editor. – Andrew Keith Oct 5 '09 at 8:25

Then don't use a 'standard windows program'.

I've use vim in Cygwin under Windows XP to edit a 400MB file.

I don't want to do it regularly, but it worked.

EDIT: Of course, installing Cygwin just so you can edit a file is probably too much, but you should consider non standard Windows programs.

I'm not sure what the limitation of Notepad++ is, and you may consider it a 'standard', but there may be a modern third-party editor which will do the job.

share|improve this answer
Don't be snarky. – Sam152 Oct 5 '09 at 7:10
I don't see why that's snarky (whatever that means) I'm saying don't use a standard Windows program, use a non-standard Windows program. – pavium Oct 5 '09 at 7:21
You can also install gvim under windows without cygwin. It should work just as well. – Nathan Fellman Oct 5 '09 at 9:24

UltraEdit (commercial) handles large files rather well.

share|improve this answer

You should be able to use a ".vbs" script to do this. (Feel free to correct me on this one - I haven't checked the code properly)

Create a file called CopyAllButLine1.vbs, and enter the following: ({firstfile} and {secondfile} are the names of your files)

Set objFile = objFSO.OpenTextFile ("{firstfile}", 1)
Set outfile = objFSO.OpenTextFile ("{secondfile}")
strNextLine = objFile.Readline
Do Until objFile.AtEndOfStream
    strNextLine = objFile.Readline

Then double click your .VBS file.

share|improve this answer

There is an editor, available either in Lite version or Professional version. This is EditPad pro from JGSoft. I registered it several years ago and kept registering the upgrades as well.


share|improve this answer

I've used Large Text File Viewer for reading huge server logs in the past. It doesn't require an install and is pretty simple to use.

share|improve this answer

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