stupid stupid stupid

Feb 01, 2009 20:44

What is the difference between 'cmp -s' and 'diff -q' ? Why the hell are there two different apps that do the same thing in the same operating system? Why use the one nobody's heard of?

I swear, sometimes I feel like FreeBSD is _trying_ to be obtuse. It's almost as bad as Linux RC files.

Leave a comment

Comments 3

testing4l February 2 2009, 04:53:19 UTC
diff makes allowances for text files (for example, differences between newlines). It cannot be relied upon for an honest diff of binary files.

Also, Linux rc files came from UNIX. Blame BSD and SysV for having different systems that Linux inherited.

Reply

knight3d February 2 2009, 07:37:10 UTC
Ahh that makes sense. Why not just have one utility that gives reasonable diffs for both binary and text then? integrate it with cvs or svn and we have a useful way to look at revision history of binaries.

Linux rc files came from UNIX.

That's no excuse for bad implementation. Things should be adopted, not directly copied without asking "why".

Reply

testing4l February 2 2009, 07:56:07 UTC
That's easy. diff has a rich history of being used for coding differences. patch input can be made from diff. It can't be made from cmp.

As for bad implementation -- what's bad about it?

Reply


Leave a comment

Up