Re: sha1summ of complete directory?

2009-07-20 Thread Chris Bannister
On Tue, Jul 07, 2009 at 12:37:37PM -0400, Scott Gifford wrote: > The purpose of the ls was to sort the filenames, but looking more > clostey, bash sorts them already. csh and ksh do the same, and > glob(3) sorts by default. I'm not sure if all shells do that or not, > but it seems that most do, a

Re: sha1summ of complete directory?

2009-07-16 Thread Boyd Stephen Smith Jr.
In <20090716151953.ge4...@wks0082.feds.uwaterloo.ca>, Eric Gerlach wrote: >On Wed, Jul 15, 2009 at 07:36:24AM -0700, Todd A. Jacobs wrote: >> On Mon, Jul 06, 2009 at 07:30:19PM -0500, Ron Johnson wrote: >> > How would one go about computing a *single* hash value for a complete >> > directory tree?

Re: sha1summ of complete directory?

2009-07-16 Thread Eric Gerlach
On Wed, Jul 15, 2009 at 07:36:24AM -0700, Todd A. Jacobs wrote: > On Mon, Jul 06, 2009 at 07:30:19PM -0500, Ron Johnson wrote: > > > How would one go about computing a *single* hash value for a complete > > directory tree? > > You might want to look at how git does this. As I understand it, git >

Re: sha1summ of complete directory?

2009-07-15 Thread Todd A. Jacobs
On Mon, Jul 06, 2009 at 07:30:19PM -0500, Ron Johnson wrote: > How would one go about computing a *single* hash value for a complete > directory tree? You might want to look at how git does this. As I understand it, git stores hashes of trees, so the implementation may help you. -- "Oh, look: r

Re: sha1summ of complete directory?

2009-07-07 Thread Scott Gifford
Tzafrir Cohen writes: > On Tue, Jul 07, 2009 at 12:08:05AM -0400, Scott Gifford wrote: [...] >> For the file contents, if there are no subdirectories you can use: >> >> cat `ls` |sha1sum > > Which is basically: > > cat * | sha1sum The purpose of the ls was to sort the filenames, but loo

Re: sha1summ of complete directory?

2009-07-07 Thread Tzafrir Cohen
On Tue, Jul 07, 2009 at 12:08:05AM -0400, Scott Gifford wrote: > Ron Johnson writes: > You will need to figure out what metadata you care about and what you > don't, then. For example, do you want to detect a renamed file? A > change in mtime/ctime/utime? A change in permissions? > > For the

Re: sha1summ of complete directory?

2009-07-06 Thread Daniel Burrows
On Mon, Jul 06, 2009 at 07:30:19PM -0500, Ron Johnson was heard to say: > > How would one go about computing a *single* hash value for a complete > directory tree? Depending on how important uniqueness is, you could just cat the whole thing (sorting filenames first, of course) and pipe it to

Re: sha1summ of complete directory?

2009-07-06 Thread Ron Johnson
On 2009-07-06 23:08, Scott Gifford wrote: Ron Johnson writes: On 2009-07-06 20:29, Adrian Levi wrote: 2009/7/7 Mark Neidorff : On Monday 06 July 2009 08:30 pm, Ron Johnson wrote: How would one go about computing a *single* hash value for a complete directory tree? This is what I was thinki

Re: sha1summ of complete directory?

2009-07-06 Thread Scott Gifford
Ron Johnson writes: > On 2009-07-06 20:29, Adrian Levi wrote: >> 2009/7/7 Mark Neidorff : >>> On Monday 06 July 2009 08:30 pm, Ron Johnson wrote: How would one go about computing a *single* hash value for a complete directory tree? >> This is what I was thinking, If you don't want to re

Re: sha1summ of complete directory?

2009-07-06 Thread CaT
On Mon, Jul 06, 2009 at 07:30:19PM -0500, Ron Johnson wrote: > How would one go about computing a *single* hash value for a complete > directory tree? hash everything and then hash the result? (if you don't care about metadata that is - if you do add a nice stat of everything into the final hash)

Re: sha1summ of complete directory?

2009-07-06 Thread Ron Johnson
On 2009-07-06 20:29, Adrian Levi wrote: 2009/7/7 Mark Neidorff : On Monday 06 July 2009 08:30 pm, Ron Johnson wrote: How would one go about computing a *single* hash value for a complete directory tree? This is what I was thinking, If you don't want to retain the tar file then pipe it to sha1

Re: sha1summ of complete directory?

2009-07-06 Thread Adrian Levi
2009/7/7 Mark Neidorff : > On Monday 06 July 2009 08:30 pm, Ron Johnson wrote: >> How would one go about computing a *single* hash value for a >> complete directory tree? This is what I was thinking, If you don't want to retain the tar file then pipe it to sha1sum. Adrian -- 24x7x365 != 24x7x52

Re: sha1summ of complete directory?

2009-07-06 Thread Mark Neidorff
On Monday 06 July 2009 08:30 pm, Ron Johnson wrote: > How would one go about computing a *single* hash value for a > complete directory tree? > > -- > Scooty Puff, Sr > The Doom-Bringer Tar the tree and then calculate the sha1sum of the tar file. Easy, no? Mark -- To UNSUBSCRIBE, email to deb

sha1summ of complete directory?

2009-07-06 Thread Ron Johnson
How would one go about computing a *single* hash value for a complete directory tree? -- Scooty Puff, Sr The Doom-Bringer -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org