<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2119545220427717640</id><updated>2011-11-16T01:25:16.300+09:00</updated><title type='text'>誰得UNIX-Blog</title><subtitle type='html'>このブログは意味不明で無価値なUNIX関連情報を淡々と描くものです。
過度な期待はしないでください。&lt;br&gt;
あと、書いてある内容は完全に無保証です。自己責任で試しやがってください。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-4639957308072420826</id><published>2011-04-19T00:49:00.001+09:00</published><updated>2011-04-20T17:13:40.797+09:00</updated><title type='text'>ipvsadm(8) 日本語訳</title><summary type='text'>LVS の管理インターフェースである ipvsadm コマンドのマニュアルを翻訳しました。
オリジナルはsvn最新版です。配布条件はオリジナルの ipvsadm に従います。
誤訳等あればコメントをいただけると嬉しいです。





==========================================================================================
IPVSADM(8)                    Linux 管理者ガイド                    IPVSADM(8)



NAME
       ipvsadm - Linux Virtual Server 管理

SYNOPSIS
       ipvsadm -A|E -t|u|f service-address [-s scheduler]
</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/4639957308072420826/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2011/04/ipvsadm8.html#comment-form' title='2 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/4639957308072420826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/4639957308072420826'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2011/04/ipvsadm8.html' title='ipvsadm(8) 日本語訳'/><author><name>kt</name><uri>http://www.blogger.com/profile/01572571295417893191</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_60_uRXWVxJs/TEq4mm2ZpqI/AAAAAAAAAAs/WI_gsnDiSUs/S220/ebi.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-4290964032644974841</id><published>2011-04-10T00:51:00.007+09:00</published><updated>2011-04-20T17:18:34.576+09:00</updated><title type='text'>IPVS のカーネルコンフィグのヘルプ翻訳</title><summary type='text'>IPVS (LVS, Linux Virtual Serverを実現するKernel内のモジュール) のカーネルコンフィグ (Kconfig)のヘルプを翻訳しました。

普通、調整が必要になるコンフィグレーションは特にないのですが、参考まで。
ファイルはlinux-2.6.37のものです。
(追記: Linuxと同じライセンスです)



#
# IP Virtual Server configuration
#
menuconfig IP_VS
tristate "IP virtual server support"
depends on NET &amp;&amp; INET &amp;&amp; NETFILTER
depends on (NF_CONNTRACK || NF_CONNTRACK=n)
---help---
IP Virtual Server support will let you build </summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/4290964032644974841/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2011/04/ipvs.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/4290964032644974841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/4290964032644974841'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2011/04/ipvs.html' title='IPVS のカーネルコンフィグのヘルプ翻訳'/><author><name>kt</name><uri>http://www.blogger.com/profile/01572571295417893191</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_60_uRXWVxJs/TEq4mm2ZpqI/AAAAAAAAAAs/WI_gsnDiSUs/S220/ebi.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-2010773181691145145</id><published>2010-09-02T23:43:00.011+09:00</published><updated>2011-04-20T17:14:59.748+09:00</updated><title type='text'>これだけは押さえておきたいyumの使い方</title><summary type='text'>FedoraおよびRHEL系ディストリビューションにおけるRPMインストーラ/アップデータとしてデファクトスタンダードといえるYumについて、基本的な使い方をまとめておこうと思う。対象バージョンはCentOS4以降のyum。



1. システムにインストールされているRPMをアップデートする:yum update [RPM名]途中で本当にダウンロードしてインストールするかどうか確認してくる（対話的動作をする）が、yum update -y のように「-y」オプションをつけることで完全に自動化できる。CentOSやRHELでは自動的なアップデートを行ってもまず問題がでることはないので、cron等で-yをつけて実行してもよいかもしれない。Fedoraもまず問題がでることはないはずだが、そのディストリビューションとしての性格上問題が起こってもおかしくはない。実際Fedoraでは2010年1月</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/2010773181691145145/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2010/09/yum.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/2010773181691145145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/2010773181691145145'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2010/09/yum.html' title='これだけは押さえておきたいyumの使い方'/><author><name>kt</name><uri>http://www.blogger.com/profile/01572571295417893191</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_60_uRXWVxJs/TEq4mm2ZpqI/AAAAAAAAAAs/WI_gsnDiSUs/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-1333358027062562627</id><published>2010-05-15T10:47:00.002+09:00</published><updated>2011-04-20T17:15:50.386+09:00</updated><title type='text'>ServersMan@VPSでのiptables設定(state版)</title><summary type='text'>ServersMan@VPSでのiptablesがstateに正式対応したようなので、以前の改訂版としてstateを使用したルールの書き方をまとめる。

