Hello.
I found out that .mpkg is actually directory and not a file. Is that
correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
files until it said .mpkg was a directory. I also cannot seem to find a
way to make it MD5 recursively. Is there a way to do this? I am
basically comparing a burned CD files and my local copies.
Thank you in advance. :)
--
Quote of the Week: "When I was five years old, I saw an insect that had
been eaten by ants and of which nothing remained except the shell.
Through the holes in its anatomy one could see the sky. Every time I
wish to attain purity I look at the sky through flesh." --Salvadore Dali
/\___/\ Ant(Dude) @ http://antfarm.home.dhs.org (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / Please nuke ANT if replying by e-mail. If crediting,
( ) then please kindly use Ant nickname and AQFL URL/link.
|
|
0
|
|
|
|
Reply
|
ANTant (1288)
|
7/6/2012 10:52:15 PM |
|
In article <yIGdneiXSdaC8WrSnZ2dnUVZ_hadnZ2d@earthlink.com>,
ANTant@zimage.com (Ant) wrote:
> Hello.
>
> I found out that .mpkg is actually directory and not a file. Is that
> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
> files until it said .mpkg was a directory. I also cannot seem to find a
> way to make it MD5 recursively. Is there a way to do this? I am
> basically comparing a burned CD files and my local copies.
>
> Thank you in advance. :)
I think the usual approach is to make a tar, zip, etc which becomes a single
file and then sign that.
--
My name Indigo Montoya. | The Dude abides.
You flamed my father. | I'm whoever you want me to be.
Prepare to be spanked. | Annoying Usenet one post at a time.
Stop posting that! | At least I can stay in character.
|
|
0
|
|
|
|
Reply
|
chine.bleu (655)
|
7/6/2012 11:40:18 PM
|
|
In article <yIGdneiXSdaC8WrSnZ2dnUVZ_hadnZ2d@earthlink.com>,
ANTant@zimage.com (Ant) wrote:
> Hello.
>
> I found out that .mpkg is actually directory and not a file. Is that
> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
> files until it said .mpkg was a directory. I also cannot seem to find a
> way to make it MD5 recursively. Is there a way to do this? I am
> basically comparing a burned CD files and my local copies.
>
> Thank you in advance. :)
You can use the find and xargs commands:
find . -type f -print0 | xargs -0 md5
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
|
|
0
|
|
|
|
Reply
|
barmar (5626)
|
7/7/2012 12:32:41 AM
|
|
On 07-06-2012 19:40, China Blue [Tor], Meersburg wrote:
> ANTant@zimage.com (Ant) wrote:
>>
>> I found out that .mpkg is actually directory and not a file. Is that
>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
>> files until it said .mpkg was a directory. I also cannot seem to find a
>> way to make it MD5 recursively. Is there a way to do this? I am
>> basically comparing a burned CD files and my local copies.
>>
>> Thank you in advance. :)
>
> I think the usual approach is to make a tar, zip, etc which becomes a single
> file and then sign that.
That will fail unless he uses the same versions with the same options as
was done on the original.
I take it back--it will fail even then, because the file timestamps will
be different, and possibly owner, group, permissions, and ACLs.
Barry's method should work.
--
Wes Groleau
“Two things are infinite, the universe and human stupidity.
But I'm not so sure about the universe.”
— Albert Einstein
|
|
0
|
|
|
|
Reply
|
news31 (6411)
|
7/7/2012 3:02:51 AM
|
|
On 7/6/2012 4:40 PM PT, China Blue [Tor], Meersburg typed:
>> I found out that .mpkg is actually directory and not a file. Is that
>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
>> files until it said .mpkg was a directory. I also cannot seem to find a
>> way to make it MD5 recursively. Is there a way to do this? I am
>> basically comparing a burned CD files and my local copies.
>>
>> Thank you in advance. :)
>
> I think the usual approach is to make a tar, zip, etc which becomes a single
> file and then sign that.
Uh, I just wanted to compare my files in many subdirectories. That's all.
--
"It's kind of an insane case ... 6,000 ants dressed up as rice and
robbed a Chinese restaurant." --Steven Wright
/\___/\ Ant(Dude) @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
|
|
0
|
|
|
|
Reply
|
ant (767)
|
7/7/2012 7:30:49 AM
|
|
On 7/6/2012 5:32 PM PT, Barry Margolin typed:
>> I found out that .mpkg is actually directory and not a file. Is that
>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
>> files until it said .mpkg was a directory. I also cannot seem to find a
>> way to make it MD5 recursively. Is there a way to do this? I am
>> basically comparing a burned CD files and my local copies.
>>
>> Thank you in advance. :)
>
> You can use the find and xargs commands:
>
> find . -type f -print0 | xargs -0 md5
Thanks! Someone also told me: find . -type f -exec md5 {} \;
--
o/~ All the little ants are marching, red and black antennae waving...
they all do it the same... they all do it the same... way... o/~ --Ants
Marching song by Dave Matthews Band
/\___/\ Ant(Dude) @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
|
|
0
|
|
|
|
Reply
|
ant (767)
|
7/7/2012 7:32:20 AM
|
|
In article <T-6dnROsGMsoeGrSnZ2dnUVZ_uOdnZ2d@earthlink.com>,
Ant <ant@zimage.comANT> wrote:
> On 7/6/2012 4:40 PM PT, China Blue [Tor], Meersburg typed:
>
> >> I found out that .mpkg is actually directory and not a file. Is that
> >> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
> >> files until it said .mpkg was a directory. I also cannot seem to find a
> >> way to make it MD5 recursively. Is there a way to do this? I am
> >> basically comparing a burned CD files and my local copies.
> >>
> >> Thank you in advance. :)
> >
> > I think the usual approach is to make a tar, zip, etc which becomes a single
> > file and then sign that.
>
> Uh, I just wanted to compare my files in many subdirectories. That's all.
That's what commands like "diff" are for. TextWrangler also has a nice
GUI multi-file compare function.
--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.
JR
|
|
0
|
|
|
|
Reply
|
jollyroger (10526)
|
7/7/2012 1:50:13 PM
|
|
On 07-07-2012 03:32, Ant wrote:
> On 7/6/2012 5:32 PM PT, Barry Margolin typed:
>
>>> I found out that .mpkg is actually directory and not a file. Is that
>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
>>> files until it said .mpkg was a directory. I also cannot seem to find a
>>> way to make it MD5 recursively. Is there a way to do this? I am
>>> basically comparing a burned CD files and my local copies.
>>>
>>> Thank you in advance. :)
>>
>> You can use the find and xargs commands:
>>
>> find . -type f -print0 | xargs -0 md5
>
> Thanks! Someone also told me: find . -type f -exec md5 {} \;
Works a bit differently, but gets the same result in most cases.
But for your purpose,
diff -rq topdir1 topdir2 # that's Are & Queue
should be sufficient
--
Wes Groleau
A bureaucrat is someone who cuts red tape lengthwise.
|
|
0
|
|
|
|
Reply
|
news31 (6411)
|
7/7/2012 2:51:29 PM
|
|
On 7/7/2012 6:50 AM PT, Jolly Roger typed:
>>>> I found out that .mpkg is actually directory and not a file. Is that
>>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
>>>> files until it said .mpkg was a directory. I also cannot seem to find a
>>>> way to make it MD5 recursively. Is there a way to do this? I am
>>>> basically comparing a burned CD files and my local copies.
>>>
>>> I think the usual approach is to make a tar, zip, etc which becomes a single
>>> file and then sign that.
>>
>> Uh, I just wanted to compare my files in many subdirectories. That's all.
>
> That's what commands like "diff" are for. TextWrangler also has a nice
> GUI multi-file compare function.
Diff doesn't seem to show checksums like MD5s? TextWrangler seems to be
only for text files? I have binary files.
--
[Laser pulsing] "Bah. It's as easy as crushing an ant! You know, the..."
[grunting] "Wh-wh-whoa! Hey, take my wallet and leave me alone!" --Mr.
Burns from The Simpsons (Fraudcast News; FABF16/FABF18 episode)
/\___/\ Ant(Dude) @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
|
|
0
|
|
|
|
Reply
|
ant (767)
|
7/7/2012 5:14:59 PM
|
|
>>>> I found out that .mpkg is actually directory and not a file. Is that
>>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
>>>> compare
>>>> files until it said .mpkg was a directory. I also cannot seem to find a
>>>> way to make it MD5 recursively. Is there a way to do this? I am
>>>> basically comparing a burned CD files and my local copies.
>>>
>>> You can use the find and xargs commands:
>>>
>>> find . -type f -print0 | xargs -0 md5
>>
>> Thanks! Someone also told me: find . -type f -exec md5 {} \;
>
> Works a bit differently, but gets the same result in most cases.
>
> But for your purpose,
>
> diff -rq topdir1 topdir2 # that's Are & Queue
>
> should be sufficient
Thanks, that will work too. Too bad no checksum results like MD5s.
--
"Busy as ants hurrying orcs were digging, digging lines of deep trenches
in a huge ring, just out of bowshot from the walls;" --The Return of the
King (book)
/\___/\ Ant(Dude) @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
|
|
0
|
|
|
|
Reply
|
ant (767)
|
7/7/2012 5:17:21 PM
|
|
In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
Ant <ant@zimage.comANT> wrote:
> On 7/7/2012 6:50 AM PT, Jolly Roger typed:
>
> >>>> I found out that .mpkg is actually directory and not a file. Is that
> >>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
> >>>> files until it said .mpkg was a directory. I also cannot seem to find a
> >>>> way to make it MD5 recursively. Is there a way to do this? I am
> >>>> basically comparing a burned CD files and my local copies.
> >>>
> >>> I think the usual approach is to make a tar, zip, etc which becomes a
> >>> single
> >>> file and then sign that.
> >>
> >> Uh, I just wanted to compare my files in many subdirectories. That's all.
> >
> > That's what commands like "diff" are for. TextWrangler also has a nice
> > GUI multi-file compare function.
>
> Diff doesn't seem to show checksums like MD5s?
No need to display checksums when you are comparing text files.
> TextWrangler seems to be only for text files? I have binary files.
Ah, new information. Yep, the 'diff' tool doesn't appear to support
binary comparison. You'd need an alternative diff tool for that.
--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.
JR
|
|
0
|
|
|
|
Reply
|
jollyroger (10526)
|
7/7/2012 6:23:40 PM
|
|
On 7/7/2012 11:23 AM PT, Jolly Roger typed:
> Ah, new information. Yep, the 'diff' tool doesn't appear to support
> binary comparison. You'd need an alternative diff tool for that.
Thanks. Sorry I forgot to mention that earlier. :(
--
"It's like stepping on ants... I don't step on ants, Major." --Odo and
Kira from Star Trek: Deep Space Nine
/\___/\ Ant(Dude) @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
|
|
0
|
|
|
|
Reply
|
ant (767)
|
7/7/2012 6:24:22 PM
|
|
In article <jollyroger-75D0F2.11234007072012@news.individual.net>,
Jolly Roger <jollyroger@pobox.com> wrote:
> In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
> Ant <ant@zimage.comANT> wrote:
>
> > On 7/7/2012 6:50 AM PT, Jolly Roger typed:
> >
> > >>>> I found out that .mpkg is actually directory and not a file. Is that
> > >>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
> > >>>> compare
> > >>>> files until it said .mpkg was a directory. I also cannot seem to find
> > >>>> a
> > >>>> way to make it MD5 recursively. Is there a way to do this? I am
> > >>>> basically comparing a burned CD files and my local copies.
> > >>>
> > >>> I think the usual approach is to make a tar, zip, etc which becomes a
> > >>> single
> > >>> file and then sign that.
> > >>
> > >> Uh, I just wanted to compare my files in many subdirectories. That's
> > >> all.
> > >
> > > That's what commands like "diff" are for. TextWrangler also has a nice
> > > GUI multi-file compare function.
> >
> > Diff doesn't seem to show checksums like MD5s?
>
> No need to display checksums when you are comparing text files.
>
> > TextWrangler seems to be only for text files? I have binary files.
>
> Ah, new information. Yep, the 'diff' tool doesn't appear to support
> binary comparison. You'd need an alternative diff tool for that.
While it doesn't display the details of the differences, like it does
for text files, it will still compare them and report "Binary files X
and Y differ". Which is no less information than you get by comparing
checksums.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
|
|
0
|
|
|
|
Reply
|
barmar (5626)
|
7/7/2012 7:40:34 PM
|
|
On 07-07-2012 13:17, Ant wrote:
>>>>> I found out that .mpkg is actually directory and not a file. Is that
>>>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
>>>>> compare
>>>>> files until it said .mpkg was a directory. I also cannot seem to
>>>>> find a
>>>>> way to make it MD5 recursively. Is there a way to do this? I am
>>>>> basically comparing a burned CD files and my local copies.
>>>>
>>>> You can use the find and xargs commands:
>>>>
>>>> find . -type f -print0 | xargs -0 md5
>>>
>>> Thanks! Someone also told me: find . -type f -exec md5 {} \;
>>
>> Works a bit differently, but gets the same result in most cases.
>>
>> But for your purpose,
>>
>> diff -rq topdir1 topdir2 # that's Are & Queue
>>
>> should be sufficient
>
> Thanks, that will work too. Too bad no checksum results like MD5s.
Do you want to compare files themselves, or do you want to compare their
checksums?
How about this:
find topdir1 -type f -exec sum "{}" \; | sort -n > /tmp/ONE
find topdir2 -type f -exec sum "{}" \; | sort -n > /tmp/TWO
diff /tmp/ONE /tmp/TWO
(The quote marks are because we just can't seem to teach people not to
put spaces in filenames.)
--
Wes Groleau
------
“The reason most women would rather have beauty than brains is
they know that most men can see better than they can think.”
— James Dobson
|
|
0
|
|
|
|
Reply
|
news31 (6411)
|
7/7/2012 10:14:27 PM
|
|
On 7/7/2012 3:14 PM PT, Wes Groleau typed:
> On 07-07-2012 13:17, Ant wrote:
>>>>>> I found out that .mpkg is actually directory and not a file. Is that
>>>>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
>>>>>> compare
>>>>>> files until it said .mpkg was a directory. I also cannot seem to
>>>>>> find a
>>>>>> way to make it MD5 recursively. Is there a way to do this? I am
>>>>>> basically comparing a burned CD files and my local copies.
>>>>>
>>>>> You can use the find and xargs commands:
>>>>>
>>>>> find . -type f -print0 | xargs -0 md5
>>>>
>>>> Thanks! Someone also told me: find . -type f -exec md5 {} \;
>>>
>>> Works a bit differently, but gets the same result in most cases.
>>>
>>> But for your purpose,
>>>
>>> diff -rq topdir1 topdir2 # that's Are & Queue
>>>
>>> should be sufficient
>>
>> Thanks, that will work too. Too bad no checksum results like MD5s.
>
> Do you want to compare files themselves, or do you want to compare their
> checksums?
Both. I want to be sure the files are OK and not changed/different.
> How about this:
>
> find topdir1 -type f -exec sum "{}" \; | sort -n > /tmp/ONE
> find topdir2 -type f -exec sum "{}" \; | sort -n > /tmp/TWO
> diff /tmp/ONE /tmp/TWO
>
> (The quote marks are because we just can't seem to teach people not to
> put spaces in filenames.)
Thanks. I will try them later.
--
"At length, when they came to a (lowly) valley of ants, one of the ants
said: 'O ye ants, get into your habitations, lest Solomon and his hosts
crush you (under foot) without knowing it.'" --Surah 27. The Ant, The
Ants, line 18
/\___/\ Ant(Dude) @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
|
|
0
|
|
|
|
Reply
|
ant (767)
|
7/7/2012 10:28:39 PM
|
|
In article <barmar-BFBF14.15403407072012@news.eternal-september.org>,
Barry Margolin <barmar@alum.mit.edu> wrote:
> In article <jollyroger-75D0F2.11234007072012@news.individual.net>,
> Jolly Roger <jollyroger@pobox.com> wrote:
>
> > In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
> > Ant <ant@zimage.comANT> wrote:
> >
> > > On 7/7/2012 6:50 AM PT, Jolly Roger typed:
> > >
> > > >>>> I found out that .mpkg is actually directory and not a file. Is that
> > > >>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
> > > >>>> compare
> > > >>>> files until it said .mpkg was a directory. I also cannot seem to
> > > >>>> find
> > > >>>> a
> > > >>>> way to make it MD5 recursively. Is there a way to do this? I am
> > > >>>> basically comparing a burned CD files and my local copies.
> > > >>>
> > > >>> I think the usual approach is to make a tar, zip, etc which becomes a
> > > >>> single
> > > >>> file and then sign that.
> > > >>
> > > >> Uh, I just wanted to compare my files in many subdirectories. That's
> > > >> all.
> > > >
> > > > That's what commands like "diff" are for. TextWrangler also has a nice
> > > > GUI multi-file compare function.
> > >
> > > Diff doesn't seem to show checksums like MD5s?
> >
> > No need to display checksums when you are comparing text files.
> >
> > > TextWrangler seems to be only for text files? I have binary files.
> >
> > Ah, new information. Yep, the 'diff' tool doesn't appear to support
> > binary comparison. You'd need an alternative diff tool for that.
>
> While it doesn't display the details of the differences, like it does
> for text files, it will still compare them and report "Binary files X
> and Y differ". Which is no less information than you get by comparing
> checksums.
Thanks, I hadn't actually tried it with binary files.
--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.
JR
|
|
0
|
|
|
|
Reply
|
jollyroger (10526)
|
7/8/2012 1:53:14 AM
|
|
In article <barmar-BFBF14.15403407072012@news.eternal-september.org>,
Barry Margolin <barmar@alum.mit.edu> wrote:
> In article <jollyroger-75D0F2.11234007072012@news.individual.net>,
> Jolly Roger <jollyroger@pobox.com> wrote:
>
> > In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
> > Ant <ant@zimage.comANT> wrote:
> >
> > > On 7/7/2012 6:50 AM PT, Jolly Roger typed:
> > >
> > > >>>> I found out that .mpkg is actually directory and not a file. Is that
> > > >>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
> > > >>>> compare
> > > >>>> files until it said .mpkg was a directory. I also cannot seem to
> > > >>>> find
> > > >>>> a
> > > >>>> way to make it MD5 recursively. Is there a way to do this? I am
> > > >>>> basically comparing a burned CD files and my local copies.
> > > >>>
> > > >>> I think the usual approach is to make a tar, zip, etc which becomes a
> > > >>> single
> > > >>> file and then sign that.
> > > >>
> > > >> Uh, I just wanted to compare my files in many subdirectories. That's
> > > >> all.
> > > >
> > > > That's what commands like "diff" are for. TextWrangler also has a nice
> > > > GUI multi-file compare function.
> > >
> > > Diff doesn't seem to show checksums like MD5s?
> >
> > No need to display checksums when you are comparing text files.
> >
> > > TextWrangler seems to be only for text files? I have binary files.
> >
> > Ah, new information. Yep, the 'diff' tool doesn't appear to support
> > binary comparison. You'd need an alternative diff tool for that.
>
> While it doesn't display the details of the differences, like it does
> for text files, it will still compare them and report "Binary files X
> and Y differ". Which is no less information than you get by comparing
> checksums.
You have to scan the whole file anyway to compute a hash, with the added problem
that different files can have the same hash. Hashes are useful for things like
validating a downloaded file is probably the same as the hashed file, or when
searching for identical files amongst a collection of files.
--
My name Indigo Montoya. | The Dude abides.
You flamed my father. | I'm whoever you want me to be.
Prepare to be spanked. | Annoying Usenet one post at a time.
Stop posting that! | At least I can stay in character.
|
|
0
|
|
|
|
Reply
|
chine.bleu (655)
|
7/8/2012 2:10:05 AM
|
|
On Sat, 07 Jul 2012 11:23:40 -0700, Jolly Roger wrote:
> In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
> Ant <ant@zimage.comANT> wrote:
>
>
>> TextWrangler seems to be only for text files? I have binary files.
>
> Ah, new information. Yep, the 'diff' tool doesn't appear to support
> binary comparison. You'd need an alternative diff tool for that.
But the 'diff' tool will recognize binary files and avoid spewing out the
actual differences.
I have just tested this by creating a tar.gz from a small directory,
changing one byte in one of the directory's files, then creating a
separate tar.gz of that. This is what I get:
diff x.tgz y.tgz
Binary files x.tgz and y.tgz differ
The most useful flavour of diff for package directories is probably this
one:
diff -rq package1.mpkg package2.mpkg
where r is recursive, q reports only whether files differ.,
--
Paul Sture
|
|
0
|
|
|
|
Reply
|
paul303 (1382)
|
7/8/2012 7:12:08 AM
|
|
In message <jollyroger-75D0F2.11234007072012@news.individual.net>
Jolly Roger <jollyroger@pobox.com> wrote:
> In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
> Ant <ant@zimage.comANT> wrote:
>> On 7/7/2012 6:50 AM PT, Jolly Roger typed:
>>
>> >>>> I found out that .mpkg is actually directory and not a file. Is that
>> >>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to compare
>> >>>> files until it said .mpkg was a directory. I also cannot seem to find a
>> >>>> way to make it MD5 recursively. Is there a way to do this? I am
>> >>>> basically comparing a burned CD files and my local copies.
>> >>>
>> >>> I think the usual approach is to make a tar, zip, etc which becomes a
>> >>> single
>> >>> file and then sign that.
>> >>
>> >> Uh, I just wanted to compare my files in many subdirectories. That's all.
>> >
>> > That's what commands like "diff" are for. TextWrangler also has a nice
>> > GUI multi-file compare function.
>>
>> Diff doesn't seem to show checksums like MD5s?
> No need to display checksums when you are comparing text files.
>> TextWrangler seems to be only for text files? I have binary files.
> Ah, new information. Yep, the 'diff' tool doesn't appear to support
> binary comparison. You'd need an alternative diff tool for that.
diff works for any file.
~/ $ diff /bin/sh /bin/bash
Binary files /bin/sh and /bin/bash differ
~/ $ diff /usr/bin/vi /usr/bin/vim
~/ $
|
|
0
|
|
|
|
Reply
|
g.kreme (2818)
|
7/8/2012 3:07:10 PM
|
|
In article <slrnjvj8h1.3182.g.kreme@mbp55.local>,
Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> In message <jollyroger-75D0F2.11234007072012@news.individual.net>
> Jolly Roger <jollyroger@pobox.com> wrote:
> > In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
> > Ant <ant@zimage.comANT> wrote:
>
> >> On 7/7/2012 6:50 AM PT, Jolly Roger typed:
> >>
> >> >>>> I found out that .mpkg is actually directory and not a file. Is that
> >> >>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
> >> >>>> compare
> >> >>>> files until it said .mpkg was a directory. I also cannot seem to find
> >> >>>> a
> >> >>>> way to make it MD5 recursively. Is there a way to do this? I am
> >> >>>> basically comparing a burned CD files and my local copies.
> >> >>>
> >> >>> I think the usual approach is to make a tar, zip, etc which becomes a
> >> >>> single
> >> >>> file and then sign that.
> >> >>
> >> >> Uh, I just wanted to compare my files in many subdirectories. That's
> >> >> all.
> >> >
> >> > That's what commands like "diff" are for. TextWrangler also has a nice
> >> > GUI multi-file compare function.
> >>
> >> Diff doesn't seem to show checksums like MD5s?
>
> > No need to display checksums when you are comparing text files.
>
> >> TextWrangler seems to be only for text files? I have binary files.
>
> > Ah, new information. Yep, the 'diff' tool doesn't appear to support
> > binary comparison. You'd need an alternative diff tool for that.
>
> diff works for any file.
>
> ~/ $ diff /bin/sh /bin/bash
> Binary files /bin/sh and /bin/bash differ
> ~/ $ diff /usr/bin/vi /usr/bin/vim
> ~/ $
Yes, for certain definitions of "works". We've established that diff
will tell you whether binary files differ. But if you're looking for a
line-by-line comparison, obviously diff does not "work".
--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.
JR
|
|
0
|
|
|
|
Reply
|
jollyroger (10526)
|
7/8/2012 3:18:53 PM
|
|
On Sun, 08 Jul 2012 08:18:53 -0700, Jolly Roger wrote:
> In article <slrnjvj8h1.3182.g.kreme@mbp55.local>,
> Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
>
>>
>> diff works for any file.
>>
>> ~/ $ diff /bin/sh /bin/bash
>> Binary files /bin/sh and /bin/bash differ
>> ~/ $ diff /usr/bin/vi /usr/bin/vim
>> ~/ $
>
> Yes, for certain definitions of "works". We've established that diff
> will tell you whether binary files differ. But if you're looking for a
> line-by-line comparison, obviously diff does not "work".
But for the OP's problem it works excellently. If you use
diff -r package1.mpkg package2.mpkg
you will get a line by line comparison for text files, but simply a one
line message for binary files which differ.
I find 'diff -r' and 'diff -rq' a good way to determine which files have
changed with a new release of software packages.
--
Paul Sture
|
|
0
|
|
|
|
Reply
|
paul303 (1382)
|
7/8/2012 6:39:33 PM
|
|
In article <jollyroger-37A34A.08185308072012@news.individual.net>,
Jolly Roger <jollyroger@pobox.com> wrote:
> In article <slrnjvj8h1.3182.g.kreme@mbp55.local>,
> Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
>
> > In message <jollyroger-75D0F2.11234007072012@news.individual.net>
> > Jolly Roger <jollyroger@pobox.com> wrote:
> > > In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
> > > Ant <ant@zimage.comANT> wrote:
> >
> > >> On 7/7/2012 6:50 AM PT, Jolly Roger typed:
> > >>
> > >> >>>> I found out that .mpkg is actually directory and not a file. Is
> > >> >>>> that
> > >> >>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
> > >> >>>> compare
> > >> >>>> files until it said .mpkg was a directory. I also cannot seem to
> > >> >>>> find
> > >> >>>> a
> > >> >>>> way to make it MD5 recursively. Is there a way to do this? I am
> > >> >>>> basically comparing a burned CD files and my local copies.
> > >> >>>
> > >> >>> I think the usual approach is to make a tar, zip, etc which becomes
> > >> >>> a
> > >> >>> single
> > >> >>> file and then sign that.
> > >> >>
> > >> >> Uh, I just wanted to compare my files in many subdirectories. That's
> > >> >> all.
> > >> >
> > >> > That's what commands like "diff" are for. TextWrangler also has a nice
> > >> > GUI multi-file compare function.
> > >>
> > >> Diff doesn't seem to show checksums like MD5s?
> >
> > > No need to display checksums when you are comparing text files.
> >
> > >> TextWrangler seems to be only for text files? I have binary files.
> >
> > > Ah, new information. Yep, the 'diff' tool doesn't appear to support
> > > binary comparison. You'd need an alternative diff tool for that.
> >
> > diff works for any file.
> >
> > ~/ $ diff /bin/sh /bin/bash
> > Binary files /bin/sh and /bin/bash differ
> > ~/ $ diff /usr/bin/vi /usr/bin/vim
> > ~/ $
>
> Yes, for certain definitions of "works". We've established that diff
> will tell you whether binary files differ. But if you're looking for a
> line-by-line comparison, obviously diff does not "work".
Pipe od into diff.
--
My name Indigo Montoya. | The Dude abides.
You flamed my father. | I'm whoever you want me to be.
Prepare to be spanked. | Annoying Usenet one post at a time.
Stop posting that! | At least I can stay in character.
|
|
0
|
|
|
|
Reply
|
chine.bleu (655)
|
7/8/2012 7:00:42 PM
|
|
In article <5o0pc9-fm61.ln1@news1.chingola.ch>,
Paul Sture <paul@sture.ch> wrote:
> On Sun, 08 Jul 2012 08:18:53 -0700, Jolly Roger wrote:
>
> > In article <slrnjvj8h1.3182.g.kreme@mbp55.local>,
> > Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> >
> >>
> >> diff works for any file.
> >>
> >> ~/ $ diff /bin/sh /bin/bash
> >> Binary files /bin/sh and /bin/bash differ
> >> ~/ $ diff /usr/bin/vi /usr/bin/vim
> >> ~/ $
> >
> > Yes, for certain definitions of "works". We've established that diff
> > will tell you whether binary files differ. But if you're looking for a
> > line-by-line comparison, obviously diff does not "work".
>
> But for the OP's problem it works excellently.
Yes, we've already established that.
--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.
JR
|
|
0
|
|
|
|
Reply
|
jollyroger (10526)
|
7/8/2012 7:24:04 PM
|
|
In article
<chine.bleu-79502E.12005108072012@news.eternal-september.org>,
"China Blue [Tor], Meersburg" <chine.bleu@yahoo.com> wrote:
> In article <jollyroger-37A34A.08185308072012@news.individual.net>,
> Jolly Roger <jollyroger@pobox.com> wrote:
>
> > In article <slrnjvj8h1.3182.g.kreme@mbp55.local>,
> > Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> >
> > > In message <jollyroger-75D0F2.11234007072012@news.individual.net>
> > > Jolly Roger <jollyroger@pobox.com> wrote:
> > > > In article <db-dnTmyNbYO82XSnZ2dnUVZ_vadnZ2d@earthlink.com>,
> > > > Ant <ant@zimage.comANT> wrote:
> > >
> > > >> On 7/7/2012 6:50 AM PT, Jolly Roger typed:
> > > >>
> > > >> >>>> I found out that .mpkg is actually directory and not a file. Is
> > > >> >>>> that
> > > >> >>>> correct? I was using Mac OS X 10.7.4's Terminal's md5 command to
> > > >> >>>> compare
> > > >> >>>> files until it said .mpkg was a directory. I also cannot seem to
> > > >> >>>> find
> > > >> >>>> a
> > > >> >>>> way to make it MD5 recursively. Is there a way to do this? I am
> > > >> >>>> basically comparing a burned CD files and my local copies.
> > > >> >>>
> > > >> >>> I think the usual approach is to make a tar, zip, etc which
> > > >> >>> becomes
> > > >> >>> a
> > > >> >>> single
> > > >> >>> file and then sign that.
> > > >> >>
> > > >> >> Uh, I just wanted to compare my files in many subdirectories.
> > > >> >> That's
> > > >> >> all.
> > > >> >
> > > >> > That's what commands like "diff" are for. TextWrangler also has a
> > > >> > nice
> > > >> > GUI multi-file compare function.
> > > >>
> > > >> Diff doesn't seem to show checksums like MD5s?
> > >
> > > > No need to display checksums when you are comparing text files.
> > >
> > > >> TextWrangler seems to be only for text files? I have binary files.
> > >
> > > > Ah, new information. Yep, the 'diff' tool doesn't appear to support
> > > > binary comparison. You'd need an alternative diff tool for that.
> > >
> > > diff works for any file.
> > >
> > > ~/ $ diff /bin/sh /bin/bash
> > > Binary files /bin/sh and /bin/bash differ
> > > ~/ $ diff /usr/bin/vi /usr/bin/vim
> > > ~/ $
> >
> > Yes, for certain definitions of "works". We've established that diff
> > will tell you whether binary files differ. But if you're looking for a
> > line-by-line comparison, obviously diff does not "work".
>
> Pipe od into diff.
That's unlikely to be helpful except for very particular file types. If
you insert a single byte in a binary file, every line in the dump will
be different from that point on.
If you want a byte-level comparison of binary files, use "cmp -l files".
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
|
|
0
|
|
|
|
Reply
|
barmar (5626)
|
7/8/2012 8:05:50 PM
|
|
On 7/8/2012 1:05 PM PT, Barry Margolin typed:
> If you want a byte-level comparison of binary files, use "cmp -l files".
That "cmp -l files" is too much since it show every lines like this:
$ cmp -l virtualbox-4.1_4.1.16-78094~Debian~squeeze_amd64.deb
virtualbox-4.1_4.1.18-78361~Debian~squeeze_amd64.deb |more
27 63 64
28 67 60
29 66 61
30 71 70
31 65 67
32 67 62
33 61 60
34 61 63
91 63 64
92 67 60
93 66 61
94 71 70
95 65 67
96 67 62
97 61 60
98 61 63
123 60 66
124 63 62
125 71 62
149 221 225
150 56 46
155 50 110
157 72 165
158 243 132^c
I just want to know if the mostly binary files (sometimes big/huge) are
the same or different with checksums (e.g., MD5s). :)
--
"Do not kill ants. They are your best friends." --Joe Brainard
/\___/\ Ant(Dude) @ http://antfarm.ma.cx (Personal Web Site)
/ /\ /\ \ Ant's Quality Foraged Links: http://aqfl.net
| |o o| |
\ _ / If crediting, then use Ant nickname and AQFL URL/link.
( ) If e-mailing, then axe ANT from its address if needed.
Ant is currently not listening to any songs on this computer.
|
|
0
|
|
|
|
Reply
|
ant (767)
|
7/8/2012 8:52:38 PM
|
|
In article <FZmdneaBg8qIbmTSnZ2dnUVZ_q2dnZ2d@earthlink.com>,
Ant <ant@zimage.comANT> wrote:
> On 7/8/2012 1:05 PM PT, Barry Margolin typed:
>
> > If you want a byte-level comparison of binary files, use "cmp -l files".
>
> That "cmp -l files" is too much since it show every lines like this:
> $ cmp -l virtualbox-4.1_4.1.16-78094~Debian~squeeze_amd64.deb
> virtualbox-4.1_4.1.18-78361~Debian~squeeze_amd64.deb |more
> 27 63 64
> 28 67 60
> 29 66 61
> 30 71 70
> 31 65 67
> 32 67 62
> 33 61 60
> 34 61 63
> 91 63 64
> 92 67 60
> 93 66 61
> 94 71 70
> 95 65 67
> 96 67 62
> 97 61 60
> 98 61 63
> 123 60 66
> 124 63 62
> 125 71 62
> 149 221 225
> 150 56 46
> 155 50 110
> 157 72 165
> 158 243 132^c
>
> I just want to know if the mostly binary files (sometimes big/huge) are
> the same or different with checksums (e.g., MD5s). :)
Why with checksums? Comparing the files byte-by-byte is more efficient,
since it can stop as soon as it hits a difference. Without the -l
option, that's what cmp does.
if cmp virtualbox-4.1_4.1.16-78094~Debian~squeeze_amd64.deb
virtualbox-4.1_4.1.18-78361~Debian~squeeze_amd64.deb
then echo same
else echo different
fi
Checksums are useful if you save them in a snapshot. Then if you want
to find out if a file has changed since the snapshot, you calculate a
new checksum and compare it to the saved one. But if you're comparing
two files at the same time, direct comparison is better.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
|
|
0
|
|
|
|
Reply
|
barmar (5626)
|
7/8/2012 9:06:02 PM
|
|
In article <FZmdneaBg8qIbmTSnZ2dnUVZ_q2dnZ2d@earthlink.com>,
Ant <ant@zimage.comANT> wrote:
> On 7/8/2012 1:05 PM PT, Barry Margolin typed:
>
> > If you want a byte-level comparison of binary files, use "cmp -l files".
>
> That "cmp -l files" is too much since it show every lines like this:
[snip]
> I just want to know if the mostly binary files (sometimes big/huge) are
> the same or different with checksums (e.g., MD5s). :)
As you've been told, by multiple people, diff will tell you if they are
different, which is all you really need to know.
--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.
JR
|
|
0
|
|
|
|
Reply
|
jollyroger (10526)
|
7/8/2012 11:47:51 PM
|
|
|
26 Replies
46 Views
(page loaded in 0.317 seconds)
|