Few of the time, we need to alter some particular text in multiple files, and opening editing each file at a time is killer. Here is sweet simple command that uses "Power of `PERL`" to make our life easier.
Command :-
What basically above command does is, It will find word `facebook` in each "text/notepad" file under directory "/home/krokite" and will replace that with `worldofhacker`.
Subscribe us, for more awesome tricks and hacks :)
Command :-
Code:
perl -pi -w -e 's/facebook/worldofhacker/g;' /home/krokite/*.txt
What basically above command does is, It will find word `facebook` in each "text/notepad" file under directory "/home/krokite" and will replace that with `worldofhacker`.
Subscribe us, for more awesome tricks and hacks :)