From: "H.Yamamoto" Date: 2005-11-08T07:42:38+09:00 Subject: [ruby-dev:27661] Re: [TIPS] .ext へのコピーの負荷低減 山本です。 >なかだです。 > >At Mon, 7 Nov 2005 23:31:41 +0900, >H.Yamamoto wrote in [ruby-dev:27659]: >> もしかして Unix では上のようにディレクトリを第二引数にすると、cp の >> ようにその下にハードリンクをつくってくれるんでしょうか?(gnuwin32 の問題?) > >そうです。たぶん、/しかパス区切りとみなさなくて、全体をベース名 >とみなしているんでしょう。 いろいろ試してみましたが、どうもパス区切りのせいではなく、おかまいなしに くっつけているだけの印象です。ln .\x 0 はくっつけても 0\.\x で正当なパスなので 動くのでしょう。 S:\test>touch x S:\test>mkdir 0 S:\test>ln ..\test\x 0 ln: creating hard link `0\\..\\test\\x' to `..\\test\\x': No such file or direct ory S:\test>ln ../test/x 0 ln: creating hard link `0\\..\\test\\x' to `..\\test\\x': No such file or direct ory S:\test>ln s:/test/x 0 ln: accessing `0\\s:\\test\\x': Invalid argument S:\test>ln s:\test\x 0 ln: accessing `0\\s:\\test\\x': Invalid argument S:\test>ln \test\x 0 ln: creating hard link `0\\\\test\\x' to `\\test\\x': No such file or directory S:\test>ln /test/x 0 ln: creating hard link `0\\\\test\\x' to `\\test\\x': No such file or directory S:\test>ln x 0 S:\test>rm 0\x S:\test>ln .\x 0 S:\test>rm 0\x msys にも ln.exe が付属していたので試してみましたが、こちらは $ ln x 0 ln: `0': cannot overwrite directory のようにディレクトリの下に作ってくれませんでした。何か実装にばらつきが ある感じですね・・・