Re: cksum entire dir??

2012-09-12 Thread Matthew Seaman
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




signature.asc
Description: OpenPGP digital signature


Re: Swapped memory limited to about 500MB for a process ?

2012-09-12 Thread Mickaël Canévet
On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote:
 Mickaël Canévet cane...@embl.fr writes:
 
  I was impacted by a memory leak that has been fixed by this patch:
  http://people.freebsd.org/~rmacklem/namei-leak.patch
 
  What I noticed when the server was paging is that it seems that only
  about 500MB of my 4GB swap partition was used before crashing. I was
  wondering why it didn't take the whole 4GB up to the crash of the server
  because of lake of memory (that would let me more time to react).
 
  Is there such king of setting that prevent a process to put more then
  500MB of data in swap ?
 
 limits(1)?
 
Thank you for your answer.

Here is the result of limits:

limits
Resource limits (current):
  cputime  infinity secs
  filesize infinity kB
  datasize 33554432 kB
  stacksize  524288 kB
  coredumpsize infinity kB
  memoryuseinfinity kB
  memorylocked infinity kB
  maxprocesses 5547
  openfiles   11095
  sbsize   infinity bytes
  vmemoryuse   infinity kB
  pseudo-terminals infinity
  swapuse  infinity kB

swapuse is set to unlimited, but stacksize is set to 512MB.
Is it the stacksize setting that prevent my kernel to swap more then
512MB ?
If so, are there any side effect of raising the stack (except exhaust
the swap space on the system) to give me more time to react by
restarting NFS or export/import Zpools for example in the case of NAMEI
memory leak before the kernel crashes ?

Thanks,
Mickaël


signature.asc
Description: This is a digitally signed message part


Re: cksum entire dir??

2012-09-12 Thread Jonathan McKeown
On Wednesday 12 September 2012 08:31:45 Matthew Seaman wrote:
 On 12/09/2012 00:14, Polytropon wrote:
  % cksum directory
[snip]

 That will give you a checksum on the directory inode -- file names and
 associated metadata only, not file content.
[snip]
 Generally I find the best test for differences between old and new
 copies of a filesystem is 'rsync -avx -n ...'

Wouldn't suitable applications of mtree(8) also do what's wanted?

Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Matthew Seaman
On 09/12/12 08:12, Jonathan McKeown wrote:
 Generally I find the best test for differences between old and new
  copies of a filesystem is 'rsync -avx -n ...'

 Wouldn't suitable applications of mtree(8) also do what's wanted?

TIMTOWTDI.

Cheers,

Matthew


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: svn and/or portsnap

2012-09-12 Thread Thomas Mueller

Regarding my question,

How do you get the ports tree or svn in that case if not using portsnap?

Helmut Schneider had two suggestions:

 You install ports from CD/DVD. Or use pkg_add -r subversion. :)

 ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/

I guess I could use the latter and then build subversion among other ports, 
then subsequently switch to svn.

This would also work, I would guess, if ports tree is installed by bsdinstall 
or sysinstall.

Question arises whether the ports tree as downloaded in tarball by ftp would be 
compatible/in sync with portsnap or svn.

