Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2012 18:17:25 -0700
From:      Colin Barnabas <colin.barnabas@gmail.com>
To:        Gary Kline <kline@thought.org>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: cksum entire dir??
Message-ID:  <20120912011725.GG3066@hs1.VERBENA>
In-Reply-To: <20120912002408.GA10496@ethic.thought.org>
References:  <20120911213804.GA9817@ethic.thought.org> <20120912011443.5df17cf2.freebsd@edvax.de> <20120912002408.GA10496@ethic.thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 11, 2012 at 05:24:08PM -0700, Gary Kline wrote:
> On Wed, Sep 12, 2012 at 01:14:43AM +0200, Polytropon wrote:
> > On Tue, 11 Sep 2012 14:38:04 -0700, Gary Kline wrote:
> > > 
> > > I'm trying to checksum directories as I move them around.
> > > ive read the man page for sum and cksum ... or maybe skimmed 
> > > them.  no joy.  anybody know of a utility to do this?  I've 
> > > got files that are decades old... 
> > 
> > Maybe it's possible to tar the directory (without
> > compression of course) and obtain a checksum of
> > the tar archive?
> > 
> > 	% tar cf - <director> | cksum
> > 
> > But I also tried cksum directly with a directory
> > like
> > 
> > 	% 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.
> > 
> > Tested on OS version 8.2-STABLE/i386, one year old.
> > 
> 
> 
> 	I think I tried something like your second example last night.
> 	I think I did
> 
> 	% cksum foodir/*
> 
> 	and had to compare each file from another file I was copying from.
> 	it was tiresome to check each of dozens of files tho. I was here at 
> 	desk for something obscene -- over 12 hrs. getting my new [slightly
> 	used:)] computer back to normal.  
> 
> 	if there isn't anything that can compare entire dirs, it looks like
> 	it's time to hack a small program.  tx, polyt.
> 
> 	gary
> 
> 
> > 
> > -- 
> > Polytropon
> > Magdeburg, Germany
> > Happy FreeBSD user since 4.0
> > Andra moi ennepe, Mousa, ...
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"

This works for me:

$ find foo/ -type f -print0 | xargs -0 md5 >> foo.md5

Maybe for you as well? Hope I could help.

-- 
Colin Barnabas
 _
( )	ACII Ribbon Campaign - www.asciiribbon.org
 X	No HTML/RTF in E-mail
/ \	Respect for open standards




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120912011725.GG3066>