<?xml version="1.0" encoding="UTF-8" ?>
<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:thr="http://purl.org/syndication/thread/1.0">
  <title type="text">a1667203</title>
  <subtitle type="html">blog,memo,link free</subtitle>
  <link rel="self" type="application/atom+xml" href="https://a1667203.blog.shinobi.jp/atom"/>
  <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/"/>
  <updated>2008-07-27T03:13:17+09:00</updated>
  <author><name>aki</name></author>
  <generator uri="//www.ninja.co.jp/blog/" version="0.9">忍者ブログ</generator>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" />
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/125</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/vim/replace%20to%20newline" />
    <published>2009-02-17T08:09:59+09:00</published> 
    <updated>2009-02-17T08:09:59+09:00</updated> 
    <category term="vim" label="vim" />
    <title>replace to newline</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--replace to newline-->
<h3>文字列を改行コードに置換</h3>
<p>unixの場合．</p>
<pre>
cat_dog_rat
</pre>
<p>この行に，</p>
<pre>
:s/dog/\r/g
</pre>
<p>とすると，</p>
<pre>
cat_
_rat
</pre>
<p>となる．<br />
Mac, Windowsの場合は改行コード(\r)を適当なものに変える．</p>
<h3>改行コードを文字列に置換</h3>
<pre>
cat_
_rat
</pre>
<p>この2行に，</p>
<pre>
:s/\n/dog/g
</pre>
<p>とすると，</p>
<pre>
cat_dog_rat
</pre>
<p>となる．</p>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/124</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/vim/scroll%20keybind" />
    <published>2009-02-16T19:14:28+09:00</published> 
    <updated>2009-02-16T19:14:28+09:00</updated> 
    <category term="vim" label="vim" />
    <title>scroll keybind</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--scroll keybind-->
<table>
	<tr><th>キーバインド</th><th>動作</th></tr>
	<tr><td>C-u</td><td>半画面上にスクロール</td></tr>
	<tr><td>C-d</td><td>半画面下にスクロール</td></tr>
	<tr><td>C-f</td><td>1画面上にスクロール</td></tr>
	<tr><td>C-b</td><td>1画面下にスクロール</td></tr>
	<tr><td>C-y</td><td>1行上にスクロール</td></tr>
	<tr><td>C-e</td><td>1行下にスクロール</td></tr>
	<tr><td>z.</td><td>カーソル位置を画面の中心に</td></tr>
</table>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/123</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/linux/install%20rxvt-unicode%20from%20source" />
    <published>2009-02-16T18:51:21+09:00</published> 
    <updated>2009-02-16T18:51:21+09:00</updated> 
    <category term="linux" label="linux" />
    <title>install rxvt-unicode from source</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--install rxvt-unicode from source-->
<h3>rxvt-unicode</h3>
<p>UNICODE対応のターミナルエミュレータ．</p>
<h3>環境</h3>
<ul>
	<li>kernel: 2.6.18-92.el5</li>
	<li>gcc: 4.1.2</li>
	<li>binutils: 2.17.50.0.6-6.el5</li>
</ul>
<h3>インストール</h3>
<pre>
# cd /usr/local/src/
# wget http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.06.tar.bz2
# cd rxvt-unicode-9.06
# tar jxvf rxvt-unicode-9.06.tar.bz2
# patch -p1 &lt;doc/urxvt-8.2-256color.patch
# ./configure \
# --with-x \
# --with-codesets=all \
# --enable-xim \
# --enable-unicode3 \
# --enable-afterimage \
# --enable-xft \
# --enable-font-styles \
# --enable-mousewheel \
# --prefix=/home/aki/TEST/urxvttest \
# --with-term=rxvt-256colors
# make
# make install
# ../urxvttest/bin/urxvt
</pre>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/112</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/linux/mount%20fat32%20file%20system" />
    <published>2009-02-01T03:43:50+09:00</published> 
    <updated>2009-02-01T03:43:50+09:00</updated> 
    <category term="linux" label="linux" />
    <title>mount fat32 file system</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--mount fat32 file system-->