If in any doubt, either delete /usr/ports/* or move to /usr/ports-by-ftp and 
then restart fresh with svn.

I noticed the FreeBSD Handbook ports section was not up-to-date on the use of 
subversion with the ports tree.

Maybe with subversion now being elevated in importance for updating system 
source code and ports tree, it could become part of the base system.

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


NFSv4 mounts succeed on 8.2, but fail on 8.3

2012-09-12 Thread Thomas Hager

hi,

i'm trying to mount some NFSv4 shares served by a Solaris 10 server on  
our FreeBSD boxes. On FreeBSD 8.2, the mounts succeeded after  
explicitly specifying the resvport mount option (the Solaris NFSd  
refuses requests from unprivileged ports).


On 8.3, mount requests are denied no matter what option i specify. The  
server always complains about the client issuing requests from an  
unprivileged port.


is mount_nfs no longer honoring the resvport option in 8.3?
anything else i might be missing?

tia,
tom.

--
Thomas Duke Hager   d...@sigsegv.at
GPG: 2048R/791C5EB1http://www.sigsegv.at/gpg/duke.gpg
=
Never Underestimate the Power of Stupid People in Large Groups.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Binding IP adress to opensmtpd

2012-09-12 Thread Ruben de Groot
On Mon, Sep 10, 2012 at 01:20:47PM +, C. L. Martinez typed:
 On Mon, Sep 10, 2012 at 10:59 AM, Ruben de Groot mai...@bzerk.org wrote:
  On Sat, Sep 08, 2012 at 08:10:51PM +0200, carlopmart typed:
  Hi all,
 
   I have installed opensmtpd on my FreeBSD 8.3. All works ok, except I
  can't bind smtpd to specific IP address ... In this box, I am using 3 ip
  aliases, but smtpd sends all emails using the first IP.
 
   Is it possible to configure this?? I have tried to fix with hostname
  option, without result ...
 
  You could run smtpd inside a jail(8) with that IP address.
 
  --
 
 Yes it is an option, but too fat option ... This is a vm under ESXi
 with only 512 MB RAM ...

What do you mean, fat? You can jail only the smtpd process, using the
same / for root filesystem. Something like

jail / hostname specific IP /path/to/smtpd

instead of your normal startup command. This is as lean and mean as it gets.

Ruben

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Swapped memory limited to about 500MB for a process ?

2012-09-12 Thread Lowell Gilbert
Mickaël Canévet cane...@embl.fr writes:

 On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote:
 Mickaël Canévet cane...@embl.fr writes:
 
  I was impacted by a memory leak that has been fixed by this patch:
  http://people.freebsd.org/~rmacklem/namei-leak.patch
 
  What I noticed when the server was paging is that it seems that only
  about 500MB of my 4GB swap partition was used before crashing. I was
  wondering why it didn't take the whole 4GB up to the crash of the server
  because of lake of memory (that would let me more time to react).
 
  Is there such king of setting that prevent a process to put more then
  500MB of data in swap ?
 
 limits(1)?
 
 Thank you for your answer.

 Here is the result of limits:

 limits
 Resource limits (current):
   cputime  infinity secs
   filesize infinity kB
   datasize 33554432 kB
   stacksize  524288 kB
   coredumpsize infinity kB
   memoryuseinfinity kB
   memorylocked infinity kB
   maxprocesses 5547
   openfiles   11095
   sbsize   infinity bytes
   vmemoryuse   infinity kB
   pseudo-terminals infinity
   swapuse  infinity kB

 swapuse is set to unlimited, but stacksize is set to 512MB.
 Is it the stacksize setting that prevent my kernel to swap more then
 512MB ?

No, I don't think so. datasize was the parameter I was most
suspecting; and it assumes that a particular process was causing the
crash (which is unlikely; the OS is supposed to protect you against
it). 

Most likely, the crash was not directly caused by a shortage of virtual
memory. You would have to diagnose through crash dumps, but it could be
that some more specific resource was exhausted. Or perhaps the memory
leak left dangling references in a vnode.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Swapped memory limited to about 500MB for a process ?

2012-09-12 Thread Lowell Gilbert
Mickaël Canévet cane...@embl.fr writes:

 On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote:
 Mickaël Canévet cane...@embl.fr writes:
 
  I was impacted by a memory leak that has been fixed by this patch:
  http://people.freebsd.org/~rmacklem/namei-leak.patch
 
  What I noticed when the server was paging is that it seems that only
  about 500MB of my 4GB swap partition was used before crashing. I was
  wondering why it didn't take the whole 4GB up to the crash of the server
  because of lake of memory (that would let me more time to react).
 
  Is there such king of setting that prevent a process to put more then
  500MB of data in swap ?
 
 limits(1)?
 
 Thank you for your answer.

 Here is the result of limits:

 limits
 Resource limits (current):
   cputime  infinity secs
   filesize infinity kB
   datasize 33554432 kB
   stacksize  524288 kB
   coredumpsize infinity kB
   memoryuseinfinity kB
   memorylocked infinity kB
   maxprocesses 5547
   openfiles   11095
   sbsize   infinity bytes
   vmemoryuse   infinity kB
   pseudo-terminals infinity
   swapuse  infinity kB

 swapuse is set to unlimited, but stacksize is set to 512MB.
 Is it the stacksize setting that prevent my kernel to swap more then
 512MB ?

No, I don't think so. datasize was the parameter I was most
suspecting; and it assumes that a particular process was causing the
crash (which is unlikely; the OS is supposed to protect you against
it). 

Most likely, the crash was not directly caused by a shortage of virtual
memory. You would have to diagnose through crash dumps, but it could be
that some more specific resource was exhausted. Or perhaps the memory
leak left dangling references in a vnode.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Swapped memory limited to about 500MB for a process ?

2012-09-12 Thread Mickaël Canévet
On Wed, 2012-09-12 at 10:03 -0400, Lowell Gilbert wrote:
 Mickaël Canévet cane...@embl.fr writes:
 
  On Tue, 2012-09-11 at 13:05 -0400, Lowell Gilbert wrote:
  Mickaël Canévet cane...@embl.fr writes:
  
   I was impacted by a memory leak that has been fixed by this patch:
   http://people.freebsd.org/~rmacklem/namei-leak.patch
  
   What I noticed when the server was paging is that it seems that only
   about 500MB of my 4GB swap partition was used before crashing. I was
   wondering why it didn't take the whole 4GB up to the crash of the server
   because of lake of memory (that would let me more time to react).
  
   Is there such king of setting that prevent a process to put more then
   500MB of data in swap ?
  
  limits(1)?
  
  Thank you for your answer.
 
  Here is the result of limits:
 
  limits
  Resource limits (current):
cputime  infinity secs
filesize infinity kB
datasize 33554432 kB
stacksize  524288 kB
coredumpsize infinity kB
memoryuseinfinity kB
memorylocked infinity kB
maxprocesses 5547
openfiles   11095
sbsize   infinity bytes
vmemoryuse   infinity kB
pseudo-terminals infinity
swapuse  infinity kB
 
  swapuse is set to unlimited, but stacksize is set to 512MB.
  Is it the stacksize setting that prevent my kernel to swap more then
  512MB ?
 
 No, I don't think so. datasize was the parameter I was most
 suspecting; and it assumes that a particular process was causing the
 crash (which is unlikely; the OS is supposed to protect you against
 it). 
 
 Most likely, the crash was not directly caused by a shortage of virtual
 memory. You would have to diagnose through crash dumps, but it could be
 that some more specific resource was exhausted. Or perhaps the memory
 leak left dangling references in a vnode.
 

OK,

Thanks a lot for your explanations.

Cheers,
Mickaël


signature.asc
Description: This is a digitally signed message part


Re: cksum entire dir??

2012-09-12 Thread Waitman Gobble
On Sep 11, 2012 10:10 PM, Gary Kline kl...@thought.org wrote:

 On Tue, Sep 11, 2012 at 09:18:13PM -0400, kpn...@pobox.com wrote:
  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:
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.
 
   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.
 
  Unix was originally created to do text manipulation. No need for a new
  program when you can do it from the command line.
 
  cd dir1 ; cksum * | sort  /tmp/dir1-cksum
  cd dir2 ; cksum * | sort  /tmp/dir2-cksum
 
  diff /tmp/dir?-cksum
 
  Don't forget to remove temporary files when you are done.
 
  Other useful commands:
  cut
  paste
 
  You can use awk to pull out and rearrange columns:
  cksum * | awk '{ print $3, $1, $2; }' | sort
 
  This gives you a little easier diff in case you do have changes.
 
  Friendly tip: if you did comparisons by hand for 12 hours then you
  may have missed something.


 no, it was several other tasks that I had t  o do very carefully
 by hand.  I was going to write an awk script.  I figured there
 were others ways.

 my desktop is a flavor of linux that i don't  know.  it seems to
be
 lacking in many common unix binaries; md5 is one that I spent
 an hour checking.  zero.

 your first way works very well and will serve.   many thanks.
 now I can listen to:

 /Lectures on the Critique of Pure Reason

 which is now safely in my home directory in several mp3 files.

 
  It's a real shame Unix doesn't have a really good tool for comparing
  two directory trees. You can use 'diff -r' (even on binaries), but that
  fails if you have devices, named pipes, or named sockets in the
  filesystem. And diff or cksum don't tell you if symlinks are different.
  Plus you may care about file ownership, and that's where the stat
  command comes in handy.


 right.  these are things you only discover the hard way.
 
  Not that I'm volunteering, mind you. I ended up instead writing a
  Python script to do copies of filesystems off of old machines I'm
  putting to pasture. It's amazing how badly old versions of dump and
  tar behave.


 REmember CP/M and MP/M?  I started out with a dual 8085/80888 box
 with MP/Mand wrote notes and letters that were stored on 8
 twin floppies.  circa mid-1980's I transferred a boatload of
floppies
 onto my 386 with SVR2 with uucp and others C programs on the 8088
box.
 it took forever and things keep faulting, but I got it done.
 eventually.

 

oh yeah, I remember the Kaypro «portable» which was as big as a sampsonite,
and despite being built like a tank probably couldn't handle a wrangling by
a gorilla.

Waitman Gobble
San Jose California



 --
  Kevin P. Nealhttp://www.pobox.com/~kpn/
 
 I like being on The Daily Show. - Kermit the Frog, Feb 13 2001
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 07:31:45AM +0100, Matthew Seaman wrote:
 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.
 

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.

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: di...@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 kl...@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-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Waitman Gobble
On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org wrote:

 On Wed, Sep 12, 2012 at 07:31:45AM +0100, Matthew Seaman wrote:
  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.
 

 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: di...@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 kl...@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 

Re: cksum entire dir??

2012-09-12 Thread Karl Vogel
 On Tue, 11 Sep 2012 14:38:04 -0700, Gary Kline wrote:

G I'm trying to checksum directories as I move them around.  ive read the
G man page for sum and cksum ... or maybe skimmed them.  no joy.  anybody
G know of a utility to do this?  I've got files that are decades old...

   I wouldn't use CRC32 to check file integrity; use SHA1 or MD5 at the
   very least.  See http://home.comcast.net/~bretm/hash/8.html for details.

 On Tue, 11 Sep 2012 18:17:25 -0700, 
 Colin Barnabas colin.barna...@gmail.com replied:

   Are you by any chance a Dark Shadows fan?

C This works for me:
C $ find foo/ -type f -print0 | xargs -0 md5  foo.md5

   I do something similar when copying files to a backup server; it's not
   unheard of for SSH to drop a session or a drive to have a bad spot.

   An easy-to-automate way is: get a list of files, use the hash of your
   choice to generate signatures, sort the signature file by the hash, and
   then get the hash value of the signature file.  Here's an example using
   my bin directory:

 me% ls
 aline   dir histmakecfg mx  ro
 authlog diskusedisodate makekey mylook  setperm
 avg dline   kernlog makepassn32 sha
 buildenvdnslog  lastdom mb  n64 sshlog
 cline   dosrc   linkdupsmd5path nr  sulog
 cmdlog  dot ll  memuse  ntplog  syslog
 conlog  dp  lsl mgrep   pathinfotc
 coref   lslmmk  pingtcv
 cronlog fixhist lsn mkdtree plogtl
 daemonlog   fmt lsnmmkproto pwgen   tr0
 dblog   getperm lss mkrcs   r   tx
 dbrun   google  lssmmongolograndvi
 dh  haval   lst month   range   zp
 dig help2manlstmmv2inode
 
 me% find . -type f -print0 | xargs -0 md5 -r | sort  /tmp/dir.md5
 
 me% cat /tmp/dir.md5
 01328aeb4fd0eb3d998f4d7ad407a73f ./setperm
 017d6d622fb93bf7f23c0fb7b96b16eb ./core
 0287839688bd660676582266685b05bd ./mkrcs
 0b97494883c76da546e3603d1b65e7b2 ./pwgen
 ...
 ddbed53e795724e4a6683e7b0987284c ./authlog
 ddbed53e795724e4a6683e7b0987284c ./cmdlog
 ddbed53e795724e4a6683e7b0987284c ./conlog
 ddbed53e795724e4a6683e7b0987284c ./cronlog
 ddbed53e795724e4a6683e7b0987284c ./daemonlog
 ddbed53e795724e4a6683e7b0987284c ./kernlog
 ddbed53e795724e4a6683e7b0987284c ./ntplog
 ddbed53e795724e4a6683e7b0987284c ./sulog
 ddbed53e795724e4a6683e7b0987284c ./syslog
 ...
 fdff1fd84d47f76dbd4954c607d66714 ./dbrun
 ff5e24efec5cf1e17cf32c58e9c4b317 ./tr0

   The *log files are hard-linked, hence the duplicate MD5 values.
 
 me% md5 -r /tmp/dir.md5
 fdc34a5a5df7807d4fc45739d2d3039f /tmp/dir.md5

   If I copy these files elsewhere, I can repeat the steps and just compare
   the final hash; if it's anything other than 'fdc34...3039f', something's
   wrong.

-- 
Karl Vogel  I don't speak for the USAF or my company

When In Doubt, Empty The Magazine--bumper-sticker seen on military base
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Mike Jeays
On Wed, 12 Sep 2012 10:55:57 -0700
Waitman Gobble gobble...@gmail.com wrote:

 On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org wrote:
 
  On Wed, Sep 12, 2012 at 07:31:45AM +0100, Matthew Seaman wrote:
   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.
  
 
  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: di...@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 kl...@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 

LSI 9750-4i (tws based cards)

2012-09-12 Thread Mike Tancsa
Does anyone have any experience with these cards ? We are looking for a
controller that has a little more gas than the twa based cards which
have been very reliable and stable for us on FreeBSD.  I dont have any
experience with 3ware/LSI's cards that use the tws driver.  Has anyone
used them yet  ?

---Mike
-- 
---
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 09:12:58AM +0200, Jonathan McKeown wrote:
 On Wednesday 12 September 2012 08:31:45 Matthew Seaman wrote:
  On 12/09/2012 00:14, Polytropon wrote:
 % cksum directory
 [snip]
 
  That will give you a checksum on the directory inode -- file names and
  associated metadata only, not file content.
 [snip]
  Generally I find the best test for differences between old and new
  copies of a filesystem is 'rsync -avx -n ...'
 
 Wouldn't suitable applications of mtree(8) also do what's wanted?
 
 Jonathan
 ___

how, with mtree, could I tell  whether dir1 == dir2 or not?

gary


 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 10:55:57AM -0700, Waitman Gobble wrote:
 On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org wrote:
 
  On Wed, Sep 12, 2012 at 07:31:45AM +0100, Matthew Seaman wrote:
   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.
  
 
  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
 

yup, you be right.  altho we have no md5 [[does FBSD?]], fedora 
does have md5sum.  makes me wonder why this flavor didnt do at least a
symlink.   oh well.

thankee much.

[[ 
axeing to save BW
]]


 
   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-unsubscr...@freebsd.org
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Waitman Gobble
On Wed, Sep 12, 2012 at 2:47 PM, Gary Kline kl...@thought.org wrote:

 On Wed, Sep 12, 2012 at 10:55:57AM -0700, Waitman Gobble wrote:
  On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org wrote:
 
   On Wed, Sep 12, 2012 at 07:31:45AM +0100, Matthew Seaman wrote:
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.
   
  
   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
 

 yup, you be right.  altho we have no md5 [[does FBSD?]], fedora
 does have md5sum.  makes me wonder why this flavor didnt do at
 least a
 symlink.   oh well.

 thankee much.

 [[
 axeing to save BW
 ]]


 
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-unsubscr...@freebsd.org
  



cat /usr/src/sbin/md5
/*
 * Derived from:
 *
 * MDDRIVER.C - test driver for MD2, MD4 and MD5
 */

