Linux
Finding the UUID for Linux Drives
Submitted by TimBruce on Tue, 2010-06-22 21:26The Universally Unique Identifier (UUID) is a good way to mount drives under Linux with SATA drives (or any drives, PATA or IDE). This ensures that when you have more than one harddrive, it always gets mounted to the same location specified in /etc/fstab. The reason is that SATA drives are mounted when they're found and on one reboot can come up as »
Copying files - preserving attributes
Submitted by TimBruce on Wed, 2010-01-27 13:00One way to do this is:
Supposedly, the following will work to copy a file (or group of files) from a directory and preserve the attributes (ownership and permissions).
Thecommand is a copy command designed to copy files into and out of a cpio or tar archive,
automatically preserving permissions, times, and ownership of files and
subdirectories.
Default Route on OpenWRT
Submitted by TimBruce on Wed, 2010-01-27 12:59When 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
Submitted by TimBruce on Tue, 2009-10-06 16:25If 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
Submitted by TimBruce on Wed, 2009-07-08 12:42Sometimes 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;