<p>windowsのファイルシステムでフォーマットしたフラッシュメモリをマウントするには，</p>
<pre>
# mount -t msdos /dev/sdb1 /mnt
</pre>
<p>のようにする．が，これだとmsdosのファイル形式になるので・・</p>
<pre>
# ls /mnt/
</pre>
<p>とするとmsdosのファイル名の形式に合わさられて文字化けしたみたいになる．具体的には「script.sh」が「scr~.sh」みたいになる．</p>
<pre>
# mount -t vfat /dev/sdb1 /mnt
</pre>
<p>とすると文字化けっぽいのが起こらない．</p>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/106</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/vim/shell%20command" />
    <published>2009-01-20T07:06:39+09:00</published> 
    <updated>2009-01-20T07:06:39+09:00</updated> 
    <category term="vim" label="vim" />
    <title>shell command</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--shell command-->
<p>vim上でシェルコマンド実行．<br />
フィルタリングなどのコマンド実行は:!<br />
例：</p>
<pre>
dog
cat
mouse
giraffe
elephant
</pre>
<p>この5行のファイルに対してソート．</p>
<pre>
:%!sort
</pre>
<p>こうなる．</p>
<pre>
cat
dog
elephant
giraffe
mouse
</pre>
<p>行数指定は他同様．</p>
<pre>
:15,19!sort
</pre>
<p>コマンドの結果をカーソル位置に挿入．</p>
<pre>
:r! date
</pre>
<p>挿入される．</p>
<pre>
Tue Jan 20 06:53:16 JST 2009
</pre>
<p>cd，historyなどのシェル組み込みコマンドは使えないから注意．</p>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/105</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/linux/glibc%20version" />
    <published>2009-01-20T06:08:53+09:00</published> 
    <updated>2009-01-20T06:08:53+09:00</updated> 
    <category term="linux" label="linux" />
    <title>glibc version</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--glibc version-->
<p>glibcのバージョンを調べる．</p>
<pre>
% /lib/libc.so.6
GNU C Library stable release version 2.5, by Roland McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.1.2 20070626 (Red Hat 4.1.2-14).
Compiled on a Linux 2.6.9 system on 2008-05-23.
Available extensions:
    The C stubs add-on version 2.1.2.
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    GNU libio by Per Bothner
    NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
    RT using linux kernel aio
Thread-local storage support included.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/libc/bugs.html&gt;.
</pre>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/104</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/linux/cpuinfo-%20meminfo" />
    <published>2009-01-20T06:01:19+09:00</published> 
    <updated>2009-01-20T06:01:19+09:00</updated> 
    <category term="linux" label="linux" />
    <title>cpuinfo, meminfo</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--cpuinfo, meminfo-->
<p>CPUの情報，メモリの情報を調べるにはprocファイルシステムを見る．procなので正確．<br />
CPUの情報を調べる．</p>
<pre>
% cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Celeron(R) CPU 2.53GHz
stepping        : 1
cpu MHz         : 2533.569
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc up pni monitor ds_cpl tm2 cid cx16 xtpr
bogomips        : 5069.95
</pre>
<p>メモリの情報を調べる．</p>
<pre>
% cat /proc/meminfo
MemTotal:      2072120 kB
MemFree:       1456288 kB
Buffers:         94744 kB
Cached:         306184 kB
SwapCached:          0 kB
Active:         231624 kB
Inactive:       287888 kB
HighTotal:     1176056 kB
HighFree:       737404 kB
LowTotal:       896064 kB
LowFree:        718884 kB
SwapTotal:     2031608 kB
SwapFree:      2031608 kB
Dirty:               4 kB
Writeback:           0 kB
AnonPages:      118612 kB
Mapped:          46488 kB
Slab:            78612 kB
PageTables:       2628 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   3067668 kB
Committed_AS:   320020 kB
VmallocTotal:   114680 kB
VmallocUsed:     45412 kB
VmallocChunk:    63988 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     4096 kB
</pre>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/103</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/vim/gvim-%20guioptions" />
    <published>2009-01-11T21:32:10+09:00</published> 
    <updated>2009-01-11T21:32:10+09:00</updated> 
    <category term="vim" label="vim" />
    <title>gvim: guioptions</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--gvim: guioptions-->
