xcorp::When it rains, it pours.

"The nice thing about rain," said Eeyore, "is that it always stops. Eventually."

Google Chrome の cache ディレクトリ変更

(2008/12/15) 検索エンジンからアクセスされる方が多いようなので、エントリを見やすいように編集しました。

junction

MS-DOS でいうところの JOIN コマンド、Linux でいうところの ln -s。
junction は Junction からダウンロードして入手。zip なので展開して適当なディレクトリ (C:\WINDOWS\system32 とか) にコピー。初回起動時は利用規約が表示されるので、コピーしたら、1 回は確認の意味をこめて実行しておくといいよ。
使い方はこんな感じ。

C:\>junction

Junction v1.05 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2007 Mark Russinovich
Systems Internals - http://www.sysinternals.com

The first usage is for displaying reparse point information, and the
second usage is for creating or deleting a NTFS junction point:

usage: junction [-s] [-q] <file or directory>
       -q     Don't print error messages (quiet)

       -s     Recurse subdirectories

usage: junction [-d] <junction directory> [<junction target>]
       -d     Delete the specified junction
       example: junction d:\link c:\winnt

cache ディレクトリ変更

要点だけまとめ。

  1. 新しい cache ディレクトリ作成
  2. 元々の cache ディレクトリにあるファイル、ディレクトリ全部を新しい cache ディレクトリにコピー
  3. 元々の cache ディレクトリを rename
  4. コマンドプロンプトから「junction "元々の cache ディレクトリ" "新しい cache ディレクトリ"」を実行
  5. Chrome を起動し、適当なページにアクセス
  6. 新旧双方の cache ディレクトリに cache データが生成されていることを確認
  7. rename した元々の cache ディレクトリを削除

コマンド等。

C:\>junction "C:\Documents and Settings\ユーザ名\Local Settings\Application Data\Google\Chrome\User Data" "F:\__BrowserCache\Chrome"

Junction v1.05 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2007 Mark Russinovich
Systems Internals - http://www.sysinternals.com

Created: C:\Documents and Settings\ユーザ名\Local Settings\Application Data\Google\Chrome\User Data
Targetted at: F:\__BrowserCache\Chrome

C:\>