Is a tool available to check the integrity of copied files?

Little Girl littlergirl at gmail.com
Sun Apr 16 00:34:23 UTC 2023


Hey there,

Peter Flynn wrote:
>Little Girl wrote:

>It occurred to me that it may be possible to append a character like
>a space or null to the end of the file (with, eg, echo) so that the
>OS will not use the cached copy. I assume in my ignorance that the
>OS relies on something like file size or timestamp to detect if the
>cache should be used or not. Maybe even touch would work.

It's possible, although I'm not familiar with how the use of cache is
determined.

I found this page about the nochache command that might be helpful for
preventing the use of cache:

https://manpages.ubuntu.com/manpages/focal/man1/nocache.1.html

And this page mentions the cmp command for comparing files:

https://stackoverflow.com/questions/12900538/fastest-way-to-tell-if-two-files-have-the-same-contents-in-unix-linux

-- 
Little Girl

There is no spoon.



More information about the ubuntu-users mailing list