I have 25GB text file that needs a string replaced on only a few lines. I can use sed
successfully but it takes a really long time to run.
sed -i 's|old text|new text|g' gigantic_file.sql
Is there a quicker way to do this?
large filesreplacesed
I have 25GB text file that needs a string replaced on only a few lines. I can use sed
successfully but it takes a really long time to run.
sed -i 's|old text|new text|g' gigantic_file.sql
Is there a quicker way to do this?
Best Answer
You can try:
From this ref:
Here is a comparison over a 10G file. Before:
After: