Is a tool available to check the integrity of copied files?
Peter Flynn
peter at silmaril.ie
Sat Apr 15 21:02:19 UTC 2023
On 15/04/2023 12:52, Little Girl wrote:
> Hey there,
>
> Colin Law wrote:
>> Little Girl wrote:
>
>>> Probably any of the many backup tools out there could do it.
>
>> If the OS has a cached version of the file then I believe that when
>> the backup program asks the OS to read the file it will be given the
>> cached version, just the same as any other program such as diff. So
>> again that would not prove that the file has been successfully
>> written to the stick.
>
> Ah. I must have missed that. A small test could be done with a backup
> of one text file that gets copied over and then changed in one
> location before the comparison is run. Grsync catches such changes
> here, but I'm doing my backups from one SSD to another rather than a
> stick.
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.
Peter
More information about the ubuntu-users
mailing list