LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-09-2013, 07:44 AM   #1
sras
Member
 
Registered: Jul 2013
Posts: 31

Rep: Reputation: Disabled
Difference in 'diff' command


Hello Guys,

I executed 'diff' command against two files in 'Sun OS 5.10' and in 'Linux' platforms.
Both the versions have same shell (Ksh), but got two different outputs.

what would be the reason behind this, even though the shell is same?

thanks.
 
Old 07-09-2013, 08:08 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Several reasons, either the version of diff, or the versions you have of the libraries which diff depends.

Find out whether diff is a true binary, a symbolic link, or part of busybox by finding out what is invoked when you call diff; use the "which" command.

Try getting the version of diff, or seeing if it gives you help if the -v option does not work.

Finally, use ldd to print your shared library dependencies on each machine and you may see a difference in the versions of the libraries each version of diff uses.

Code:
me@my-desktop:~$ which diff
/usr/bin/diff

me@my-desktop:~$ diff -v
diff (GNU diffutils) 2.8.1
Copyright (C) 2002 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Written by Paul Eggert, Mike Haertel, David Hayes,
Richard Stallman, and Len Tower.

me@my-desktop:~$ ldd /usr/bin/diff
	linux-gate.so.1 =>  (0xb7809000)
	librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb77e6000)
	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb768c000)
	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7672000)
	/lib/ld-linux.so.2 (0xb780a000)
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Diff Command is possible for me? admod Linux - Virtualization and Cloud 1 11-21-2010 09:42 AM
will 'diff' give the difference b/c the files under subdir Ashok_mittal Linux - Newbie 2 01-16-2008 05:59 AM
How to use 'diff' command ursusman Linux - Newbie 1 03-08-2007 04:29 AM
How can I use diff to difference between programs output? nadavvin Linux - General 4 08-05-2006 04:35 AM
What's the difference between .diff and .patch? nidua18 Linux - Software 0 10-15-2003 12:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration