Skip navigation.
Home
Computer Information for the non-computer literate.....

Linux

Default Route on OpenWRT

When I create a new linux virtual system and use OpenWRT at home to route out to the internet, I need to add a default route so that I can get out to the Internet.  For some versions of linux, it doesn't do it automatically for me (or maybe it's the OpenWRT router and something I've misconfigured as it works for some systems, but not others?).   The command to do this is:

How to move your MySQL database directory

If you have a dedicated database server and the partition with the MySQL database fills up (or starts getting low), you can move your MySQL databases to a different location.

 

Let’s say you want to move the database to /home/mysql

 

Finding info in Files

Sometimes you want to be able to quickly search the contents of some files for a command or some other piece of text. The following command (for Cygwin obviously) will work:

for i in `find /cygdrive/c/Devel/SQL/ | grep sql `; do echo $i; grep cursor $i; done;

 

Second Network Address on same NIC

Sometimes you need to bind a second IP address to a Network Interface Card.  Maybe you need access to another network temporarily or you just need to fix something that comes with a default address not on your network.

From Linux, you can execute the following command:


ifconfig eth0:1 192.168.5.16 netmask 255.255.255.0 up

This will add a second IP Address to your eth0 network interface.

32-bit or 64-bit System

How do you tell if you're running on 32-bit or 64-bit hardware?

While the command uname -a will show wether you are using a 32-bit or 64-bit Operating System (as well as possibly looking at /etc/*release), it won't tell you if your hardware is actually 64-bit or not.

Syndicate content