Linux

Linux


How to Find PHP.INI Path

9.05.2009 | 0 Comments

If you can’t find it in /etc/php.ini, then you have to use ssh and execute the command below.
php -i | grep php.ini

The command will return something like
Configuration File (php.ini) Path => /etc/php.ini


Change Ownership of File/Folder (chown)

8.18.2009 | 0 Comments

chown kwatog /usr/kwatog


Linux Search and Replace in File

8.11.2009 | 0 Comments

Here’s the syntax


sed 's/SEARCH_TEXT/REPLACE_TEXT/g' FILENAME > OUTFILE

SEARCH_TEXT is the text to search in filename
REPLACE TEXT is the string to be put in place of SEARCH_TEXT
FILENAME is the file to be searched
OUTFILE is the file where the output

Sample

sed 's/ORDER/VANTIVE_ORDER/g' kwatogtest.sql > kwatogsed.log

I keep on forgetting that syntax although it’s so simple. There might other ways of doing it but as of now, it’s the only way I know. :p