There are many times when I needed to find out my outgoing (or external) IP for the servers which are behind load balancers or firewalls. I used to just login to another external server from the server in question and find out by looking at “who” what my external ip is. Even though it works [...]
Read the full article...
After I wrote the post: How do I dump all tables in a database into separate files? I got emails from couple people asking how to import the individual table files back in to MySQL. First way to import each sql file created by the post is to import each file individually by [...]
Read the full article...
Installing mcache, previously known as msession, on CentOS 32 bit system.
If you are on 64 bit system, you will get errors, lots of them. I went through and fixed “some” errors by modifying code but it was just taking too much time so I decided not to go 64 bit route. But below are the [...]
Read the full article...
Let us say that you want to rename all of your “.php3″ files to “.php” files. How you do this with minimal effort? Answer lies in for loop.
for old in *.php3; do cp $old `basename $old .php3`.php; done
Thats all there is to it. Let us say you need to rename index.php3 [...]
Read the full article...
You type: rm * -f
You get: /bin/rm: Argument list too long
Reason: in shell when you do * after rm and get Argument list too long, your shell actually expands that * and puts all the filenames after rm and since length of the command line is limited, you end up getting [...]
Read the full article...