Friday, October 12, 2012

Linux : search and replace string in a directory recursively

find /home/zana/folder -type f -exec sed -i 's/oldstring/newstring/g' {} \;


find . -type f -print0 | xargs -0 sed -i 's/Application/whatever/g'

Thursday, September 27, 2012

find and replace a file by another file recursively in all subdirectories

find . -type f -name "image.png" -printf "%h\n" | xargs -i cp /home/zana/DEVELOPMENT/LIB/DIR/Images/image.png "{}"'/'

Thursday, August 9, 2012

How to remove MySQL completely with config and library files on ubuntu 12.04



sudo apt-get remove mysql-server mysql-client mysql-common
sudo apt-get purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
shell>> locate mysql