Quickly Replace Text in Multiple Files with just One Command

Engineer, Developer, Information Security Researcher, Code Digging, Software Exploitation, Web App Penetration testing, and Reverse Engineering, Browser Tech, Scraping, Automation, Hacking
Search for a command to run...

Engineer, Developer, Information Security Researcher, Code Digging, Software Exploitation, Web App Penetration testing, and Reverse Engineering, Browser Tech, Scraping, Automation, Hacking
No comments yet. Be the first to comment.
1. Download the latest kernel from kernel.org Code: wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.19.tar.gz tar zxvf linux-2.4.19.tar.gz cd linux-2.4.19 2. Configure the kernel options This is where you select all the features yo...

No one among us knowingly Delete important files in their hard disk but some times it may happen accidentally........and then start :-( :sad: about it........now i am posting a way to prevent them from getting deleted accidentally. This can be done i...
If you’re lucky enough to find a command execution vulnerability during a penetration test, pretty soon afterward you’ll probably want an interactive shell. If it’s not possible to add a new account / SSH key / .rhosts file and just log in, your next...

Click on "Prev" or "Next" Button to Read A debugger or debugging tool is a computer program that is used to test and debug other programs (the "target" program). The code to be examined might alternatively be running on an instruction set simulator...

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