Philip Rowlands wrote: > On Fri, 4 May 2007, Paul Eggert wrote: > >> Anyway, 'shred' currently does the first, but not the second, as it >> doesn't verify what it's written. That should get fixed, no? > > Is there a way to ensure reading directly from disk? On Linux I see only > a whole-system, root-level way to drop cached files [1]. > > > Cheers, > Phil > > [1] http://www.linuxinsight.com/proc_sys_vm_drop_caches.html
We discussed posix_fadvise(POSIX_FADV_DONTNEED) a while back actually: http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00039.html Currently _on linux_ that will invalidate the cache for a file, rather than a process. I.E. it currently does what you want. I.E. if many processes have referenced pages of a file, then they are still dropped when any process make the above call. Note I don't think the spec should/does intend this. A better option I think is to use O_DIRECT, but again portability is going to be the issue here. Pádraig. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