/*
 *  Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
 *  rights reserved.
 *
 *  RSA Data Security, Inc. makes no representations concerning either
 *  the merchantability of this software or the suitability of this
 *  software for any particular purpose. It is provided as is
 *  without express or implied warranty of any kind.
 *
 *  These notices must be retained in any copies of any part of this
 *  documentation and/or software.
 */



on my fedora machine, md5sum is from GNU coreutils (on FreeBSD this is in
ports/sysutils/coreutils)

FreeBSD
$ md5 messages
MD5 (messages) = cfbeddecf1a699471c8135a331aac589

Fedora
# md5sum messages
ece159dd0b47c7a7592ceb036745a474  messages


if you gotta have md5.c, could probably pull the src and build on fedora or
maybe something like http://www.efgh.com/software/md5.htm

Waitman Gobble
San Jose California
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 02:11:05PM -0400, Karl Vogel wrote:
  On Tue, 11 Sep 2012 14:38:04 -0700, Gary Kline wrote:
 
 G I'm trying to checksum directories as I move them around.  ive read the
 G man page for sum and cksum ... or maybe skimmed them.  no joy.  anybody
 G know of a utility to do this?  I've got files that are decades old...
 
I wouldn't use CRC32 to check file integrity; use SHA1 or MD5 at the
very least.  See http://home.comcast.net/~bretm/hash/8.html for details.


