I have a large SQL dump of 250 MB +, and I need to replace www.mysite with dev.mysite. I tried nano and vi for search / replace, but both chokes. Nano cannot even open it, and vi has been searching / replacing for an hour now.
Does anyone know a tool on * nix or windows systems that quickly find / replace large files?
sed -i 's/www\.mysite/dev.mysite/g' dump.sql
(requires temporary storage space equal to input size)
Finding / replacing on a SQL dump is not a good idea
, , UPDATE, . REPLACE MySQL .
you need sed
sed
Example
sed -e "s/www.mysite/dev.mysite/g" your_large_sql
alternatively import sql into the database, then use replaceto replace for matched rows
replace
Source: https://habr.com/ru/post/1789408/More articles:Can I easily set the offsetWidth element? - javascriptUsing too much memory in C / NDK? - java"L" and "LPCWSTR" in the WIndows API - c ++Что такое эквивалент joda-времени для нескольких функций JDK TimeZone - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1789407/faking-a-git-repository-for-testing&usg=ALkJrhgdOXe9libCxaJxBQ9DPUWPm7S2cgC # General and special extension method Combination Ambiguity - genericsThe introduction of the extract in O (1) - algorithmincrement of non auto increment field during insertion based on selection in mysql - mysqljQuery Mobile - How to implement Google Maps on external links - jqueryIE6 and 7 absolute positioning error - htmlAll Articles