Posts

Showing posts from 2011

HHKB Pro2

Image
愛用のキーボードは、Happy Hacking Keyboard Professional 2です。キータッチが秀逸です。

Galaxy からBlogger アプリ

Image
Galaxy からBlogger アプリを使って投稿。編集機能は不十分だが、気軽に投稿できるのは便利。写真も簡単に貼り付けることができる。 ちなみに、愛用のメガネです。

今日は自転車通勤

Image
暖かくなってきたので、自転車が気持ち良い(^^)

rsync --updateオプションで悩む

rsyncの--updateオプションは、転送先ファイルのmtimeが転送元よりも新しい場合に、そのファイルのコピーをスキップするオプションである。 しかしながら、シンボリックリンクやスペシャルファイルの場合は、このオプションがあっても、コピーはスキップされない。 -u, --update This forces rsync to skip any files which exist on the destination and have a modified time that is newer than the source file. (If an existing destination file has a modification time equal to the source file’s, it will be updated if the sizes are different.) Note that this does not affect the copying of symlinks or other special files. Also, a difference of file format between the sender and receiver is always considered to be important enough for an update, no matter what date is on the objects. In other words, if the source has a directory where the destination has a file, the transfer would occur regardless of the timestamps. コピー先のシンボリックの方が新しい場合には、コピーをスキップしたいのだが、どうすれば良いのでしょう?

aufs2.1を試してみる。

Aufs(AnotherUnionfs)は、複数のディレクトリを単一のディレクトリに見せるスタッカブルなファイルシステムです。Aufsを用いると、リードオンリーなディレクトリの上に、読み書き専用のディレクトリを重ねてマウントすることができます。 今回、これについて試してみました。 インストール手順 http://aufs.sourceforge.net/ にあるドキュメントを参考にインストールします。 レポジトリの同期とチェックアウト 今回はバニラカーネルにパッチを当てて、カーネルモジュールとしてコンパイルするので、aufs2-standalone.gitのみ同期します。 root@hana:~/tmp# git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git aufs2-standalone.git Cloning into aufs2-standalone.git...  使用するバニラカーネルのバージョンは2.6.38.2なので、aufs2.1- 38  をチェックアウトします。 root@hana:~/tmp# cd aufs2-standalone.git/  root@hana:~/tmp/aufs2-standalone.git# git checkout origin/aufs2.1-38 Note: checking out 'origin/aufs2.1-38'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b wit

GNU tarでシンボリックリンクのタイムスタンプが保存されない - 1.24以降ならOK

GNU tar 1.24以降であれば、タイムスタンプが保存されるようである。 http://git.savannah.gnu.org/cgit/tar.git/plain/NEWS?id=release_1_24 ** Symbolic link attributes When extracting symbolic links, tar now restores attributes such as last-modified time and link permissions, if the operating system supports this. For example, recent versions of the Linux kernel support setting times on symlinks, and some BSD kernels also support symlink permissions. Debian squeeze のtarは1.23である。 ktaka@hana:~$ tar --version tar (GNU tar) 1.23 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. タイムスタンプがApr 1 00:00のシンボリックリンクを作成。 ktaka@hana:~$ mkdir p ktaka@hana:~$ for i in a b c d e f g ; do ln -s /tmp/$i p/$i; touch -ht 04010000 p/$i ; done ktaka@hana:~$ ls -la p total 8 drwxr-xr-x 2 ktaka ktaka 4096 Apr 8 03:03 .

BloggerのDynamic viewがおしゃれ

このブログのは http://ktaka.blog.clustcom.com/ ですが、 末尾に/viewを追加すると、おしゃれなページに早変わり。 現在、用意されているviewは以下の5つ。 http://ktaka.blog.clustcom.com/view/flipcard http://ktaka.blog.clustcom.com/view/mosaic http://ktaka.blog.clustcom.com/view/sidebar http://ktaka.blog.clustcom.com/view/snapshot http://ktaka.blog.clustcom.com/view/timeslied 詳しくは ここ と ここ にアナウンスがあります。 今後、ユーザーがview自体をカスタマイズできるようにもなるようです。