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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Ralph Corderoy <ralph@xxxxxxxxxxxxxxx> wrote:

> Hi Ralf,
> 
> > I want to check the integrity of USB transferred, saved files by using
> > a tool, without manually clearing cached data manually.
> 
> Why do you want to avoid manually clearing the cache?
> 
> The problem with clearing the cache is it is the cache for every device.
> It is better to simply umount(8) and then mount(8) the USB stick so its
> blocks in the cache are discarded and reads must access the device.
> 


Isn't it better to also turn the USB stick power off and on?
The stick could have its own, builtin, cache. Doesn't it? Perhaps it is, 
too, reading from its cache, not from its permanent storage?

--
u34


> With the cache empty, a simple ‘diff -qr src dest’ will show if any
> files' contents differ, reading from the USB stick.  This is my
> recommendation.
> 
> If you want more detail checked, then ask rsync to show what would be
> updated, e.g. permissions, modification time, etc.  Note the ‘-n’.
> 
>     rsync -aciHAXSs --no-iconv -n src/ dest/
> 
> dd(1) can be told to use direct I/O, bypassing the cache, but that would
> be more useful if copying a disk or filesystem image to the USB stick
> and wanting to read it back from the block device.
> 
> dstat(1) can be used to observe reads from the device to show the cache
> isn't supplying everything.  ‘dstat -dDsdb,sdc’ monitors two block
> devices: /dev/sdb and /dev/sdc.
> 
> -- 
> Cheers, Ralph.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux