Modified: 20 August 2004
rubyのインストール - 必須で同梱されてないツール
ダウンロード
以下の本家のページからダウンロードできるそうです。
http://www.ruby-lang.orgしかし、rpmが見つからなかったので、"yum" でインストールしました。
# yum install ruby Gathering header information file(s) from server(s) Server: Fedora Core 2 - i386 - Base Server: Fedora Core 2 - i386 - Released Updates Finding updated packages Downloading needed headers libbonobo-0-2.6.2-1.i386. 100% |=========================| 6.0 kB 00:00 tzdata-0-2004b-1.fc2.noar 100% |=========================| 29 kB 00:00 : mozilla-37-1.7.2-0.2.0.i3 100% |=========================| 21 kB 00:00 kernel-0-2.6.8-1.521.i586 100% |=========================| 180 kB 00:01 Resolving dependencies .Dependencies resolved I will do the following: [install: ruby 1.8.1-2.1.i386] I will install/upgrade these to satisfy the dependencies: [deps: ruby-libs 1.8.1-2.1.i386] Is this ok [y/N]: y<Enter> Downloading Packages Getting ruby-libs-1.8.1-2.1.i386.rpm ruby-libs-1.8.1-2.1.i386. 100% |=========================| 52 kB --:-- error: rpmts_HdrFromFdno: headerRead failed: hdr blob(89112): BAD, read returned 52435 ruby-libs-1.8.1-2.1.i386. 100% |=========================| 1.5 MB 00:14 Getting ruby-1.8.1-2.1.i386.rpm ruby-1.8.1-2.1.i386.rpm 100% |=========================| 157 kB 00:00 Running test transaction: Test transaction complete, Success! ruby-libs 100 % done 1/2 ruby 100 % done 2/2 Installed: ruby 1.8.1-2.1.i386 Dep Installed: ruby-libs 1.8.1-2.1.i386 Transaction(s) Complete #
ダウンロード
http://www.namazu.org/~satoru/
上記作者のページの、以下からダウンロードできます。
http://www.namazu.org/~satoru/pdumpfs/
インストールする
$ tar zxvf pdumpfs-0.6.tar.gz
:
$ su
password: ********
# cd pdumpfs-0.6
# make
rm -f pdumpfs
sed -e "s!@VERSION@!1.2!g" \
pdumpfs.in > pdumpfs
chmod 555 pdumpfs
#
"pdumpfs"の変更
"ruby"のパスを確認する。
# whereis ruby
ruby: /usr/bin/ruby /usr/lib/ruby /usr/share/man/man1/ruby.1.gz
#以下のように、1行目を変更します。
#! /usr/bin/ruby
:
:
インストールする
以下のコマンドを実行すれば、インストールは終了です。
# cp pdumpfs /usr/local/bin 確認します。以下のように表示されれば、とりあえずOKです。
# pdumpfs
Usage: pdumpfs SRC DEST [BASE]
-e, --exclude=PATTERN exclude files/directories matching PATTERN
-s, --exclude-by-size=SIZE exclude files larger than SIZE
-w, --exclude-by-glob=GLOB exclude files matching GLOB
-l, --log-file=FILE write a log to FILE
-v, --version print version information and exit
-q, --quiet suppress all normal output
-n, --dry-run don't actually run any commands
-h, --help show this help message
# pdumpfs -v
pdumpfs 1.2
#
実行してみます
# pdumpfs /home/bb /backup directory /home/bb new_file /home/bb/.bash_logout new_file /home/bb/BBCLT-bbc1.9e-btf.tar new_file /home/bb/.bash_profile directory /home/bb/bbvar directory /home/bb/bbvar/histlogs : new_file /home/bb/bbvar/hist/fc2-100.tomo.ac new_file /home/bb/bb1.9e-btf/web/mkbbwml.sh new_file /home/bb/bb1.9e-btf/web/hostsvc_footer : new_file /home/bb/bbc1.9e-btf/install/bbsys.sco3 new_file /home/bb/bbc1.9e-btf/install/bbsys.hpux9 #実行後、以下のように作られています。
/backup/2004/08/22/bb/...同じ日に何度バックアップしても変わりませんが、別の日に実行すると、差分だけがコピーされ、同じものはハードリンクになっています。
ハードリンクは、リンク先のファイルを消しても残ります。というより、ハードリンクされているファイルは、リンクがあると削除されません。