[root@ethos klinebak]# yum install sha1
Loaded plugins: langpacks, presto, refresh-packagekit
adobe-linux-x86_64   |  951 B 00:00 
rpmfusion-free-updates   | 3.3 kB 00:00 
rpmfusion-nonfree-updates| 3.3 kB 00:00 
updates/metalink |  18 kB 00:00 
No package sha1 available.
Error: Nothing to do
[root@ethos klinebak]# 

see, nothing; I tried to install sha256 as  well. zip.  but md5sum
I have, so that will serve.

 
  On Tue, 11 Sep 2012 18:17:25 -0700, 
  Colin Barnabas colin.barna...@gmail.com replied:
 
Are you by any chance a Dark Shadows fan?


I havent a clue what that is; if it's a tv show, no.  
same w/ movies.

 
 C This works for me:
 C $ find foo/ -type f -print0 | xargs -0 md5  foo.md5
 
I do something similar when copying files to a backup server; it's not
unheard of for SSH to drop a session or a drive to have a bad spot.
 
An easy-to-automate way is: get a list of files, use the hash of your
choice to generate signatures, sort the signature file by the hash, and
then get the hash value of the signature file.  Here's an example using
my bin directory:
 
  me% ls
  aline   dir histmakecfg mx  ro
  authlog diskusedisodate makekey mylook  setperm
  avg dline   kernlog makepassn32 sha
  buildenvdnslog  lastdom mb  n64 sshlog
  cline   dosrc   linkdupsmd5path nr  sulog
  cmdlog  dot ll  memuse  ntplog  syslog
  conlog  dp  lsl mgrep   pathinfotc
  coref   lslmmk  pingtcv
  cronlog fixhist lsn mkdtree plogtl
  daemonlog   fmt lsnmmkproto pwgen   tr0
  dblog   getperm lss mkrcs   r   tx
  dbrun   google  lssmmongolograndvi
  dh  haval   lst month   range   zp
  dig help2manlstmmv2inode
  
  me% find . -type f -print0 | xargs -0 md5 -r | sort  /tmp/dir.md5
  
  me% cat /tmp/dir.md5
  01328aeb4fd0eb3d998f4d7ad407a73f ./setperm
  017d6d622fb93bf7f23c0fb7b96b16eb ./core
  0287839688bd660676582266685b05bd ./mkrcs
  0b97494883c76da546e3603d1b65e7b2 ./pwgen
  ...
  ddbed53e795724e4a6683e7b0987284c ./authlog
  ddbed53e795724e4a6683e7b0987284c ./cmdlog
  ddbed53e795724e4a6683e7b0987284c ./conlog
  ddbed53e795724e4a6683e7b0987284c ./cronlog
  ddbed53e795724e4a6683e7b0987284c ./daemonlog
  ddbed53e795724e4a6683e7b0987284c ./kernlog
  ddbed53e795724e4a6683e7b0987284c ./ntplog
  ddbed53e795724e4a6683e7b0987284c ./sulog
  ddbed53e795724e4a6683e7b0987284c ./syslog
  ...
  fdff1fd84d47f76dbd4954c607d66714 ./dbrun
  ff5e24efec5cf1e17cf32c58e9c4b317 ./tr0
 
The *log files are hard-linked, hence the duplicate MD5 values.
  

right.


  me% md5 -r /tmp/dir.md5
  fdc34a5a5df7807d4fc45739d2d3039f /tmp/dir.md5
 
If I copy these files elsewhere, I can repeat the steps and just compare
the final hash; if it's anything other than 'fdc34...3039f', something's
wrong.


well, the full story is my new system admin left my desktop 3/4 or 7/8
or 15/16ths in shardes.  I have to-be-made-whole files/dirs in
/home/kline.  copies from two primary computers are scattered all
over.  I/  it won't be the-end if I lose a few favorite songs, but 
I  wantto make certain that my devel and journal and writing dirs 
and a few others are md5sum flawless. 

thanks for youw howto across machines, karl.  I'll save this in my
howto file.  my present desktop is temp; I'll turn it into a server
---just-in-case.  then will use my server for backups.  gotta 
match up.

 
 -- 
 Karl Vogel  I don't speak for the USAF or my company
 
 When In Doubt, Empty The Magazine--bumper-sticker seen on military base
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail 

Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 02:31:16PM -0400, Mike Jeays wrote:
 On Wed, 12 Sep 2012 10:55:57 -0700
 Waitman Gobble gobble...@gmail.com wrote:
 
  On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org wrote:
  
[[ ...]]
 
 My Linux system has both md5sum and md5deep. They give the same result, 
 except that md5sum quotes the file name in the current directory, and md5deep 
 gives the fully-qualified name. I have been using md5deep - I didn't know 
 md5sum existed.

I did a yum install md5* and got deep! :_)

t.y

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Installation Logs for FreeBSD 8.x?

2012-09-12 Thread Rick Miller
Hi All,

Is it possible to write FreeBSD 8.x installation logs onto a resulting
FreeBSD 8.x host via sysinstall or some scripting method?  I am
interested in output one sees during a normal installation plus any
warning/error conditions.  Ideally, this information will end up on
the installed host in a directory within /var.  sysinstall docs don't
seem to explain any sort of facility to accomplish this.  Perhaps
there is someone out there who has done something similar that might
be able to share their knowledge?

