“nano” It is for many users the easiesttext editor for Linux and / or The x. Although I have been using it for many years as an editor text for both Linux (via Console or SSH/Putty) as well as for OS X (via Terminal), the previous days I experienced for the first time order of “find and replace”. Specifically, to replace in a text file words / phrases identical in other words or phrases.
Find & Replace with nano in Linux and OS X
1. sudo nano /folder /name_fisier (to open the file we want to edit)
2. In nano editor, we press the keys Ctrl + \. At the bottom of the publisher, we will ask us to introduce the word or phrase to be replaced (Search (to replace):). ENTER, after incurring the text to be replaced.
3. We enter the new text that will replace the one inserted in point 2. (Replace with:). Enter.
4. We press the key “A” to replace all the phrases / words found.
4. Ctrl + X Then the key “Y” To save the changes and close Nano editor.
Nano Text Editor help and commands: nano -h