The 缓存命令是这个问题的一般答案!它也在Debian和Ubuntu 13.10(Saucy Salamander)。
谢谢你,Peter,提醒我们注意rsync中的-drop-cache "选项。 但这在上游被拒绝了 (Bug 9560--drop-cache选项), in favor of a more general solution for this: the new "缓存" command based on the rsync work with fadvise.
You just prepend "缓存" to any command you want. It also has nice utilities for describing and modifying the cache status of files. For example, here are the effects with and without 缓存:
$ ./cachestats ~/file.mp3
pages in cache: 154/1945 (7.9%) [filesize=7776.2K, pagesize=4K]
$ ./nocache cp ~/file.mp3 /tmp
$ ./cachestats ~/file.mp3
pages in cache: 154/1945 (7.9%) [filesize=7776.2K, pagesize=4K]\
$ cp ~/file.mp3 /tmp
$ ./cachestats ~/file.mp3
pages in cache: 1945/1945 (100.0%) [filesize=7776.2K, pagesize=4K]
因此,希望这对其他备份程序(rsnapshot、diplicity、rdiff-backup、amanda、s3sync、s3ql、tar等)和其他你不希望破坏你的缓存的命令会起作用。