S
S
Sergey2019-09-30 20:15:54
Command line
Sergey, 2019-09-30 20:15:54

How to edit many files?

Tell me, I have 30 thousand files. For example, they have the same tag everywhere, for example New, I want to change it to Changed everywhere, Sometimes in one file you need to make such 5-10 changes.
How can this be implemented at all? Through the command line or is there a program in which you can do this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Kuts, 2019-09-30
@fox_12

find ./<путь> -type f  -exec sed -i s'/<подстрока>/<замена>/g' {} \;

D
Dmitry, 2019-09-30
@Tabletko

man sed

A
Arthur, 2019-09-30
@ar2rsoft

The same notepad ++ can search and replace in several files, including by file mask and with support for regular

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question