<p>スクロールバー非表示．</p>
<pre>
:set guioptions-=r
</pre>
<p>表示させる場合は+．</p>
<pre>
:set guioptions+=r
</pre>
<p>ツールバー非表示．</p>
<pre>
:set guioptions-=T
</pre>
<p>メニューバー非表示．</p>
<pre>
:set guioptions-=m
</pre>
<p>スクロールバー非表示．</p>
<pre>
:set guioptions-=l
</pre>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/102</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/linux/install%20cvs%20from%20source" />
    <published>2009-01-05T18:10:18+09:00</published> 
    <updated>2009-01-05T18:10:18+09:00</updated> 
    <category term="linux" label="linux" />
    <title>install cvs from source</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--install cvs from source-->
<h3>cvs</h3>
<p>Concurrent Version System．<br />
単一ファイルを対象としたバージョン管理ツール．</p>
<h3>環境</h3>
<ul>
	<li>kernel: 2.6.18-92.el5</li>
	<li>gcc: 4.1.2</li>
	<li>binutils: 2.17.50.0.6-6.el5</li>
</ul>
<h3>インストール</h3>
<pre>
# cd /usr/local/src
# wget http://ftp.gnu.org/non-gnu/cvs/source/stable/1.11.23/cvs-1.11.23.tar.bz2
# tar jxf cvs-1.11.23.tar.bz2
# cd cvs-1.11.23.tar.bz2
# ./configure
# make
# make install
</pre>
<h3>テスト</h3>
<p>時間ない．省略．</p>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
  <entry>
    <id>a1667203.blog.shinobi.jp://entry/101</id>
    <link rel="alternate" type="text/html" href="https://a1667203.blog.shinobi.jp/linux/install%20php%20from%20yum%20-centos5.2-" />
    <published>2008-12-31T23:29:23+09:00</published> 
    <updated>2008-12-31T23:29:23+09:00</updated> 
    <category term="linux" label="linux" />
    <title>install php from yum (CentOS5.2)</title>
    <content mode="escaped" type="text/html" xml:lang="utf-8"> 
      <![CDATA[<!--install php from yum (CentOS5.2)-->
<h3>phpインストール</h3>
<p>httpd(apache2)はデフォルトでインストールされていた．<br />
phpインストール．</p>
<pre>
# yum install php.i386
</pre>
<ul>
	<li>php.i386-5.1.6-20.el5_2.1</li>
	<li>php-cli.i386-5.1.6-20.el5_2.1</li>
	<li>php-common.i386-5.1.6-20.el5_2.1</li>
</ul>
<p>がインストールされる．</p>
<h3>httpd.conf編集</h3>
<p>/etc/httpd/conf/httpd.confを編集し，phpのモジュールをロードするようにする．<br />
適当な位置に，</p>
<pre>
LoadModule php5_module modules/libphp5.so
</pre>
<p>を追記．<br />
さらに適当な位置に，</p>
<pre>
AddType    application/x-httpd-php .php
AddType    application/x-httpd-php-source .phps
</pre>
<p>を追記．<br />
さらに行</p>
<pre>
DirectoryIndex    index.html index.html.var
</pre>
<p>を，</p>
<pre>
DirectoryIndex    index.html index.php
</pre>
<p>に変更．</p>
<h3>テスト</h3>
<p>/etc/httpd/conf/httpd.conf
<pre>
DocumentRoot "/var/www/html"
</pre>
<p>となっていたので，</p>
<pre>
# cat &gt;/var/www/html/phpinfo.php
&lt;html&gt;
&lt;body&gt;
&lt;?php
phpinfo();
?&gt;
&lt;/body&gt;
&lt;/html&gt;
# 
</pre>
<p>この状態でIPアドレスを調べて</p>
<pre>
# ifconfig
</pre>
<p>ブラウザでhttp://xxx.xxx.xxx.xxx/phpinfo.phpにアクセス．<br />
phpの情報が表示されればOK．<br />
※xxxは任意の数字．</p>
]]> 
    </content>
    <author>
            <name>aki</name>
        </author>
  </entry>
</feed>