I have a file larger than 5 GB. Are there any programs/tools that will be able to open it and copy & paste the contents?
If not, can it be done by writing a program?
feedback
|
This question came from our site for professional and enthusiast programmers.
Yes, it can be better to use this approach if the operation is something you will have to do often. There are many scripting tools that are well suited to this sort of task. One of them is Perl. Perl is included in most Linux & Mac systems and available free for Windows Example: "copy" all text between and including lines starting "Apple…" and "Orange…" from file1.txt and "paste" (actually append) it to the end of file2.txt
The above can be typed at a command prompt. The part between quotes is the program (or script). | ||||
|
feedback
|
|
You can use text editors which can handle large text/binary files. I recommend: Also, see possible duplicate question: | |||
feedback
|
|
If you only want to do is copy and paste or do some small edits then I suggest using linux/unix text processing tools such as grep, sed, tail etc. They can easily find relevant part of the file or can modify it. | |||
|
feedback
|