Date: Wed, 12 Sep 2012 07:31:45 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: Polytropon <freebsd@edvax.de> Cc: Gary Kline <kline@thought.org>, FreeBSD Mailing List <freebsd-questions@FreeBSD.org> Subject: Re: cksum entire dir?? Message-ID: <50502C51.5020601@FreeBSD.org> In-Reply-To: <20120912011443.5df17cf2.freebsd@edvax.de> References: <20120911213804.GA9817@ethic.thought.org> <20120912011443.5df17cf2.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 12/09/2012 00:14, Polytropon wrote: > % cksum <directory> > > and could obtain a checksum - so it _seems_ to work. > After alteration of one file within the hierarchy a > different result was printed. That will give you a checksum on the directory inode -- file names and associated metadata only, not file content. In theory you could edit a file without modifying any of the timestamps, and that wouldn't result in any change to the directory checksum. Also, modifying things a few layers down the filesystem hierarchy won't have any effect either. Generally I find the best test for differences between old and new copies of a filesystem is 'rsync -avx -n ...' Also, sum and cksum have way too small a key size for this to be reliable, since you can't tell a true result from a hash collision. Use md5 or sha1 or sha256 for best results. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBQLFcACgkQ8Mjk52CukIz6ygCfQ9XvOfMlschKHGVWVbwWI0xg cugAniEdvkvi/334ZkBWa2D4EkMxt+Nr =ZAuG -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50502C51.5020601>