-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread RW
On Wed, 12 Sep 2012 14:47:04 -0700
Gary Kline wrote:

 On Wed, Sep 12, 2012 at 10:55:57AM -0700, Waitman Gobble wrote:
 
  are you sure it's not 'md5sum' ? ... that seems to be on all my
  GNU/Linux machines.
  
  Waitman Gobble
  San Jose California USA
  
 
   yup, you be right.  altho we have no md5 [[does FBSD?]],
 fedora does have md5sum.  makes me wonder why this flavor didnt do at
 least a symlink.   oh well.

FreeBSD's md5 and GNU's md5sum don't behave the same. Specifically when
reading from stdin (as in a pipeline) md5 sensibly just outputs the hash
and a newline, whereas md5sum follows the hash with a - to indicate
stdin as the filename.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Waitman Gobble
On Wed, Sep 12, 2012 at 3:22 PM, Gary Kline kl...@thought.org wrote:

 On Wed, Sep 12, 2012 at 02:31:16PM -0400, Mike Jeays wrote:
  On Wed, 12 Sep 2012 10:55:57 -0700
  Waitman Gobble gobble...@gmail.com wrote:
 
   On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org
 wrote:
  
 [[ ...]]
 
  My Linux system has both md5sum and md5deep. They give the same result,
 except that md5sum quotes the file name in the current directory, and
 md5deep gives the fully-qualified name. I have been using md5deep - I
 didn't know md5sum existed.

 I did a yum install md5* and got deep! :_)

 t.y

  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org




also maybe??? of interest.. it's pretty quick  easy to hack the 'find'
function in /usr/src/usr.bin/find/ with md5 capability..
not sure if it's helpful..


copy /usr/src/usr.bin/find/ somewhere, then edit function.c,

#include md5.h

int
f_print(PLAN *plan __unused, FTSENT *entry)
{
char * md5sum[32];
(void)printf(%s ,MD5File(entry-fts_accpath,md5sum));
(void)puts(entry-fts_path);
return 1;
}


