<?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>Vantage Point of Queens &#187; Computer</title>
	<atom:link href="http://blog.nydd.org/topic/study-note/computer/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nydd.org</link>
	<description>Art, Hack and Rock'n Roll</description>
	<lastBuildDate>Wed, 16 Jun 2010 13:59:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>090823: learn</title>
		<link>http://blog.nydd.org/2009/08/090823-learn/</link>
		<comments>http://blog.nydd.org/2009/08/090823-learn/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 03:39:16 +0000</pubDate>
		<dc:creator>beatak</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[japanese]]></category>

		<guid isPermaLink="false">http://blog.nydd.org/?p=266</guid>
		<description><![CDATA[				diretory の比較 on Unix
				Wordpress をアップデート。いつも忘れてしまう diretory の比較。普段は Changes.app などという Mac OS X の GUI アプリを使ってしまって、いっこうに覚えなかった…
				How To Compare Directories in Unix
				$ diff --recursive --brief /tmp/dir1 /tmp/dir2
Files /tmp/dir1/dir11/file12 and /tmp/dir2/dir11/file12 differ
Files /tmp/dir1/file1 and /tmp/dir2/file1 differ
Only in /tmp/dir1: file2
Only in /tmp/dir2: file3
				これを応用すると、例えば dir1 にだけ存在するファイルは
				$ diff --recursive --brief /tmp/dir1 /tmp/dir2 &#124; grep '^Only \/tmp\/dir1'
とすればよいですね。
emacs で major mode を変える
例えば .html [...]]]></description>
			<content:encoded><![CDATA[				<h4>diretory の比較 on Unix</h4>
				<p>Wordpress をアップデート。いつも忘れてしまう diretory の比較。普段は <a href="http://connectedflow.com/changes/">Changes.app</a> などという Mac OS X の GUI アプリを使ってしまって、いっこうに覚えなかった…</p>
				<p><a href="http://www.unixtutorial.org/2008/06/how-to-compare-directories-in-unix/">How To Compare Directories in Unix</a></p>
				<pre><code class="prettyprint">$ diff --recursive --brief /tmp/dir1 /tmp/dir2
Files /tmp/dir1/dir11/file12 and /tmp/dir2/dir11/file12 differ
Files /tmp/dir1/file1 and /tmp/dir2/file1 differ
Only in /tmp/dir1: file2
Only in /tmp/dir2: file3</code></pre>
				<p>これを応用すると、例えば dir1 にだけ存在するファイルは</p>
				<pre><code class="prettyprint">$ diff --recursive --brief /tmp/dir1 /tmp/dir2 | grep '^Only \/tmp\/dir1'</code></pre>
<p>とすればよいですね。</p>
<h4>emacs で major mode を変える</h4>
<p>例えば .html なファイルを emacs で開くとほぼおそらく HTML mode で開かれると思います。でも実は内部の JavaScript を編集したいし、js2-mode (JavaScript-IDE) で編集したい。凄い基本ですがしばらく emacs を触ってないで忘れてしまっていました。</p>
<pre><code class="prettyprint">M-x js2-mode</code></pre>
				<p>でした。</p>
				<hr />
				<p>またこれから emacs 勉強記録をつけていきたいと思います。今日はどうやってコピーするのか忘れてましたが (M-w Copy / C-w Cut / C-y Paste) それさえわかれば、それなりに使えrて結構びっくりした。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nydd.org/2009/08/090823-learn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