(注意) stateに対応したという情報が流れた後に一時的に「stateの文法が通るようになったが実際は動作しない」という時期があった。5/12日現在においては、一旦rebootすることで正常にstateが動作するようになるので、この記事の内容を試す前に一旦rebootすることをおすすめする。



これからやること 
まず、簡単にstateを利用したルールの作り方を書くと、
ESTABLISHED, RELATEDというstateな通信を許可するルールを設定
その後ろにサービス提供したいport宛のNEWというstateな通信を許可するルールを設定
最後にすべてDROPする
となる。1で設定するルールによってESTABLISHEDな</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/1333358027062562627/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2010/05/serversmanvpsiptablesstate.html#comment-form' title='4 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/1333358027062562627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/1333358027062562627'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2010/05/serversmanvpsiptablesstate.html' title='ServersMan@VPSでのiptables設定(state版)'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-6124290829281607157</id><published>2010-04-20T02:03:00.005+09:00</published><updated>2011-04-20T17:16:54.966+09:00</updated><title type='text'>ServerMan@VPSでのOpenSSH設定</title><summary type='text'>やっぱしリモートでマシン管理の起点はSSHでFAだろ、つーことで今回はOpenSSHの設定について。(CentOSのSSHサーバがOpenSSHなのでOpenSSHの設定について書く)



SSHはリモートにあるUnix系マシンへの安全なログイン方法としてのデファクトスタンダードであるが、デファクトスタンダードなだけに、攻撃者に狙われる確率も高い。

例えば以下は /var/log/secure* を invalid で grep した結果の一部だが、oracle や test, admin, mysql など、ありがちなアカウントに対してアタックが仕掛けられていることがわかる。このサーバは 4/15 午後から運用しているのだが、1日もたたずに最初のアタックを仕掛けられているわけだ。




調べたことはないが、おそらく「有名なアカウント名に対してアカウント名と同じ文字列をパスワード</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/6124290829281607157/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2010/04/servermanvpsopenssh.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/6124290829281607157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/6124290829281607157'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2010/04/servermanvpsopenssh.html' title='ServerMan@VPSでのOpenSSH設定'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-3172884731971902240</id><published>2010-04-18T17:02:00.014+09:00</published><updated>2011-04-20T17:17:35.184+09:00</updated><title type='text'>ServersMan@VPSでのiptables設定</title><summary type='text'>DTIの月額490円のVPSサービス『ServersMan@VPS』 に申し込んでみた。このVPSでiptablesを使うときのTIPSをメモががわりに残しておく。

（注意： 現在は state を使えるようになったので、こちらの新しい解説のほうがおすすめです）


このサービスは安価にroot権限つきサーバ(CentOS5系)を運用できるので、非常に魅力的なんだけど、ひとつ気になる制限がある。

