Wednesday, September 30, 2009

Linux Find Command find text in files

To find the text "JoomlArt" in all files in all subdirectories under the current dir, use this:

find . -type f -name "*" -exec grep -il JoomlArt {} \;

If you just wanted to search in php file for example, it would be this:

find . -type f -name "*.php" -exec grep -il JoomlArt {} \;

(grep is not needed in these examples)

Thursday, September 24, 2009

DirectAdmin forgot admin password?

If you forget the Direct Admin admin password, all you have to do is if you have ssh to the box as root type:

passwd admin

(then reset it you goof!)