and edit Makefile (change exec name,

PROG=   md5find
LDADD+= -lmd

then make..

run it:

./md5find .
224df9d178aa35cb532664ea37875791 .
bfe464b3ac942e85d8b818a9441e2286 ./find.o
0fc28847bb344166ff0f7f4c12d6e4ed ./Makefile
beb4c49ba914f62da0b57b16778c1772 ./extern.h
8895f62adaa15b194dec6f15e4c5956b ./find.1
8d3986a5e8747ae89b3c5f82f22bc402 ./find.c
99fade54bb9baf0d3b4d8822d53800b3 ./find.h
23f43527a2bdc3abf1e8eaa1aca68f26 ./function.c
1d25eb09d42261b28cc783a6b48e39ac ./getdate.y
fce6f5ec314eaea09170b79a0711d07e ./ls.c
75d64926376a5440b7e23b295417a6cc ./main.c
2599f1f22d557b076ff1cde9b17cff55 ./misc.c
2c4e3bb00a37b839d9ac0dc0e12a88bc ./operator.c
3157efe1ed3821e96fec71f1ca4b2306 ./option.c
7ea8adb4cb549b118b903238f43afd37 ./function.o
12f6a75a82f817e1306c323fdddbff59 ./ls.o
e97d015d2e5fbeb3fdff4fa22b76f0e2 ./main.o
2a5100f2c5ed4c9408ab51d6e2a848cc ./misc.o
6360e963e0f285fe3dc170309a2ae219 ./operator.o
68c47f622cb1d4d8f58ff7b2ef2c8312 ./option.o
47a8978565c6cb8b0280c231679847ba ./getdate.c
7eb3a4e4984e4696347501eeba2e0566 ./getdate.o
e406e4422cf29f3b42484596524b71c1 ./find
e3ea95347aa5efd7030103536c23a8d3 ./find.1.gz
4b1fd4eb69577f53bd97d8cd2159c8eb ./md5find
03d161fcb84fb38aad6ccd8ce0cafeaf ./testdir
8d3986a5e8747ae89b3c5f82f22bc402 ./testdir/find.c


etc

Waitman Gobble
San Jose California
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 11:39:46PM +0100, RW wrote:
 On Wed, 12 Sep 2012 14:47:04 -0700
 Gary Kline wrote:
 
  On Wed, Sep 12, 2012 at 10:55:57AM -0700, Waitman Gobble wrote:
  
   are you sure it's not 'md5sum' ? ... that seems to be on all my
   GNU/Linux machines.
   
   Waitman Gobble
   San Jose California USA
   
  
  yup, you be right.  altho we have no md5 [[does FBSD?]],
  fedora does have md5sum.  makes me wonder why this flavor didnt do at
  least a symlink.   oh well.
 
 FreeBSD's md5 and GNU's md5sum don't behave the same. Specifically when
 reading from stdin (as in a pipeline) md5 sensibly just outputs the hash
 and a newline, whereas md5sum follows the hash with a - to indicate
 stdin as the filename.
o


ah shit.  well, I spent at least ten years porting stuff--everything
F'ing thing...So I'll  have to find the md5 src and port it.

then follow karl's example.  and others'.  [[[ See, this is just one
example of taken proven code and adding something and breaking 
something ... ]]]


 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


How do I set number of retries in Firefox?

2012-09-12 Thread Dieter BSD
[ no response on mozilla@ list, trying questions@ ]

I have a problem with various parts of web pages stopping
before getting completely downloaded. Links has a useful retries
setting (setup-network options-retries) which seems to fix
this. I need a similar fix for firefox 3.6.2
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 03:58:00PM -0700, Waitman Gobble wrote:
 On Wed, Sep 12, 2012 at 3:22 PM, Gary Kline kl...@thought.org wrote:
 
  On Wed, Sep 12, 2012 at 02:31:16PM -0400, Mike Jeays wrote:
   On Wed, 12 Sep 2012 10:55:57 -0700
   Waitman Gobble gobble...@gmail.com wrote:
  
On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org
  wrote:
   
  [[ ...]]
  
   My Linux system has both md5sum and md5deep. They give the same result,
  except that md5sum quotes the file name in the current directory, and
  md5deep gives the fully-qualified name. I have been using md5deep - I
  didn't know md5sum existed.
 
  I did a yum install md5* and got deep! :_)
 
  t.y
 
   ___
   freebsd-questions@freebsd.org mailing list
   http://lists.freebsd.org/mailman/listinfo/freebsd-questions
   To unsubscribe, send any mail to 
  freebsd-questions-unsubscr...@freebsd.org
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to 
  freebsd-questions-unsubscr...@freebsd.org
 
 
 
 
 also maybe??? of interest.. it's pretty quick  easy to hack the 'find'
 function in /usr/src/usr.bin/find/ with md5 capability..
 not sure if it's helpful..
 
 
 copy /usr/src/usr.bin/find/ somewhere, then edit function.c,
 
 #include md5.h
 
 int
 f_print(PLAN *plan __unused, FTSENT *entry)
 {
 char * md5sum[32];
 (void)printf(%s ,MD5File(entry-fts_accpath,md5sum));
 (void)puts(entry-fts_path);
 return 1;
 }
 
 
 and edit Makefile (change exec name,
 
 PROG=   md5find
 LDADD+= -lmd
 
 then make..
 
 run it:
 
 ./md5find .
 224df9d178aa35cb532664ea37875791 .
 bfe464b3ac942e85d8b818a9441e2286 ./find.o
 0fc28847bb344166ff0f7f4c12d6e4ed ./Makefile
 beb4c49ba914f62da0b57b16778c1772 ./extern.h
 8895f62adaa15b194dec6f15e4c5956b ./find.1
 8d3986a5e8747ae89b3c5f82f22bc402 ./find.c
 99fade54bb9baf0d3b4d8822d53800b3 ./find.h
 23f43527a2bdc3abf1e8eaa1aca68f26 ./function.c
 1d25eb09d42261b28cc783a6b48e39ac ./getdate.y
 fce6f5ec314eaea09170b79a0711d07e ./ls.c
 75d64926376a5440b7e23b295417a6cc ./main.c
 2599f1f22d557b076ff1cde9b17cff55 ./misc.c
 2c4e3bb00a37b839d9ac0dc0e12a88bc ./operator.c
 3157efe1ed3821e96fec71f1ca4b2306 ./option.c
 7ea8adb4cb549b118b903238f43afd37 ./function.o
 12f6a75a82f817e1306c323fdddbff59 ./ls.o
 e97d015d2e5fbeb3fdff4fa22b76f0e2 ./main.o
 2a5100f2c5ed4c9408ab51d6e2a848cc ./misc.o
 6360e963e0f285fe3dc170309a2ae219 ./operator.o
 68c47f622cb1d4d8f58ff7b2ef2c8312 ./option.o
 47a8978565c6cb8b0280c231679847ba ./getdate.c
 7eb3a4e4984e4696347501eeba2e0566 ./getdate.o
 e406e4422cf29f3b42484596524b71c1 ./find
 e3ea95347aa5efd7030103536c23a8d3 ./find.1.gz
 4b1fd4eb69577f53bd97d8cd2159c8eb ./md5find
 03d161fcb84fb38aad6ccd8ce0cafeaf ./testdir
 8d3986a5e8747ae89b3c5f82f22bc402 ./testdir/find.c
 
 
 etc
 
 Waitman Gobble
 San Jose California
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
o
where, Sir, is the header?!

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Waitman Gobble
On Wed, Sep 12, 2012 at 5:32 PM, Gary Kline kl...@thought.org wrote:

 On Wed, Sep 12, 2012 at 03:58:00PM -0700, Waitman Gobble wrote:
  On Wed, Sep 12, 2012 at 3:22 PM, Gary Kline kl...@thought.org wrote:
 
   On Wed, Sep 12, 2012 at 02:31:16PM -0400, Mike Jeays wrote:
On Wed, 12 Sep 2012 10:55:57 -0700
Waitman Gobble gobble...@gmail.com wrote:
   
 On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org
   wrote:

   [[ ...]]
   
My Linux system has both md5sum and md5deep. They give the same
 result,
   except that md5sum quotes the file name in the current directory, and
   md5deep gives the fully-qualified name. I have been using md5deep - I
   didn't know md5sum existed.
  
   I did a yum install md5* and got deep! :_)
  
   t.y
  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
   freebsd-questions-unsubscr...@freebsd.org
   ___
   freebsd-questions@freebsd.org mailing list
   http://lists.freebsd.org/mailman/listinfo/freebsd-questions
   To unsubscribe, send any mail to 
   freebsd-questions-unsubscr...@freebsd.org
  
 
 
 
  also maybe??? of interest.. it's pretty quick  easy to hack the 'find'
  function in /usr/src/usr.bin/find/ with md5 capability..
  not sure if it's helpful..
 
 
  copy /usr/src/usr.bin/find/ somewhere, then edit function.c,
 
  #include md5.h
 
  int
  f_print(PLAN *plan __unused, FTSENT *entry)
  {
  char * md5sum[32];
  (void)printf(%s ,MD5File(entry-fts_accpath,md5sum));
  (void)puts(entry-fts_path);
  return 1;
  }
 
 
  and edit Makefile (change exec name,
 
  PROG=   md5find
  LDADD+= -lmd
 
  then make..
 
  run it:
 
  ./md5find .
  224df9d178aa35cb532664ea37875791 .
  bfe464b3ac942e85d8b818a9441e2286 ./find.o
  0fc28847bb344166ff0f7f4c12d6e4ed ./Makefile
  beb4c49ba914f62da0b57b16778c1772 ./extern.h
  8895f62adaa15b194dec6f15e4c5956b ./find.1
  8d3986a5e8747ae89b3c5f82f22bc402 ./find.c
  99fade54bb9baf0d3b4d8822d53800b3 ./find.h
  23f43527a2bdc3abf1e8eaa1aca68f26 ./function.c
  1d25eb09d42261b28cc783a6b48e39ac ./getdate.y
  fce6f5ec314eaea09170b79a0711d07e ./ls.c
  75d64926376a5440b7e23b295417a6cc ./main.c
  2599f1f22d557b076ff1cde9b17cff55 ./misc.c
  2c4e3bb00a37b839d9ac0dc0e12a88bc ./operator.c
  3157efe1ed3821e96fec71f1ca4b2306 ./option.c
  7ea8adb4cb549b118b903238f43afd37 ./function.o
  12f6a75a82f817e1306c323fdddbff59 ./ls.o
  e97d015d2e5fbeb3fdff4fa22b76f0e2 ./main.o
  2a5100f2c5ed4c9408ab51d6e2a848cc ./misc.o
  6360e963e0f285fe3dc170309a2ae219 ./operator.o
  68c47f622cb1d4d8f58ff7b2ef2c8312 ./option.o
  47a8978565c6cb8b0280c231679847ba ./getdate.c
  7eb3a4e4984e4696347501eeba2e0566 ./getdate.o
  e406e4422cf29f3b42484596524b71c1 ./find
  e3ea95347aa5efd7030103536c23a8d3 ./find.1.gz
  4b1fd4eb69577f53bd97d8cd2159c8eb ./md5find
  03d161fcb84fb38aad6ccd8ce0cafeaf ./testdir
  8d3986a5e8747ae89b3c5f82f22bc402 ./testdir/find.c
 
 
  etc
 
  Waitman Gobble
  San Jose California
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org
 o
 where, Sir, is the header?!

 which header?

this example I just copied /usr/src/usr.bin/find/ (entire directory
contents) to my home directory then added.

#include md5.h to the top of function.c (with the other includes, order
/may/ matter.. i did after the sys/ includes but before the others)

