August 17, 2006

Shell Script Repository

[ z a z z y b o b . c o m ] /bin, This site is a home to all things Unix/Linux, with a particular lean towards System Administration, and scripting using bash, ksh, awk, sed, etc.

A large # of cool scripts including, "rmblanks.sed" a quick 'n' dirty sed script to remove blank lines.

Posted by mark at 06:21 PM | Comments (0) | TrackBack

August 04, 2006

Poor Person's Image Mapper

Poor Person's Image Mapper is handy when you need to make an image map, but don't have any software available to give you the coordinates. Enter in a URL for an image, and then you can click on it and it will tell you the location of your mouse clicks. You can then enter those manually into an image map:

<img src="images/logo_map.gif" alt="Lots of logos" border="0" usemap="#Map"/>

<map name="Map" id="Map">
<area shape="rect" coords="0,0,167,46" href="http://mark.cervarich.com" alt="TechnoMusings" />
</map>

So you'd get the pairs "0,0" and "167,46" from the image mapper.
Posted by mark at 06:55 PM | Comments (0) | TrackBack

August 02, 2006

Mysql binary log maintenance

I've been noticing that my /usr partition has been slowly getting more and more full. I finally figured out why. I had enabled MySQL to create binary logs, and the log file was growing quite large:
[root@ns data]# ls -sh *bin*
4.0K ns-bin.001  920K ns-bin.004   12M ns-bin.007
4.0K ns-bin.002  4.0K ns-bin.005   69M ns-bin.008
644K ns-bin.003  4.0K ns-bin.006  4.0K ns-bin.index
[root@ns data]# mysqladmin flush-logs
[root@ns data]# ls -sh *bin*
4.0K ns-bin.001  920K ns-bin.004   12M ns-bin.007  4.0K ns-bin.index
4.0K ns-bin.002  4.0K ns-bin.005   69M ns-bin.008
644K ns-bin.003  4.0K ns-bin.006  4.0K ns-bin.009
As you can see, right now, the current logfile is ns-bin.008 and has a size of 69MB! After running mysqladmin flush-logs, there is now a new 4.0kb ns-bin.009 file....and the ns-bin.008 file is still there...but I can cancel it and free up 69MB of space.
Posted by mark at 01:59 PM | Comments (0) | TrackBack