While it’s easily cleared by a malicious person, this can easily extend the usefulness of your history file with the information of when you ran that command.
This works in bash v3 and up.
If you’d like to add the timestamping to all users on the machine, the file you’d want to edit is probably /etc/profile. If [...]
Posted on September 4th, 2008 by Phil Dufault
Filed under: Linux, Shell | No Comments »
I wanted to mention that I’ve been looking for something like for this a bit — a USB key that comes with a way to install multiple Linux distributions. While at work, we primarily use Gentoo, we still have a Ubuntu server or CentOS install to do occasionally, and it would be nice to have [...]
Posted on August 7th, 2008 by Phil Dufault
Filed under: CentOS, Linux, Ubuntu | No Comments »
I wrote a BASH script that will run “optimize table” on any table fragmented. it’s pretty tidy, and you can supply usernames and passwords, and even run it against remote MySQL databases.
Here’s an example of it’s output:
root@lit [~]# mysqlFragFinder
MySQL fragmentation finder (and fixer) v0.7.2, written by Phil Dufault ( http://www.dufault.info/ )
Found 59 databases
Checking someforum_forum … [...]
Posted on August 7th, 2008 by Phil Dufault
Filed under: Linux, MySQL | 1 Comment »
I’ve been using this for the past two weeks:
MySQL Tuner
I’ve used on servers running on MySQL 4.0, or 5.1 lately to tweak their preformances. Itt’s an awesome script, and I recommend using it on any MySQL server you can find.
Posted on August 7th, 2008 by Phil Dufault
Filed under: Linux | No Comments »
I recently learned of a newish OpenSSH feature, a feature that let’s you reuse existing SSH connections.
If you want to enable this functionality on a per-host basis, then you can setup your ~/.ssh/config file like this:
Host *
ControlMaster no
ControlPath ~/.ssh/master-%l-%h-%p-%r.sock
Host someserver
Compression yes
ControlMaster yes
To enable it:
ssh -f -N someserver
After that, just ssh in like you would normally:
ssh [...]
Posted on August 5th, 2008 by Phil Dufault
Filed under: Linux | 4 Comments »
There seems to be not a lot of information on Google about this, thus, I post.
At my work, the majority of our servers have hot-swappable drive bays — however, Linux doesn’t usually automatically notice the drive is gone. Worse, sometimes it doesn’t even notice new drives hooked up.
Now, SCSI and SAS both support hot-plugging [...]
Posted on August 4th, 2008 by Phil Dufault
Filed under: CentOS, Gentoo, Linux, Redhat, Ubuntu | 9 Comments »
It came up in IRC today that there was a typing game called typespeed — one of the categories is “Unix Commands.” Better yet, this supports head to head networking mode, so you can play against people in your office, I didn’t even need to edit my firewall configuration on Ubuntu.
Playing your coworkers is good [...]
Posted on July 31st, 2008 by Phil Dufault
Filed under: Linux, Ubuntu | No Comments »
To install libtidy in PHP5, it’s really quite easy.
Make sure your /tmp directory doesn’t have something like noexec set on it, otherwise this would be more difficult.
Here’s the install command:
pecl install http://pecl.php.net/get/tidy-1.2.tgz
Find where your main php.ini file is:
root@server [~]# php -i|grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
Add the module to your [...]
Posted on July 26th, 2008 by Phil Dufault
Filed under: CentOS, Linux, PHP, Redhat | 3 Comments »
This in from Martin’s page:
Update(24/7/08): I’ve repackaged the files in android.zip and updated a few things. Now you don’t need to copy 256M to your SD card, just put system.gz and data.gz on the card and the first time it boots they will be extracted to system.img and data.img (thanks to Kevin’s initramfs installer for [...]
Posted on July 25th, 2008 by Phil Dufault
Filed under: Android, Google, HTC Vogue, Linux | 2 Comments »
I find it shocking how many people don’t know about this neat Linux key combination that let’s you execute various low level commands regardless of the system’s state (as long as it’s running and hasn’t panicked.)
From the Wikipedia page:
It is often used to recover from freezes, or to reboot a computer without corrupting the filesystem.
How [...]
Posted on July 19th, 2008 by Phil Dufault
Filed under: CentOS, Gentoo, Linux, Redhat, Ubuntu | 1 Comment »