<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>When Brains Fly &#187; unix</title>
	<atom:link href="http://www.whenbrainsfly.com/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.whenbrainsfly.com</link>
	<description>An Awesome Blog About Neuroscience, Computer Science, and Technology</description>
	<lastBuildDate>Mon, 28 Jun 2010 01:03:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Some UNIX/Linux Command Line Shortcuts</title>
		<link>http://www.whenbrainsfly.com/2009/12/some-unixlinux-command-line-shortcuts/</link>
		<comments>http://www.whenbrainsfly.com/2009/12/some-unixlinux-command-line-shortcuts/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 05:33:35 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[shortcuts]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.whenbrainsfly.com/?p=170</guid>
		<description><![CDATA[I have to look this up so many times that I figured I should just blog about it and have it in one easy-to-find place. =)
Text/cursor control:


Alt-B / Alt-F
 Move the cursor backward/forward one word


Ctrl-W / Alt-D
Delete one word to the left/right


Ctrl-A / Ctrl-E
Move the cursor to the beginning/end of the line


Ctrl-U / Ctrl-K
Erase line [...]]]></description>
			<content:encoded><![CDATA[<p>I have to look this up so many times that I figured I should just blog about it and have it in one easy-to-find place. =)</p>
<p><strong>Text/cursor control:</strong></p>
<table>
<tr>
<td><code>Alt-B / Alt-F</code></td>
<td> Move the cursor backward/forward one word</td>
</tr>
<tr>
<td><code>Ctrl-W / Alt-D</code></td>
<td>Delete one word to the left/right</td>
</tr>
<tr>
<td><code>Ctrl-A / Ctrl-E</code></td>
<td>Move the cursor to the beginning/end of the line</td>
</tr>
<tr>
<td><code>Ctrl-U / Ctrl-K</code></td>
<td>Erase line to the left/right</td>
</tr>
</table>
<p><strong>History control:</strong></p>
<table>
<tr>
<td><code>!!</code></td>
<td>Repeat last command run</td>
</tr>
<tr>
<td><code>!-5</code></td>
<td>Re-run the 5th to last line in the history (<code>!-1</code> is equivalent to <code>!!</code>)</td>
</tr>
<tr>
<td><code>!<i>str</i></code></td>
<td>Re-run the last run command that began with <i>str</i></td>
</tr>
<tr>
<td><code>!<i>str</i>:<i>n</i></code></td>
<td>The <i>n</i>th argument for the last run command that began with <i>str</i></td>
</tr>
<tr>
<td><code>!$</code></td>
<td>The last argument for last run command</td>
</tr>
</table>
<p>(There are many more history control commands, but I don&#8217;t need to use them as frequently. See the last two references for them.)</p>
<p><strong>Other useful shortcuts:</strong></p>
<table>
<tr>
<td><code>Ctrl-S / Ctrl-Q</code></td>
<td>Turn off/on output to the screen (useful if you accidentally press <code>Ctrl-S</code> like I do all the time, or if you have a lot of output streaming to your screen)</td>
</tr>
<tr>
<td><code>Alt-F2</code></td>
<td>(GNOME/KDE) Display the Run Application dialog<br/></td>
</tr>
</table>
<p>Also, I learned something new today while fixing up the CSS for the site. Margins can overlap. =O</p>
<p>References:<br />
<a href="http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Command_line_shortcuts">http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Command_line_shortcuts</a><br />
<a href="http://www.computerhope.com/ushort.htm">http://www.computerhope.com/ushort.htm</a><br />
<a href="http://blog.macromates.com/2008/working-with-history-in-bash/">http://blog.macromates.com/2008/working-with-history-in-bash/</a><br />
<a href="http://www.gnu.org/software/bash/manual/bashref.html#History-Interaction">http://www.gnu.org/software/bash/manual/bashref.html#History-Interaction</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.whenbrainsfly.com/2009/12/some-unixlinux-command-line-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Theme Updated and Miscellaneous Code</title>
		<link>http://www.whenbrainsfly.com/2009/08/theme-updated/</link>
		<comments>http://www.whenbrainsfly.com/2009/08/theme-updated/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 05:34:33 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.whenbrainsfly.com/?p=131</guid>
		<description><![CDATA[I wasn&#8217;t really liking the Brain Power theme anymore, so I decided to make my own using the handy-dandy WordPress Theme Generator and then tweaked the details to my liking. It looks better now, in my opinion.
Hopefully these changes plus the smackdown on spam will encourage me to blog some more. (Comments will still be [...]]]></description>
			<content:encoded><![CDATA[<p>I wasn&#8217;t really liking the Brain Power theme anymore, so I decided to make my own using the handy-dandy <a href="http://www.yvoschaap.com/wpthemegen/">WordPress Theme Generator</a> and then tweaked the details to my liking. It looks better now, in my opinion.</p>
<p>Hopefully these changes plus the smackdown on spam will encourage me to blog some more. (Comments will still be moderated until I am sure spam is under control.)</p>
<p>Now for some miscellaneous things:</p>
<p>In the meantime, for my reference, I like to keep two aliases for my bash shell:</p>
<pre>
alias ll='ls -l'
alias ls='ls -aG' # for the BSD ls
alias ls='ls -a --color=auto' # for the GNU ls
</pre>
<p>I also like to change the default color for directories (blue) to cyan when in BSD (cyan foreground not otherwise used) so that I can see it better.</p>
<pre>
export LSCOLORS="gxfxcxdxbxegedabagacad"
</pre>
<p>In GNU ls, there is a different method and cyan is used for symbolic links, so rather than have two different colors for directories, which I see far more often than symbolic links, let&#8217;s change the directory color to blue and symbolic link color to yellow:</p>
<p>&#8212;-I&#8217;ll finish this up soon&#8212;-</p>
<p>For compiling a Java program using Cygwin and including the jxl.jar library (typical bin, lib, src setup):</p>
<pre>
#!/bin/bash
javac -cp `cygpath -wp lib/jxl.jar:.` -d bin $(find src -name '*.java')
</pre>
<p>For running a Java program using Cygwin and including the jxl.jar library (two parameters passed):</p>
<pre>
#!/bin/bash
java -cp `cygpath -wp lib/jxl.jar:src/:.` main.class.Name $1 $2
</pre>
<p>For running the above Java program on a Mac without the Mac top menu bar and with a specified dock name:</p>
<pre>
#!/bin/bash
java -cp lib/jxl.jar:src/:. -Dapple.laf.useScreenMenuBar=true
-Xdock:name="Program Name" main.class.Name $1 $2
</pre>
<p>Note to self: &lt;pre&gt; tags do not have word wrap. Consider using a special scrollable text field or plugin for displaying code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whenbrainsfly.com/2009/08/theme-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