md5.h is in /usr/include, it's basically a wrapper around
/usr/include/sys/md5.h


then changed the function int f_print, added two lines
char * md5sum[32];
(void)printf(%s ,MD5File(entry-fts_accpath,md5sum));

then changed the two lines in Makefile, PROGNAME so i don't end up with
'find' executable and the other is -lmd so i get the library with md5
routines.

I think maybe I wasn't clear that i was editing function.c, and that there
is more to function.c than my example code.

I can put the source on git if you want, but it's pretty basic. Also i'd
have to research the second parameter in MD5File function, i don't actually
think that's what i thought it was. it is returning the correct hash, and
printing it out, as returned from the function.

Waitman Gobble
San Jose California
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Robert Bonomi

 Date: Wed, 12 Sep 2012 14:47:04 -0700
 From: Gary Kline kl...@thought.org
 Subject: Re: cksum entire dir??

 On Wed, Sep 12, 2012 at 10:55:57AM -0700, Waitman Gobble wrote:
 
[sneck]
 
  are you sure it's not 'md5sum' ? ... that seems to be on all my 
  GNU/Linux machines.
 

  yup, you be right.  altho we have no md5 [[does FBSD?]], fedora does 
  have md5sum.  makes me wonder why this flavor didnt do at least a 
  symlink.   oh well.

to find out what you do have, try 'apropos'.
e.g.
   apropos checksum
   apropos md5
   apropos sha
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 05:42:43PM -0700, Waitman Gobble wrote:
 On Wed, Sep 12, 2012 at 5:32 PM, Gary Kline kl...@thought.org wrote:
 
  On Wed, Sep 12, 2012 at 03:58:00PM -0700, Waitman Gobble wrote:
   On Wed, Sep 12, 2012 at 3:22 PM, Gary Kline kl...@thought.org wrote:
  
On Wed, Sep 12, 2012 at 02:31:16PM -0400, Mike Jeays wrote:
 On Wed, 12 Sep 2012 10:55:57 -0700
 Waitman Gobble gobble...@gmail.com wrote:

  On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline kl...@thought.org
wrote:
 
[[ ...]]

 My Linux system has both md5sum and md5deep. They give the same
  result,
except that md5sum quotes the file name in the current directory, and
md5deep gives the fully-qualified name. I have been using md5deep - I
didn't know md5sum existed.
   
I did a yum install md5* and got deep! :_)
   
t.y
   
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org
   
  
  
  
   also maybe??? of interest.. it's pretty quick  easy to hack the 'find'
   function in /usr/src/usr.bin/find/ with md5 capability..
   not sure if it's helpful..
  
  
   copy /usr/src/usr.bin/find/ somewhere, then edit function.c,
  
   #include md5.h
  
   int
   f_print(PLAN *plan __unused, FTSENT *entry)
   {
   char * md5sum[32];
   (void)printf(%s ,MD5File(entry-fts_accpath,md5sum));
   (void)puts(entry-fts_path);
   return 1;
   }
  
  
   and edit Makefile (change exec name,
  
   PROG=   md5find
   LDADD+= -lmd
  
   then make..
  
   run it:
  
   ./md5find .
   224df9d178aa35cb532664ea37875791 .
   bfe464b3ac942e85d8b818a9441e2286 ./find.o
   0fc28847bb344166ff0f7f4c12d6e4ed ./Makefile
   beb4c49ba914f62da0b57b16778c1772 ./extern.h
   8895f62adaa15b194dec6f15e4c5956b ./find.1
   8d3986a5e8747ae89b3c5f82f22bc402 ./find.c
   99fade54bb9baf0d3b4d8822d53800b3 ./find.h
   23f43527a2bdc3abf1e8eaa1aca68f26 ./function.c
   1d25eb09d42261b28cc783a6b48e39ac ./getdate.y
   fce6f5ec314eaea09170b79a0711d07e ./ls.c
   75d64926376a5440b7e23b295417a6cc ./main.c
   2599f1f22d557b076ff1cde9b17cff55 ./misc.c
   2c4e3bb00a37b839d9ac0dc0e12a88bc ./operator.c
   3157efe1ed3821e96fec71f1ca4b2306 ./option.c
   7ea8adb4cb549b118b903238f43afd37 ./function.o
   12f6a75a82f817e1306c323fdddbff59 ./ls.o
   e97d015d2e5fbeb3fdff4fa22b76f0e2 ./main.o
   2a5100f2c5ed4c9408ab51d6e2a848cc ./misc.o
   6360e963e0f285fe3dc170309a2ae219 ./operator.o
   68c47f622cb1d4d8f58ff7b2ef2c8312 ./option.o
   47a8978565c6cb8b0280c231679847ba ./getdate.c
   7eb3a4e4984e4696347501eeba2e0566 ./getdate.o
   e406e4422cf29f3b42484596524b71c1 ./find
   e3ea95347aa5efd7030103536c23a8d3 ./find.1.gz
   4b1fd4eb69577f53bd97d8cd2159c8eb ./md5find
   03d161fcb84fb38aad6ccd8ce0cafeaf ./testdir
   8d3986a5e8747ae89b3c5f82f22bc402 ./testdir/find.c
  
  
   etc
  
   Waitman Gobble
   San Jose California
   ___
   freebsd-questions@freebsd.org mailing list
   http://lists.freebsd.org/mailman/listinfo/freebsd-questions
   To unsubscribe, send any mail to 
  freebsd-questions-unsubscr...@freebsd.org
  o
  where, Sir, is the header?!
 
  which header?
 
 this example I just copied /usr/src/usr.bin/find/ (entire directory
 contents) to my home directory then added.
 
 #include md5.h to the top of function.c (with the other includes, order
 /may/ matter.. i did after the sys/ includes but before the others)
 
 md5.h is in /usr/include, it's basically a wrapper around
 /usr/include/sys/md5.h


sounds reasonable.  if you have this compiler on fedsora, I'd like to
see it for myself.  I think I have gcc* installed.

