<?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>サイキョウライン &#187; Linux</title>
	<atom:link href="http://saikyoline.jp/weblog/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://saikyoline.jp/weblog</link>
	<description>コンピュータに関係あることとか、ないこととか。</description>
	<lastBuildDate>Fri, 04 May 2012 15:44:45 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ログイン時にtmuxを開く。</title>
		<link>http://saikyoline.jp/weblog/2010/09/28/224527.html</link>
		<comments>http://saikyoline.jp/weblog/2010/09/28/224527.html#comments</comments>
		<pubDate>Tue, 28 Sep 2010 13:45:27 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=1038</guid>
		<description><![CDATA[すでにセッションがあればアタッチ用のコマンドを表示し、なければ新規にセッションを立ち上げるスクリプトを書いて使ってるのですが、わりと便利なので張っておきます。ちなみに自分はこれを.zprofileに書いてます。 [ref [...]]]></description>
			<content:encoded><![CDATA[<p>すでにセッションがあればアタッチ用のコマンドを表示し、なければ新規にセッションを立ち上げるスクリプトを書いて使ってるのですが、わりと便利なので張っておきます。ちなみに自分はこれを.zprofileに書いてます。</p>
<p><script src="http://gist.github.com/600991.js?file=start_tmux"></script></p>
<p>[ref.] <a href="http://saikyoline.jp/weblog/2010/04/12/011442.html">autotest-tmuxできてました。</a></p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2010/09/28/224527.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debianでiptablesファイルを置く場所について。</title>
		<link>http://saikyoline.jp/weblog/2009/03/07/041852.html</link>
		<comments>http://saikyoline.jp/weblog/2009/03/07/041852.html#comments</comments>
		<pubDate>Fri, 06 Mar 2009 19:18:52 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=661</guid>
		<description><![CDATA[ひさしぶりにDebianでiptablesをいじる機会があって、「/etc/init.d/iptables」があるものだと思っていたらなかったという話。 woodyまではあったそれがsargeからは「/usr/share [...]]]></description>
			<content:encoded><![CDATA[<p>ひさしぶりにDebianでiptablesをいじる機会があって、「/etc/init.d/iptables」があるものだと思っていたらなかったという話。</p>
<p>woodyまではあったそれがsargeからは「/usr/share/doc/iptables/examples/oldinitdscript.gz」として外されてて、lennyではそれすらもなくなってる、という経緯らしい。<br />
理由は、「/etc/init.d」にあると順番によってはiptablesのルールが有効になる前に他のサービスが上がってしまって、一次的に無防備になるのを防ぐためだとか。（だったらその旨を書いてどこかに置いておいてくれたらいいのに・・・。）<br />
で、どうするかというと、</p>
<ol>
<li>「/etc/network/interfaces」で対象NICの「pre-up」と「post-down」にそれぞれルールの追加、削除を書く。</li>
<li>「/etc/network/if-pre-up.d」と「/etc/network/if-post-down.d」にそれぞれルールの追加、削除スクリプトを書いて置く。</li>
</ol>
<p>のいずれかがいまのスタイルらしいです。短いときはNICのファイルに、長いときには単独のファイルで、と。<br />
ただ、単独のファイルで置いた場合はNICの数ぶんだけスクリプトが走るので、ルールが重複して登録されることがあります。<br />
対策は、</p>
<pre class="code"><code>#!/bin/sh

if [ &quot;$IFACE&quot; = &quot;eth0&quot; ]; then
  iptables -A INPUT -i eth0 なんとか
  iptables -A INPUT -i eth0 かんとか
fi</code></pre>
<p>ってな感じで$IFACEで判断してやればよし。</p>
<p>これ、Debian徹底入門のP603にしっかり書いてありました。</p>
<table style="border: 1px dotted #999999; font-size: 14px; margin: 5px; text-align: left;">
<tr>
<td><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4798102865/saikyoline-22"><img src="http://ecx.images-amazon.com/images/I/51WK5BFV7EL._SL160_.jpg" width="124" height="160" alt="Debian GNU/Linux徹底入門第3版 Sarge対応" title="Debian GNU/Linux徹底入門第3版 Sarge対応" style="border: 0px; margin: 5px 10px 5px 5px;"/></a></td>
<td><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4798102865/saikyoline-22" style="text-decoration: none;"><span style="font-weight: bold;">Debian GNU/Linux徹底入門第3版 Sarge対応</span><br/><span>翔泳社(2005-08-04)</span><br/><span>翔泳社</span><br/><span>新品価格：￥ 4,968</span><br/><span>中古価格：￥ 2,069</span><br/><span>ASIN：4798102865</span></a></td>
</tr>
</table>
<p>（本を持っていることをすっかり忘れてて<a href="http://komagata.org/">komagata</a>さんに相談し、本で見たっていう話を聞いて思い出したという経緯が・・・。本を持ってるだけじゃダメです、という典型的な例でございました。）</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2009/03/07/041852.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>coLinuxでlennyを。</title>
		<link>http://saikyoline.jp/weblog/2009/02/20/023628.html</link>
		<comments>http://saikyoline.jp/weblog/2009/02/20/023628.html#comments</comments>
		<pubDate>Thu, 19 Feb 2009 17:36:28 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=640</guid>
		<description><![CDATA[Debian &#8212; Debian 「lenny」 リリース情報 Debian GNU/Linux 5.0.0 は 2009 年 2 月 14 日 にリリースされました。このリリースは プレスリリース や リリー [...]]]></description>
			<content:encoded><![CDATA[<blockquote cite="http://www.debian.org/releases/stable/index.ja.html" title="Debian -- Debian 「lenny」 リリース情報"><p><a href="http://www.debian.org/releases/stable/index.ja.html">Debian &#8212; Debian 「lenny」 リリース情報</a></p>
<p>Debian GNU/Linux 5.0.0 は 2009 年 2 月 14 日 にリリースされました。このリリースは プレスリリース や リリースノート に挙げたような多くの 大規模な変更を含んでいます。</p></blockquote>
<p>lennyがstableになったということで、coLinuxイメージを作ってみたのでメモを更新しました。<br />
あまり、というかほとんど需要はない気がしますが・・・。</p>
<p>[ref.] <a href="http://saikyoline.jp/wiki/index.php?cmd=read&#038;page=%A5%E1%A5%E2%2FcoLinux%CD%D1RootFS%A5%A4%A5%E1%A1%BC%A5%B8%A4%F2Debian%A4%CEISO%A5%A4%A5%E1%A1%BC%A5%B8%A4%AB%A4%E9%BA%EE%C0%AE">メモ/coLinux用RootFSイメージをDebianのISOイメージから作成</a></p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2009/02/20/023628.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>シェルのリダイレクト。</title>
		<link>http://saikyoline.jp/weblog/2007/12/22/012617.html</link>
		<comments>http://saikyoline.jp/weblog/2007/12/22/012617.html#comments</comments>
		<pubDate>Fri, 21 Dec 2007 16:26:17 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=487</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<blockquote cite="http://d.hatena.ne.jp/m-hiyama/20071221/1198221671" title="シェルのリダイレクトを「こわいものなし」というくらい完全に理解しよう - 檜山正幸のキマイラ飼育記"><p><a href="http://d.hatena.ne.jp/m-hiyama/20071221/1198221671">シェルのリダイレクトを「こわいものなし」というくらい完全に理解しよう &#8211; 檜山正幸のキマイラ飼育記</a></p>
<p>パイプ記号「|」や逐次実行の記号「;」を含んだ長いコマンドラインも、１つのコマンドとその引数、それとリダイレクト指定からなる“成分”に分解できます。こういった成分をなんと呼ぶか僕は知らないので、仮に「コマンド実行単位」とでも呼びましょう。</p></blockquote>
<p>いままではほぼ丸暗記状態で、ちょっと複雑になると分からなくなっていたのだけれど、この説明でバチッときた。<br/><br />
そうか、自分はバラし方を知らなかったんだ。<br/><br />
わかりやすい説明、ありがとうございましたっっ。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2007/12/22/012617.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>screenを使う。</title>
		<link>http://saikyoline.jp/weblog/2007/07/02/000734.html</link>
		<comments>http://saikyoline.jp/weblog/2007/07/02/000734.html#comments</comments>
		<pubDate>Sun, 01 Jul 2007 15:07:34 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=420</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Ctrl-aだとなんか使いにくいscreenのメタキーをどうするか悩む。<br/><br />
とりあえずCtrl-zにしてみた。いいかんじ。<br/><br />
あと、screen -Rを.zprofileの最後に追加。必要なときになって起動してないことを思い出すもんで、ね。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2007/07/02/000734.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LinuxWorldが。</title>
		<link>http://saikyoline.jp/weblog/2007/06/17/010820.html</link>
		<comments>http://saikyoline.jp/weblog/2007/06/17/010820.html#comments</comments>
		<pubDate>Sat, 16 Jun 2007 16:08:20 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=415</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>いつの間にか休刊してたのか。<br/><br />
数年前これを頼りにLinuxをさわり始めたので、感慨深い。</p>
<table style="border: 1px dotted #999999; font-size: 14px; margin: 5px; text-align: left;">
<tr>
<td><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4872802713/saikyoline-22/ref=nosim"><img src="http://saikyoline.jp/images/saikyoline_60.gif" width="60" height="60" alt="This has no image." title="This has no image." style="border: 0px; margin: 5px 10px 5px 5px;"/></a></td>
<td><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4872802713/saikyoline-22/ref=nosim" style="text-decoration: none;"><span style="font-weight: bold;">LinuxWorld メモリアルDVDブック [2001-2007]</span><br/><span>アイ・ディ・ジー・ジャパン(2007-06-22)</span><br/><span>アイ・ディ・ジー・ジャパン</span><br/><span>新品価格：￥ 2,310</span><br/><span>ASIN：4872802713</span></a></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2007/06/17/010820.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nohupしなかったプロセスをあとから。</title>
		<link>http://saikyoline.jp/weblog/2007/05/16/123737.html</link>
		<comments>http://saikyoline.jp/weblog/2007/05/16/123737.html#comments</comments>
		<pubDate>Wed, 16 May 2007 03:37:37 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=407</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>[via] <a href="http://blog.livedoor.jp/nipotan/archives/50636064.html">一度 tty から起動したプロセス (csh/ksh 版)</a></p>
<blockquote cite="http://subtech.g.hatena.ne.jp/secondlife/20070218/1171806399" title="subtech - Pink Blossom Diary StrikerS - 一度 tty から起動したプロセス"><p><a href="http://subtech.g.hatena.ne.jp/secondlife/20070218/1171806399">subtech &#8211; Pink Blossom Diary StrikerS &#8211; 一度 tty から起動したプロセス</a></p>
<p>をバックグラウンドで動かしてシェルから抜けた後も動かし続けるにはどうしたらいいんだろ。時間がかかる処理を screen を起動させずフォアグラウンドで実行しちゃって ssh 切れてイヤン、ということが時々ある。<br/><br />
<br/><br />
一度 C-z で suspend させてから切り離しさせることってできるのかしら。あと標準入出力の差し替えってできるのかしら。<br/><br />
追記<br/><br />
<br/><br />
typoさん情報(thx!)に disown (bash/zsh 組み込み)でいけることを教えてもらった！あとは標準出力/エラー出力をどうにかできれば…。</p></blockquote>
<p>disown知らなかった。いままでこういう状況になったときにはPC立ち上げっぱなしで帰ってました。<br/><br />
得てしてこれが必要になるときって終電に乗るかどうか気にしてる。<br/><br />
<br/><br />
あと、</p>
<blockquote cite="http://blog.livedoor.jp/nipotan/archives/50636064.html" title="一度 tty から起動したプロセス (csh/ksh 版) - にぽたん研究所"><p><a href="http://blog.livedoor.jp/nipotan/archives/50636064.html">一度 tty から起動したプロセス (csh/ksh 版) &#8211; にぽたん研究所</a></p>
<p>元記事の人はbgした後シェルを抜ける状況をいっているんだとおもわれ。(t)csh なら bg で exit すればそのまま走りますけど、zsh だと<br/><br />
<br/><br />
rock% perl -e &#8217;1 while 1&#8242;<br/><br />
^Z<br/><br />
zsh: suspended perl -e &#8217;1 while 1&#8242;<br/><br />
rock% bg<br/><br />
[1] + continued perl -e &#8217;1 while 1&#8242;<br/><br />
rock% exit<br/><br />
zsh: you have running jobs.<br/><br />
rock% exit<br/><br />
zsh: warning: 1 jobs SIGHUPed<br/><br />
<br/><br />
で殺されちゃうので。</p></blockquote>
<p>(t)cshならbgのプロセスは殺されないんだ。<br/><br />
<br/><br />
こういうことって小さいようだけど、知ってると知らないの差は大きい。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2007/05/16/123737.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>「coLinuxでetch」を更新。</title>
		<link>http://saikyoline.jp/weblog/2007/04/23/001554.html</link>
		<comments>http://saikyoline.jp/weblog/2007/04/23/001554.html#comments</comments>
		<pubDate>Sun, 22 Apr 2007 15:15:54 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=401</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>etchがリリースされたってことで、<br/><br />
<br/><br />
<a href="http://saikyoline.jp/wiki/index.php?%A5%E1%A5%E2%2FcoLinux%CD%D1RootFS%A5%A4%A5%E1%A1%BC%A5%B8%A4%F2Debian%A4%CEISO%A5%A4%A5%E1%A1%BC%A5%B8%A4%AB%A4%E9%BA%EE%C0%AE">メモ/coLinux用RootFSイメージをDebianのISOイメージから作成</a><br/><br />
<br/><br />
を更新しました。</p>
<blockquote><p>Last-modified: 2006-03-25 (土) 00:44:38 (392d)</p></blockquote>
<p>だったのでほぼ一年ぶり。すべて実際にやり直しながら更新したのでつまずくことはないはず。（はず。）<br/><br />
ちなみにすべてThinkPad X31 2672-PHJで作業してます。<br/><br />
<br/><br />
インストール/アンインストールを繰り返して「ローカル エリア接続 n」のnが増えまくってしまった人へのヒント：<br/><br />
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Network\{foo}\{bar}\Connection</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2007/04/23/001554.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>shで標準出力とエラー出力をまとめる。</title>
		<link>http://saikyoline.jp/weblog/2007/02/09/125259.html</link>
		<comments>http://saikyoline.jp/weblog/2007/02/09/125259.html#comments</comments>
		<pubDate>Fri, 09 Feb 2007 03:52:59 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=377</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>使うたびに忘れているのでメモ。</p>
<pre class="code"><code>$ cmd &gt; /dev/null 2&gt;&amp;1</code></pre>
<p>いっつも&gt;と&amp;の順番がわからなくなっちゃうんだよなー。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2007/02/09/125259.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>プロセスIDだけ抽出する。</title>
		<link>http://saikyoline.jp/weblog/2006/09/28/001314.html</link>
		<comments>http://saikyoline.jp/weblog/2006/09/28/001314.html#comments</comments>
		<pubDate>Wed, 27 Sep 2006 15:13:14 +0000</pubDate>
		<dc:creator>yoshuki</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://saikyoline.jp/weblog/?p=326</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>滅多に使わない、そして使ったときにはこんな基本的なこと忘れないだろと思うんだけど、必要になるたびにアレ？てことになるのでメモ。</p>
<pre class="code"><code>ps -ef | awk '/hoge/ &amp;&amp; !/awk/ {print $2}'</code></pre>
<p>なにがしたいかっていうと、こういうこと。</p>
<pre class="code"><code>ps -ef | awk '/hoge/ &amp;&amp; !/awk/ {print $2}' | xargs kill -9</code></pre>
<p>乱暴だなぁ。</p>
]]></content:encoded>
			<wfw:commentRss>http://saikyoline.jp/weblog/2006/09/28/001314.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

