Is a tool available to check the integrity of copied files?
Colin Law
clanlaw at gmail.com
Sun Apr 16 09:23:14 UTC 2023
On Sun, 16 Apr 2023 at 01:36, Little Girl <littlergirl at gmail.com> wrote:
>
> 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
Even if that works to disable the system cache, I still think it is
not safe to use it on a USB stick. Sticks have an onboard cache, and
I doubt whether nocache will tell the stick to clear the cache, though
I may be wrong. I think the only way to be certain is to unplug the
stick and plug it back in again. That will guarantee that the data is
being read from the flash on the stick, and the system cache will be
cleared.
Colin
>
> --
> Little Girl
>
> There is no spoon.
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
More information about the ubuntu-users
mailing list