From owner-freebsd-questions@FreeBSD.ORG Wed Sep 12 02:10:29 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9446E106564A for ; Wed, 12 Sep 2012 02:10:29 +0000 (UTC) (envelope-from kline@thought.org) Received: from p3plsmtpa08-03.prod.phx3.secureserver.net (p3plsmtpa08-03.prod.phx3.secureserver.net [173.201.193.104]) by mx1.freebsd.org (Postfix) with SMTP id 6EA308FC0C for ; Wed, 12 Sep 2012 02:10:28 +0000 (UTC) Received: (qmail 5199 invoked from network); 12 Sep 2012 02:03:48 -0000 Received: from unknown (209.180.213.209) by p3plsmtpa08-03.prod.phx3.secureserver.net (173.201.193.104) with ESMTP; 12 Sep 2012 02:03:47 -0000 Date: Tue, 11 Sep 2012 19:03:47 -0700 From: Gary Kline To: Polytropon Message-ID: <20120912020347.GC10496@ethic.thought.org> References: <20120911213804.GA9817@ethic.thought.org> <20120912011443.5df17cf2.freebsd@edvax.de> <20120912002408.GA10496@ethic.thought.org> <20120912024854.1a79d0b3.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120912024854.1a79d0b3.freebsd@edvax.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Mailing List Subject: Re: cksum entire dir?? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 02:10:29 -0000 On Wed, Sep 12, 2012 at 02:48:54AM +0200, Polytropon wrote: > On Tue, 11 Sep 2012 17:24:08 -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 - | cksum > > > > > > But I also tried cksum directly with a directory > > > like > > > > > > % cksum > > > > > > 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/* > > That lets the shell expand * to the content of foodir, making > a final command line like "cksum foodir/file1 foodir/file2" > and so on. If you omit the /* part, the directory will be > checksummed entirely. If you then remove a file or change > it, a different checksum will be printed. At least that is > my interpretation of what I've tested. > > > > > if there isn't anything that can compare entire dirs, it looks like > > it's time to hack a small program. tx, polyt. > > The Midnight Commander has a function to compare directories > which will also identify _which_ files have changed (unlike > the command "cksum foodir" that will tell you _that_ a file > has been changed) and use the "mark file" function to highlight > those files. It can be accessed by putting one directory into > the left, the other one into the right panel, and then F9 C C > (or Ctrl-X D). You are then presented a selection: > > +---------------- Compare directories -----------------+ > | Select compare method: | > | | > | [ Quick ] [ Size only ] [ Thorough ] [ Cancel ] | > +------------------------------------------------------+ > > Quick = file names, Size only = file sizes, Thorough = file > content. > I'm not concerned about a file having been changed, just whether % cp -rp /home/klinebak/foodir /home/kline/ is 100% reliable. down to the bit! a friend has volunteered to take over my system admin chores. he left my drive fragmented and while I am going over /home/klinebak with extreme caution-- getting rid of dross while coping everything valid to my new /home/ dir. im hoping that the cp utility is flawless and/or that the drive to this duo/dual-CPU computer is good. I'm buying a new Dell 4-CPU new. Should have everything setup in a couple weeks. Oh, and in addition to klinebak, there are fragments of my backup systems all over the place. Higgsbo, give me strength! > > > -- > 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"