Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: What is the best way to remove(delete) specific lines from a very large file?

by dws (Chancellor)
on Dec 01, 2001 at 03:34 UTC ( #128796=note: print w/replies, xml ) Need Help??


in reply to What is the best way to remove(delete) specific lines from a very large file?

What is the best way to remove(delete) specific lines from a very large file?

Ah. The post with a succinct question!

Read from file A, write anything you don't want to delete to file B. If the files are really large, it'll go faster to have the files on separate disk drives. Moving disk heads is relatively expensive. You can minimize head contention by reading from one head (file) while writing to a separate head (file). Unless, of course, the source file is fragmented, or the target disk is heavily fragmented.

  • Comment on Re: What is the best way to remove(delete) specific lines from a very large file?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://128796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2021-05-09 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (100 votes). Check out past polls.

    Notices?