Author Archive

Author Archive


TAR : Archiving and Extracting Files and Folders

9.09.2009 | 0 Comments

Here’s the common syntax I use in archiving and extracting files or folders.

tar -xvf foo.tar

verbosely extract foo.tar


tar -xzf foo.tar.gz

extract gzipped foo.tar.gz


tar -cjf foo.tar.bz2 bar/

create bzipped tar archive of the directory bar called foo.tar.bz2


tar -xjf foo.tar.bz2 -C bar/

extract bzipped foo.tar.bz2 after changing directory to bar


tar -xzf foo.tar.gz blah.txt

extract the file blah.txt from foo.tar.gz


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


Rename Table in Oracle

9.02.2009 | 0 Comments

SYNTAX

alter table
table_name
rename to
new_table_name;

Example

alter table
employee
rename to
employee_bak;


FileZilla 421 Too many connections (2) from this IP

8.19.2009 | 2 Comments

If you encountered this error, you are not alone. I’ve encountering this on my VPS too often that I decided to use FireFTP for a while until I found out that it’s a settings issue.

Here’s what you need to do to solve this.

  1. Go to Site Manager of FileZilla
  2. Select the FTP connection where you are having problem
  3. Click on Transfer Settings tab
  4. Check Limit Number of Simultaneous Connections
  5. Set Maximum Number of Connections to 1
  6. Save and connect to your server

Read more…


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