so, whenever you have time... .


 
 
 then changed the function int f_print, added two lines
 char * md5sum[32];
 (void)printf(%s ,MD5File(entry-fts_accpath,md5sum));
 
 then changed the two lines in Makefile, PROGNAME so i don't end up with
 'find' executable and the other is -lmd so i get the library with md5
 routines.
 
 I think maybe I wasn't clear that i was editing function.c, and that there
 is more to function.c than my example code.
 
 I can put the source on git if you want, but it's pretty basic. Also i'd
 have to research the second parameter in MD5File function, i don't actually
 think that's what i thought it was. it is returning the correct hash, and
 printing it out, as returned from the function.
 
 Waitman Gobble
 San Jose California
 ___
 freebsd-questions@freebsd.org mailing list
 

Re: cksum entire dir??

2012-09-12 Thread Gary Kline
On Wed, Sep 12, 2012 at 08:17:16PM -0500, Robert Bonomi wrote:
 
  Date: Wed, 12 Sep 2012 14:47:04 -0700
  From: Gary Kline kl...@thought.org
  Subject: Re: cksum entire dir??
 
  On Wed, Sep 12, 2012 at 10:55:57AM -0700, Waitman Gobble wrote:
  
 [sneck]
  
   are you sure it's not 'md5sum' ? ... that seems to be on all my 
   GNU/Linux machines.
  
 
   yup, you be right.  altho we have no md5 [[does FBSD?]], fedora does 
   have md5sum.  makes me wonder why this flavor didnt do at least a 
   symlink.   oh well.
 
 to find out what you do have, try 'apropos'.
 e.g.
apropos checksum
apropos md5
apropos sha


this was the second thing I did.  I have basically 
cksum and sum

on this fedora box.

oh, and now, md5sum.

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cksum entire dir??

2012-09-12 Thread Waitman Gobble
On Wed, Sep 12, 2012 at 8:08 PM, Gary Kline kl...@thought.org wrote:

 On Wed, Sep 12, 2012 at 05:42:43PM -0700, Waitman Gobble wrote:
  On Wed, Sep 12, 2012 at 5:32 PM, Gary Kline kl...@thought.org wrote:
 
   On Wed, Sep 12, 2012 at 03:58:00PM -0700, Waitman Gobble wrote:
On Wed, Sep 12, 2012 at 3:22 PM, Gary Kline kl...@thought.org
 wrote:
   
 On Wed, Sep 12, 2012 at 02:31:16PM -0400, Mike Jeays wrote:
  On Wed, 12 Sep 2012 10:55:57 -0700
  Waitman Gobble gobble...@gmail.com wrote:
 
   On Wed, Sep 12, 2012 at 10:46 AM, Gary Kline 
 kl...@thought.org
 wrote:
  
 [[ ...]]
 
  My Linux system has both md5sum and md5deep. They give the same
   result,
 except that md5sum quotes the file name in the current directory,
 and
 md5deep gives the fully-qualified name. I have been using md5deep
 - I
 didn't know md5sum existed.

 I did a yum install md5* and got deep! :_)

 t.y

  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

   
   
   
also maybe??? of interest.. it's pretty quick  easy to hack the
 'find'
function in /usr/src/usr.bin/find/ with md5 capability..
not sure if it's helpful..
   
   
copy /usr/src/usr.bin/find/ somewhere, then edit function.c,
   
#include md5.h
   
int
f_print(PLAN *plan __unused, FTSENT *entry)
{
char * md5sum[32];
(void)printf(%s ,MD5File(entry-fts_accpath,md5sum));
(void)puts(entry-fts_path);
return 1;
}
   
   
and edit Makefile (change exec name,
   
PROG=   md5find
LDADD+= -lmd
   
then make..
   
run it:
   
./md5find .
224df9d178aa35cb532664ea37875791 .
bfe464b3ac942e85d8b818a9441e2286 ./find.o
0fc28847bb344166ff0f7f4c12d6e4ed ./Makefile
beb4c49ba914f62da0b57b16778c1772 ./extern.h
8895f62adaa15b194dec6f15e4c5956b ./find.1
8d3986a5e8747ae89b3c5f82f22bc402 ./find.c
99fade54bb9baf0d3b4d8822d53800b3 ./find.h
23f43527a2bdc3abf1e8eaa1aca68f26 ./function.c
1d25eb09d42261b28cc783a6b48e39ac ./getdate.y
fce6f5ec314eaea09170b79a0711d07e ./ls.c
75d64926376a5440b7e23b295417a6cc ./main.c
2599f1f22d557b076ff1cde9b17cff55 ./misc.c
2c4e3bb00a37b839d9ac0dc0e12a88bc ./operator.c
3157efe1ed3821e96fec71f1ca4b2306 ./option.c
7ea8adb4cb549b118b903238f43afd37 ./function.o
12f6a75a82f817e1306c323fdddbff59 ./ls.o
e97d015d2e5fbeb3fdff4fa22b76f0e2 ./main.o
2a5100f2c5ed4c9408ab51d6e2a848cc ./misc.o
6360e963e0f285fe3dc170309a2ae219 ./operator.o
68c47f622cb1d4d8f58ff7b2ef2c8312 ./option.o
47a8978565c6cb8b0280c231679847ba ./getdate.c
7eb3a4e4984e4696347501eeba2e0566 ./getdate.o
e406e4422cf29f3b42484596524b71c1 ./find
e3ea95347aa5efd7030103536c23a8d3 ./find.1.gz
4b1fd4eb69577f53bd97d8cd2159c8eb ./md5find
03d161fcb84fb38aad6ccd8ce0cafeaf ./testdir
8d3986a5e8747ae89b3c5f82f22bc402 ./testdir/find.c
   
   
etc
   
Waitman Gobble
San Jose California
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
   freebsd-questions-unsubscr...@freebsd.org
   o
   where, Sir, is the header?!
  
   which header?
 
  this example I just copied /usr/src/usr.bin/find/ (entire directory
  contents) to my home directory then added.
 
  #include md5.h to the top of function.c (with the other includes, order
  /may/ matter.. i did after the sys/ includes but before the others)
 
  md5.h is in /usr/include, it's basically a wrapper around
  /usr/include/sys/md5.h


 sounds reasonable.  if you have this compiler on fedsora, I'd like
 to
 see it for myself.  I think I have gcc* installed.

 so, whenever you have time... .


I'm not sure it's a good use of time (?) considering, as someone mentioned
previously, mtree is already working. In the case of doing the find/md5
tinkering project on Fedora or other GNU/Linux distributions, it would
likely IMHO be best to use non-BSD, ie Liinux 'find' and 'md5' sources.

I do think mtree (already mentioned) is the best way to go You dump the
checksum, etc into a file and use the file to verify the other path.

 example:

$ mtree -K sha256digest,uname,gname -c -p .  structure.mtree

$ cat structure.mtree
#  user: waitman
#   machine: hunny.waitman.net
#  tree: /usr/home/waitman/find/find
#  date: Wed Sep 12 22:44:38