<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Keith's Web Blog RSS Feed</title>
<language>en-us</language>
<link>http://www.keithwatanabe.net/index.php</link>
<description>Keith Watanabe's Website</description>
<item>
<title>Monjabake Problems</title>
<link>http://www.keithwatanabe.net/blogs/2004/3/13/91540508929191c8a466dc1bad8804c7.html</link>
<description><![CDATA[Often when you look at a binary file, you get some weird characters.  If you examine in with something like cat or more, your prompt often goes heywire.  To get it back to normal, just type:

reset

and things will be clear!]]></description>
<pubDate>Sat, 13 Mar 2004 02:34:43 -0700</pubDate>
<guid>http://www.keithwatanabe.net/blogs/2004/3/13/91540508929191c8a466dc1bad8804c7.html</guid>
</item>
<item>
<title>Easy Rsync Over SSH</title>
<link>http://www.keithwatanabe.net/blogs/2004/5/11/811ae67b903b10dab03b0f19bf3dbb37.html</link>
<description><![CDATA[I've always had problems remembering the commands to do an rsync over ssh.  Here's the quickie:

rsync -a -e "ssh -i $SSHKEY" $FILE $DEST

$SSHKEY: the pay to your private sshkey
$FILE: the files you want to send
$DEST: your destination.

example:

rsync -a -e "/usr/bin/ssh -i $HOME/.ssh/id_dsa" /home/mydir/datafile.txt me@remoteserver:.

This will copy the file datafile.txt to your remote server.  Make sure you have the sshkey generated (will put up another FAQ for that).]]></description>
<pubDate>Tue, 11 May 2004 21:26:22 -0600</pubDate>
<guid>http://www.keithwatanabe.net/blogs/2004/5/11/811ae67b903b10dab03b0f19bf3dbb37.html</guid>
</item>
<item>
<title>Tar/Gziping in a single line</title>
<link>http://www.keithwatanabe.net/blogs/2004/5/11/96fed81b37a3469d135dcbdc3c516f4d.html</link>
<description><![CDATA[tar -cvf - $DIR | gzip -c > $compressedfile.tar.gz

if you're doing this from a script rather than command line, you have to note that you'll need to change directories into parent directory of the directory you want to tar up.  For instance:

cd /home/mydir; /usr/bin/tar -cvf - important_dir | gzip -c > important_dir.tar.gz

In this case, you can put something like this into crontab if you need to do a nightly backup.]]></description>
<pubDate>Tue, 11 May 2004 21:30:50 -0600</pubDate>
<guid>http://www.keithwatanabe.net/blogs/2004/5/11/96fed81b37a3469d135dcbdc3c516f4d.html</guid>
</item>
<item>
<title>useful simple kill</title>
<link>http://www.keithwatanabe.net/blogs/2005/6/27/7d6f1e9f41cd0ac663b898b8ac6dfe4a.html</link>
<description><![CDATA[ps wuax | grep item | grep -v grep | awk '{print $2}']]></description>
<pubDate>Mon, 27 Jun 2005 15:33:54 -0600</pubDate>
<guid>http://www.keithwatanabe.net/blogs/2005/6/27/7d6f1e9f41cd0ac663b898b8ac6dfe4a.html</guid>
</item>
<item>
<title>CD-Recording with cdrecord</title>
<link>http://www.keithwatanabe.net/blogs/2005/9/13/3a62cbf01d43c842dd635d1c297c42fa.html</link>
<description><![CDATA[1) mkdir <insert directory name>
2) copy files <directory name>
3) mkisofs -r -o cd_image <directory name> 
where: cd_image is the name of the file you want to create for burning as a data file.
4) cdrecord -scanbus (shows your device driver for your cd recorder)
5) note the node (e.g. 0,0,0)
6) cdrecord -v speed=16 dev=0,0,0 -data cd_image (creates the cd from the cd_image you generated)
7) note: use -overburn in case you are a little over the warning amount.]]></description>
<pubDate>Tue, 13 Sep 2005 23:40:23 -0600</pubDate>
<guid>http://www.keithwatanabe.net/blogs/2005/9/13/3a62cbf01d43c842dd635d1c297c42fa.html</guid>
</item>
<item>
<title>fuser and (u)mount</title>
<link>http://www.keithwatanabe.net/blogs/2005/12/6/557f70ea8de17899feb9cc19cd235995.html</link>
<description><![CDATA[had a nasty issue today with my system.  seems like fedora core 4/xine has been choking on the DVD player.  really bites.  so the thing is that i was trying to get my dvd player to mount (automount is fucked up) and ended up using a forced mount.  that, for some reason, only made the situation worse and froze the command! and this was root!  i couldn't kill it either.  obviously, the only thing to do was reboot.  however, since my home directory is mounted, i'm pretty cautious about just rebooting it.  umount wouldn't work though because some processes were accessing the mount and i kept getting "device is busy" messages.  so unless i shut it down the hardway, i could've had issues with my external drive.

what to do?

fuser and umount -l to the rescue!

fuser can show which users access a particular device or filesystem.  you can do a fuser -v <DIRECTORY> to get a listing of users.  but the handy dandy piece is fuser -k.  that'll send a SIGKILL signal to those processes.

unfortunately, that still didn't resolve my issue.  those processes (namely automount and xine) still persisted.  so the next thing to try was umount -l on the external drive.  that's a lazy umount that somehow allows you to unmount a device and let the processes, etc. accessing that device get cleaned up later.  so in the end, that saved my ass.

on the side, xine has really pissed me off.  on core 1, it worked beautifully.  somehow the upgrades caused some issues that cause problems with the process.  i suggest not using xine for playing dvds.  other formats don't show this issue though.]]></description>
<pubDate>Tue, 06 Dec 2005 01:40:25 -0700</pubDate>
<guid>http://www.keithwatanabe.net/blogs/2005/12/6/557f70ea8de17899feb9cc19cd235995.html</guid>
</item>
<item>
<title>Subversion and Patch</title>
<link>http://www.keithwatanabe.net/blogs/2008/1/28/cfe181ec2bae0e8094aebc7d208f3e93.html</link>
<description><![CDATA[The next point of advancement in my skill elevation has been learning the <strong>patch</strong> utility.  Actually, I got to work with a combination of the unix utilities <strong>diff</strong> and <strong>patch</strong>.  I've found various <a href="http://www.linuxtutorialblog.com/post/introduction-using-diff-and-patch-tutorial">good tutorials</a> on the subject to get me started.  Right now, I'm doing some simple patch creation.  In the easiest form, you can create a patch from two files using diff like this:<br />
<br />
<strong>diff</strong> -c <em>original_file</em> <em>new_file</em> &gt; <em>patch.diff</em><br />
<br />
Apparently, the &quot;-c&quot; options allows for some context based mode that will allow the patch program to have an easier time patching your code.  Also, the order of running the diff is critical.  If you do this in the wrong order, patch will just give you a warning message and create a kind of backup file with the .orig extension.<br />
<br />
Using the patch file, you would do something like this:<br />
<br />
<strong>patch</strong> <em>original_file</em> -i <em>patch.diff</em><br />
<br />
The &quot;-i&quot; option tells patch the input file (i.e. the patch file).<br />
<br />
You can also diff directories in creating a patch.  I didn't succeed very well at that, but I'll put up my results once I become an expert in that area.<br />
<br />
With <strong>Subversion</strong>, you can perform even more powerful patches by using Subversion's diff utility and comparing the repository items against a file or even directories.  I had some issues getting this to work, but I think my biggest issue was the ordering of the diff.  I kept getting the .orig extensions, signifying that patch did not work as expected.  Well, I'll try again another day as I really want to become an expert at these subject matters.<br />
<br />
On a side note, it's a real bitch mastering so many different technologies.  You learn one tool, then you find out that you have to learn around 10 more related ones.  On a positive note, I'm getting to the point where I feel very comfortable with a large number of tools.  These are just another feather in my cap.]]></description>
<pubDate>Mon, 28 Jan 2008 06:55:36 -0700</pubDate>
<guid>http://www.keithwatanabe.net/blogs/2008/1/28/cfe181ec2bae0e8094aebc7d208f3e93.html</guid>
</item>
</channel>
</rss>
