| View previous topic :: View next topic |
| Author |
Message |
Man-wai Chang ToDie (33.6 Guest
|
Posted: Fri Nov 07, 2008 8:25 am Post subject: Re: diff |
|
|
| Quote: | Then use diff with the -a option. No output means they are the same. Or
use the -s option and diff will report the files are the same.
|
I have 2 10M test files. `diff -a` exited so soon that I didn't think
it's comparing the 2 files by content...
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.7
^ ^ 11:35:01 up 9 days 11:54 3 users load average: 1.07 1.11 1.06
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa |
|
| |
|
Back to top |
Lawrence D'Oliveiro Guest
|
Posted: Fri Nov 07, 2008 8:25 am Post subject: Re: diff |
|
|
In message <4912cfd4$0$90276$14726298@news.sunsite.dk>, Man-wai Chang ToDie
(33.6k) wrote:
| Quote: | Just wanna compare the source and the target after duplicating a file.
You can't just drag-and-drop and go home. What if the backup fails when
you need it?
|
Try rsync. Does both files and directories. |
|
| |
|
Back to top |
Lawrence D'Oliveiro Guest
|
Posted: Fri Nov 07, 2008 8:25 am Post subject: Re: diff |
|
|
In message <490bed51$0$90275$14726298@news.sunsite.dk>, Man-wai Chang ToDie
(33.6k) wrote:
| Quote: | How could I use it to compare two BINARY files's content, not just date,
time and size?
|
Another option, if the files are not too huge, is to compare hexdumps of
them, rather than the file contents directly. E.g. instead of
diff -u file1 file2
do
diff -u <(xxd file1) <(xxd file2)
(I like using -u). |
|
| |
|
Back to top |
jellybean stonerfish Guest
|
Posted: Fri Nov 07, 2008 8:25 am Post subject: Re: diff |
|
|
On Fri, 07 Nov 2008 11:36:00 +0800, Man-wai Chang ToDie (33.6k) wrote:
| Quote: | Then use diff with the -a option. No output means they are the same.
Or use the -s option and diff will report the files are the same.
I have 2 10M test files. `diff -a` exited so soon that I didn't think
it's comparing the 2 files by content...
|
Well, diff is designed to show the difference in files, so if there is no
difference, there is no output. |
|
| |
|
Back to top |
Jasen Betts Guest
|
Posted: Fri Nov 07, 2008 8:25 am Post subject: Re: diff |
|
|
On 2008-11-07, Man-wai Chang ToDie (33.6k) <toylet.toylet@gmail.com> wrote:
| Quote: | Then use diff with the -a option. No output means they are the same. Or
use the -s option and diff will report the files are the same.
I have 2 10M test files. `diff -a` exited so soon that I didn't think
it's comparing the 2 files by content...
|
it only needs to find one difference to know that they differ
Bye.
Jasen |
|
| |
|
Back to top |
s. keeling Guest
|
Posted: Sat Nov 08, 2008 2:48 am Post subject: Re: diff |
|
|
Chris Ahlstrom <linonut@bollsouth.nut>:
| Quote: | After takin' a swig o' grog, John Hasler belched out
this bit o' wisdom:
BTW "wanna" is not a word in English.
Sure it is!
|
Colloquialism \Col*lo"qui*al*ism\, n.
A colloquial expression, not employed in formal discourse or
writing.
[1913 Webster]
Whether "formal discourse or writing" applies here is up to you two.
Colloquialisms can liven up informal discussion, even if it irritates
us purists.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me. |
|
| |
|
Back to top |
s. keeling Guest
|
Posted: Sat Nov 08, 2008 2:53 am Post subject: Re: diff |
|
|
Man-wai Chang ToDie (33.6k) <toylet.toylet@gmail.com>:
| Quote: | John Hasler wrote:
Man-wai Chang ToDie wrote:
Just wanna compare the source and the target after duplicating a file.
Then use md5sum. No need for a byte by byte comparision and you can save
the checksums to test for corruption again later.
better be sure than sorry....
|
Work smart, not lots.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me. |
|
| |
|
Back to top |
Man-wai Chang ToDie (33.6 Guest
|
Posted: Sat Nov 08, 2008 8:26 am Post subject: Re: diff |
|
|
Lawrence D'Oliveiro wrote:
| Quote: | In message <490bed51$0$90275$14726298@news.sunsite.dk>, Man-wai Chang ToDie
(33.6k) wrote:
How could I use it to compare two BINARY files's content, not just date,
time and size?
Another option, if the files are not too huge, is to compare hexdumps of
them, rather than the file contents directly. E.g. instead of
diff -u file1 file2
do
diff -u <(xxd file1) <(xxd file2)
(I like using -u).
|
Interesting idea! Thanks!
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.7
^ ^ 10:52:01 up 27 min 0 users load average: 1.03 1.14 1.31
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa |
|
| |
|
Back to top |
Mike Jones Guest
|
Posted: Sat Nov 08, 2008 5:00 pm Post subject: Re: diff |
|
|
Responding to s. keeling:
| Quote: | Chris Ahlstrom <linonut@bollsouth.nut>:
After takin' a swig o' grog, John Hasler belched out
this bit o' wisdom:
BTW "wanna" is not a word in English.
Sure it is!
Colloquialism \Col*lo"qui*al*ism\, n.
A colloquial expression, not employed in formal discourse or
writing.
[1913 Webster]
Whether "formal discourse or writing" applies here is up to you two.
Colloquialisms can liven up informal discussion, even if it irritates us
purists.
|
Er, "we purists" if you don't mind.
(If yer gonna do it, ya gotta geddit right.)
;)
--
*===( http://principiadiscordia.com/
*===( http://www.badphorm.co.uk/
*===( http://www.zenwalk.org/ |
|
| |
|
Back to top |
Vahis Guest
|
Posted: Sat Nov 08, 2008 5:06 pm Post subject: Re: diff |
|
|
Mike Jones wrote:
| Quote: | Responding to s. keeling:
Chris Ahlstrom <linonut@bollsouth.nut>:
After takin' a swig o' grog, John Hasler belched out
this bit o' wisdom:
BTW "wanna" is not a word in English.
Sure it is!
Colloquialism \Col*lo"qui*al*ism\, n.
A colloquial expression, not employed in formal discourse or
writing.
[1913 Webster]
Whether "formal discourse or writing" applies here is up to you two.
Colloquialisms can liven up informal discussion, even if it irritates us
purists.
Er, "we purists" if you don't mind.
(If yer gonna do it, ya gotta geddit right.)
;)
|
No. No!
It irritates us.
It does not irritate we.
We may irritate, and even ourselves.
--
Vahis
http://waxborg.servepics.com
Congressman Wilson has an expression:
"You can teach them to type, but you can't teach them to grow tits." |
|
| |
|
Back to top |
Lawrence D'Oliveiro Guest
|
Posted: Sat Nov 08, 2008 6:07 pm Post subject: Re: diff |
|
|
In message <pan.2008.11.08.11.02.37@Arizona.Bay>, Mike Jones wrote:
| Quote: | Er, "we purists" if you don't mind.
|
Skitt's Law! |
|
| |
|
Back to top |
Chris Ahlstrom Guest
|
Posted: Sat Nov 08, 2008 8:04 pm Post subject: Re: diff |
|
|
After takin' a swig o' grog, Lawrence D'Oliveiro belched out
this bit o' wisdom:
| Quote: | In message <pan.2008.11.08.11.02.37@Arizona.Bay>, Mike Jones wrote:
Er, "we purists" if you don't mind.
Skitt's Law!
|
Ya blew it again, ya freakin' maroon!
http://en.wikipedia.org/wiki/Gaudere's_Law
McKean's Law: Any correction of the speech or writing of others will
contain at least one grammatical, spelling, or typographical error" has
been set out by lexicographer Erin McKean
Similar laws have also been coined, usually in the context of online
communication, under the names of Skitt's Law, Hartman's Law of
Prescriptivist Retaliation (or The Law of Prescriptive Retaliation),
Bell's First Law of Usenet, Moen's Law of Corrections, Tober's lor,
Gaudere's Law, Naruki's Law and Greenrd's Law, and it has also been
called Merphy's law.
Ya didn't do dah research, so's ya's gotta pay der price!
Wot a buncha little perfessers!
(Thanks for the fun, guys!)
--
<Culus-> libc6 is not essential  |
|
| |
|
Back to top |
|