From owner-freebsd-questions@FreeBSD.ORG Wed Sep 12 17:56:05 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 749A5106564A; Wed, 12 Sep 2012 17:56:05 +0000 (UTC) (envelope-from gobble.wa@gmail.com) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id C736B8FC0C; Wed, 12 Sep 2012 17:56:04 +0000 (UTC) Received: by wgbfm10 with SMTP id fm10so2978056wgb.1 for ; Wed, 12 Sep 2012 10:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=K1QfVzFdxcbrZ4VoXri20bw1yU62iLSH96IlJ+x70Y8=; b=Zx0bgcZeqyMpeEl9hPm/H+eIGVuj+5cMR6ko8IN/t1som6KQmkkdkASe+snTqf3rsi LbuIFr+sgKGhKTiK6IePBUupbonw6jEGIbYKY8sdkRbxXO6iiMJ89kr49jrSMDvJlnZq SKNNggO7WmHBJcwdvnqa5KZB5Ql3cc8Izefh5RxhdoeYDvnUJpyhr5LfDc0hv1D+Ne/C GtziZ8uWWmoVKV5t5kY+fLUnqRBzV3gIExeRLNIUSESbvV0jr9A9gihzUXCcg7oAMFxb Ranwa2e6wHnfWDtT5OpbFX8CVpQTAgiJeFIWAPEJhsnpi+7fNQ1afk0cBOLsb7QAMTCd ilqA== MIME-Version: 1.0 Received: by 10.180.78.40 with SMTP id y8mr34398799wiw.7.1347472557957; Wed, 12 Sep 2012 10:55:57 -0700 (PDT) Received: by 10.216.183.2 with HTTP; Wed, 12 Sep 2012 10:55:57 -0700 (PDT) In-Reply-To: <20120912174625.GA17551@ethic.thought.org> References: <20120911213804.GA9817@ethic.thought.org> <20120912011443.5df17cf2.freebsd@edvax.de> <50502C51.5020601@FreeBSD.org> <20120912174625.GA17551@ethic.thought.org> Date: Wed, 12 Sep 2012 10:55:57 -0700 Message-ID: From: Waitman Gobble To: Gary Kline Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Polytropon , Matthew Seaman , 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 17:56:05 -0000 On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline wrote: > On Wed, Sep 12, 2012 at 07:31:45AM +0100, Matthew Seaman wrote: > > On 12/09/2012 00:14, Polytropon wrote: > > > % cksum > > > > > > 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. > > > > So this sha256 is *real*?? I have no md5 on my "fedora" > that is on my desktop and m having trouble getting used to. > but the gentleman who recommened cpio was right on the money. > are you sure it's not 'md5sum' ? ... that seems to be on all my GNU/Linux machines. Waitman Gobble San Jose California USA > > note that I am loathe to spam this list with the following mail > from my > files in sept, 1988, but here it is. if I had only gr -r -w cpio > around in all my directories, I would have found this, sent to one > Dirm > Myers across the pond :: > > > === > > >From kline Sat Sep 5 11:52:20 1998 > Subject: lost mail file... > To: dirkm@buster.dhis.eu.org (Dirk Myers) > Date: Sat, 5 Sep 1998 11:52:20 -0700 (PDT) > Organization: <> thought.org: public access uNix in service... <> > X-Mailer: ELM [version 2.4ME+ PL32 (25)] > MIME-Version: 1.0 > Content-Type: text/plain; charset=US-ASCII > Content-Transfer-Encoding: 7bit > Content-Length: 2283 > Status: RO > > > Yesterday morning I began composing the next two Q's and A's > in my mailer. Last night in the wee hours there was a power > glitch and I lost the mail. > > Enclosed is the first//next Q/A. I'll send along another one > or two later today. One that I was playing around with *failed* > and I'm trying to figure out why. > > ----- > > How can I uise my FBSD floppy drive to copy files to it (in this case, > at work), and retrieve the files on my FBSD systtem at home. So far > I've only seen examples that used floppies with a filesystem on them. > Is there a simplr, more direct way? > > You can treat the 'raw' floppy device as if it is a tape drive, and > use typically UNIX tape tools to read/write, such as tar and cpio. > For instance, to copy the current directory onto a floppy to > take home at night: > > (put the floppy in the drive, and cd to the directory where > the files are; then ) > > % tar -cvf /dev/rfd0 . > > To read it when you get home: > > (put the floppy in the drive at home; and extract the tarball > wherever you want the files) > > % tar -xvf /dev/rfd0 > > The flags -c and -x indicate create and extract mode, the ``v'' > specifies verbose mode, and the ``f'' tells tar that the following > argument is the file or device that tar acts upon. Here, it is > the floppy devide. > > > With cpio: > > (chdir to the directory where the files are) > > % ls | cpio -oc > /dev/rfd0 > > To read a cpio archive from a tape drive: > > % cpio -icd < /dev/rfd0 > > > The flags -i and -o indicate copy-in or extract mode and > copy-out or create archive mode. The ``c'' tells cpio > to use the old, portablr ASCII archive format. And the > ``d'' flag tells cpio to create directories where necessary. > > Do a > > % man cpio > > for much greater detail on this utility. > > ----- > > There are another one or two of the simpler Q/A's and one or two > more involved. > > Then, for this month only, I want to write a paragraph or two > about who I am and where I'm coming from. Since you are sharing > the by-line you might want to consider this too. > > gary > > PS: Next month we get a break!! > > -- > Gary D. Kline kline@tao.thought.org Public service > uNix > > ==== > as you can see, this dealt with my olden tape drive. a 250meg > QIC drive, I think. but this was about the earliest reference > I could find re my use of cpio. there are others in my journal > dir that reference my running out of hard drive and using cpio > rather > that a straight cp -rp. [this was back when a 130meg drive was > Huge > and made me feel rick.] > > > > > Cheers, > > > > Matthew > > > > -- > > Dr Matthew J Seaman MA, D.Phil. > > PGP: http://www.infracaninophile.co.uk/pgpkey > > > > > > > _______________________________________________ > 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" >