S
S
Sergey Goryachev2016-07-31 22:10:48
linux
Sergey Goryachev, 2016-07-31 22:10:48

How to replace one link with another in a huge pile of files?

I have several folders, they have a huge pile of folders.
Among all files (within files) you need to change one link to another.
What are the best tools to use?
Tried through the Atom editor, there is a mass replacement.
But the problem is that it changes the encoding.
The files are originally windows-1251 and it breaks everything.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Goryachev, 2016-07-31
@webirus

I asked myself - I found it myself.
https://habrahabr.ru/post/55121/

find -type f -name '*.txt' -print0 | xargs --null perl -pi -e 's/Windows/Linux/'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question