それは iptables で state モジュールを利用できないことだ(2010/04/21追記: state モジュールを利用可能になったそうです。stateモジュールを利用できない前提で書かれた以下の内容は、現在では特に必要ない内容となっていますので、注意してください。2010/04/27追記: state の文法を受け付けるようになってはいますが、実際は動いていないように見えます。</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/3172884731971902240/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2010/04/serversmanvpsiptables.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/3172884731971902240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/3172884731971902240'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2010/04/serversmanvpsiptables.html' title='ServersMan@VPSでのiptables設定'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-1247397709923346967</id><published>2010-04-04T14:38:00.007+09:00</published><updated>2011-04-20T17:20:19.053+09:00</updated><title type='text'>perl における文字コードについて</title><summary type='text'>Perl における文字コードについて曖昧な理解だったので勉強がてらまとめてみる。

とあるPerlアプリケーションを修正したくて挙動をしらべたところ、length($str)が文字数じゃなくてバイト数を返しているのが原因と分かった。しかし、関連しそうなトピックをググっても、Perl に詳しい人がまとめた解説が多く引っかかるのだけど、基本的なことが分かってない自分には高度過ぎてよくわからない。しかも perl 5.6 以前 -&gt; 5.6 -&gt; 5.8 あたりでドラスティックに変更されているようで、そのへんの事情に疎い自分はどの情報を信じればいいのかよくわからない。(が、一番わかりにくくなっている原因は "UTF8" と "Perl内部エンコーディング" の妙な交換可能性だと思う。まるでCのポインタと配列みたいだ)



というわけで、主にEncode(3pm)で調べた結果をまとめておく。</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/1247397709923346967/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2010/04/perl.html#comment-form' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/1247397709923346967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/1247397709923346967'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2010/04/perl.html' title='perl における文字コードについて'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-8301575894102151697</id><published>2009-09-12T03:13:00.004+09:00</published><updated>2009-09-12T03:52:16.829+09:00</updated><title type='text'>ステージを理解して git をもっと便利に使う(git-add詳細情報)</title><summary type='text'>ステージ（インデックスに変更を追加すること）について前回までざっくりと見てきましたが、第1回で紹介したコマンド git-add のマニュアルを日本語訳したので紹介します。git-add(1)git-add はステージを理解する上での要とも言えるコマンドなので、ひととおりオプションを眺めてみると、何か悟れるかも?なお、原本は git-1.6.4.1 の時点でのマニュアルです。お使いのバージョンによっては存在しないオプションもあるかもしれません。新しいバージョンほどより便利になっているので、これを期に git://git.kernel.org/pub/scm/git/git.git から最新版を clone して使うというのも良い選択だと思います。ステージというテーマでは今回が最終回になります。gitに関する次回以降の記事は "easy branch easy commit" をテーマに何回</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/8301575894102151697/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2009/09/git-git-add.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/8301575894102151697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/8301575894102151697'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2009/09/git-git-add.html' title='ステージを理解して git をもっと便利に使う(git-add詳細情報)'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-2519006769891190680</id><published>2009-09-02T08:30:00.001+09:00</published><updated>2009-09-02T12:06:06.438+09:00</updated><title type='text'>hello wrold!その2（Apacheモジュール編）</title><summary type='text'>hello world!の続編です。前回は後半inetdを利用したインチキWebサーバを作りましたが、今回は由緒正しいWebサーバであるApache httpdのモジュールでhello worldをやってみたいと思います。「apacheモジュールを書くなんて難しそう」と思ったあなた、大丈夫です。死ぬほど簡単です。●準備: apxs のインストールまずhttpdがインストールされたマシンにapxsコマンドをインストールしましょう。FreeBSD を使っている場合は、ports/packagesでhttpdをインストールしていれば、apxsコマンドもすでにインストールされているはずです。Linux を使っている場合は、httpdがインストールされていてもkt@ume% which apxsなどで見つからなければ、インストールする必要があります。REHL系であれば、httpd-develという</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/2519006769891190680/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2009/09/hello-wrold2apache.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/2519006769891190680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/2519006769891190680'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2009/09/hello-wrold2apache.html' title='hello wrold!その2（Apacheモジュール編）'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-2394760864534494812</id><published>2009-08-29T08:30:00.000+09:00</published><updated>2009-08-29T08:30:00.168+09:00</updated><title type='text'>ステージを理解して git をもっと便利に使う(その3)</title><summary type='text'>前回から引き続き、「ステージを理解して git をもっと便利に使う」というテーマでお送りする、git解説記事の第3弾です。まずは、前回までのおさらいです。git にはリポジトリに格納された「最新のコミット」と「ワーキングコピー」の間に「index」と呼ばれる緩衝地帯が存在しています。チェックアウト直後は「最新のコミット」＝「index」＝「ワーキングコピー」ですが、ワーキングコピーを編集した後、git addにより編集内容がstage(indexに登録)され、「最新のコミット」≠「index(+α)」＝「ワーキングコピー(+α)」となります。% git add や% git add -p を積極的に使うことで、編集内容を部分的にstageする/しないをコントロールし、1コミットの内容を洗練しましょう、というのが第1回の内容でした。第2回はgit diffとgit diff --</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/2394760864534494812/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2009/08/git-3.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/2394760864534494812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/2394760864534494812'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2009/08/git-3.html' title='ステージを理解して git をもっと便利に使う(その3)'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-7142048753164068059</id><published>2009-08-23T18:22:00.000+09:00</published><updated>2011-04-22T18:15:53.080+09:00</updated><title type='text'>ステージを理解して git をもっと便利に使う(その2)</title><summary type='text'>前回から引き続き、「ステージを理解して git をもっと便利に使う」というテーマでコマンドを紹介します。
今回は git diff --cached です。

●git diff --cached
使用例

git diff --cached


前回覚えた git add でstageする/しないを使い分けると、困ったことがひとつ出てきます。
それは git diff が「index」と「ワーキングコピー」の差分だけを表示すること、つまり一旦git addでstageした内容はgit diffで表示されなくなってしまうことです。
前回の復習として、git add直後の「最新のコミット」と「index」、「ワーキングコピー」の関係を思い出してみましょう。
「最新のコミット」≠「index」＝「ワーキングコピー」

git diffは「index」と「ワーキングコピー」の差分だけを表示</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/7142048753164068059/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2009/08/git-2.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/7142048753164068059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/7142048753164068059'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2009/08/git-2.html' title='ステージを理解して git をもっと便利に使う(その2)'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-8526930503425736381</id><published>2009-08-22T20:41:00.015+09:00</published><updated>2011-04-20T18:19:34.217+09:00</updated><title type='text'>ステージを理解して git をもっと便利に使う</title><summary type='text'>git には「stage(ステージ)する」という概念があります。あるいは「index」と言い換えてもいいかもしれません。

簡単にいうと「stageする」＝「特定の変更内容をindexに登録する」＝「次回コミットに含めるようgitに指示する」ということなのですが、この概念は今まで主流だった CVS や Subversion といったバージョン管理システムにはありませんでいした。
長年CVSを使っていて、その考え方に凝り固まっていた私は、gitを使い始めてしばらくはstageやindexの概念を理解できなかったので、今回ここで紹介することにしました。

このstageとindexを覚えると「ひとつのコミットには、その主題となる変更と無関係な変更を含めない」という「バージョン管理システムを使う上で重要なはずなのに、つい疎かにしてしまいがち」なポリシーを簡単に実践できるようになります。
今回</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/8526930503425736381/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2009/08/git.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/8526930503425736381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/8526930503425736381'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2009/08/git.html' title='ステージを理解して git をもっと便利に使う'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2119545220427717640.post-930641378895806715</id><published>2009-08-20T23:25:00.010+09:00</published><updated>2009-08-23T03:00:14.204+09:00</updated><title type='text'>hello world!</title><summary type='text'>最初はみんなこれでしょ、ということで hello world の書き方です。
まずはドノーマルなC言語から
kt@ume% cat &gt; hello.c
#include &lt;stdio.h&gt;

int main()
{
printf("hello world!\n");
return 0;
}
kt@ume% make hello
cc     hello.c   -o hello
kt@ume% PATH=.:$PATH hello
hello world

ポイントがいくつかあります。
cat を使うことで気分はBill Joy。でも間違ってEnterを押すと前の行には戻れません。行内でも間違いを見つけたらひたすらバックスペースで戻る以外に修正する術はなし。
*.c ファイルのファイル名から .c を除いた文字列を make することで Makefile いらず。
私が小さい頃は</summary><link rel='replies' type='application/atom+xml' href='http://daretoku-unix.blogspot.com/feeds/930641378895806715/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://daretoku-unix.blogspot.com/2009/08/hello-world.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/930641378895806715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2119545220427717640/posts/default/930641378895806715'/><link rel='alternate' type='text/html' href='http://daretoku-unix.blogspot.com/2009/08/hello-world.html' title='hello world!'/><author><name>kt</name><uri>http://www.blogger.com/profile/11677147387926441458</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_BuRqyE2n5ZY/So1aR3o7oiI/AAAAAAAAABI/j1LNbQMXgqo/S220/ebi.jpg'/></author><thr:total>0</thr:total></entry></feed>
