Sponsored Content
Full Discussion: diff command
Top Forums UNIX for Dummies Questions & Answers diff command Post 48070 by w33man on Thursday 26th of February 2004 05:48:55 AM
Old 02-26-2004
If dir1 is a directory
containing a directory named x,
and dir2 is a directory
containing a directory named x,
dir1/x and dir2/x both contain files named date.out,
and
dir2/x contains a file named y,

the command:
example% diff -r dir1 dir2
could produce output similar to:

Common subdirectories: dir1/x and dir2/x
Only in dir2/x: y
diff -r dir1/x/date.out dir2/x/date.out
1c1

Dont know if this helps more info in the man diff
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Diff command problem

Folks, I am Diff'ing 2 identical files..and the result is, it shows all the lines from 2 files (saying nothing is being matched). If I copy the content from 1 of the file and paste in a newly created file and then do the diff, it equals. 2 files are xml files. I've tried many... (4 Replies)
Discussion started by: gvsreddy_539
4 Replies

2. Shell Programming and Scripting

diff command

All, How to exclude a directory while diff execution? For ex: To exclude file which we don't want to see diff, we have -x <filename>. Thanks in advance (1 Reply)
Discussion started by: Vichu
1 Replies

3. Shell Programming and Scripting

need help in diff command :

i have 2 file named test1,test2 contents of test1: 1 2 3 --------------------------- contents of test2: 1 2 3 4 5 -------------------------------------------------------- my desired o/p should be: diff test2 test1 4 (5 Replies)
Discussion started by: ali560045
5 Replies

4. AIX

diff command

hello i've two files. how i get the diff between the two files to new file. thanks best regards ariec (3 Replies)
Discussion started by: ariec
3 Replies

5. UNIX for Dummies Questions & Answers

diff command

Is there any option for the diff command (or maybe an entirely different command) that will give you only the text that differs between two files? When I use diff file1 file2, if any text on that line differs from one file to the next it'll print out the entire line. I'd like to see only the text... (2 Replies)
Discussion started by: red baron
2 Replies

6. Shell Programming and Scripting

diff command help

Hi all diff file1 file 2 command will give us op of diff between two file. But it aslo give its position and sign "<" or ">". I dont want position and sign in op. Only diff of content should be come as op. Kindly help me for this. Regards Jaydeep (1 Reply)
Discussion started by: jaydeep_sadaria
1 Replies

7. UNIX for Dummies Questions & Answers

Diff command of two files

Hi, I use the diff command to compare two files and append this output to a file. I would like to now not only produce the differences but be able to output the total number of changes made, the number of new files added and the number of files deleted, is there I can do this using the diff... (2 Replies)
Discussion started by: cyberfrog
2 Replies

8. UNIX for Dummies Questions & Answers

Re:using the diff command

Hi Guys I have a situation where I would like to use the diff command but I would like to see "number" of differences and than send it through and if statement and than view the difference if greater than 1. Eg. diff file1 file2 > than gives the "number" and I than say - if number >1... (3 Replies)
Discussion started by: Prega
3 Replies

9. Shell Programming and Scripting

One-way diff command?

Hello, I am trying to find the different files between multiple directories in Linux, here is a small assumption of what is inside the directories dir1 dir2 dir3 1.txt 1.txt 1.txt 2.txt 3.txt 3.txt 5.txt 4.txt 5.txt 6.txt 7.txt 8.txt I am using the following... (4 Replies)
Discussion started by: Error404
4 Replies

10. UNIX for Dummies Questions & Answers

Help with diff command

Platform :Oracle Linux 6.4 Shell : bash In the below sample, although the lines in a.txt and b.txt are jumbled up, there is only one difference : b.txt has an extra line NETHERLANDS $ cat a.txt SPAIN NORTH KOREA PORTUGAL GERMANY SYRIA $ $ $ cat b.txt GERMANY NORTH KOREA SPAIN... (6 Replies)
Discussion started by: John K
6 Replies
rsnapshot-diff(1)														 rsnapshot-diff(1)

NAME
rsnapshot-diff - a utility for comparing the disk usage of two snapshots taken by rsnapshot SYNOPSIS
rsnapshot-diff [-h|vVi] dir1 dir2 DESCRIPTION
rsnapshot-diff is a companion utility for rsnapshot, which traverses two parallel directory structures and calculates the difference between them. By default it is silent apart from displaying summary information at the end, but it can be made more verbose. In the summary, "added" files may very well include files which at first glance also appear at the same place in the older directory structure. However, because the files differ in some respect, they are different files. They have a different inode number. Consequently if you use -v most of its output may appear to be pairs of files with the same name being removed and added. OPTIONS
-h (help) Displays help information -v (verbose) Be verbose. This will spit out a list of all changes as they are encountered, as well as the summary at the end. -V (more verbose) Be more verbose - as well as listed changes, unchanged files will be listed too. -i (ignore) If verbosity is turned on, -i suppresses information about symlinks, directories, and special files. dir1 and dir2 These are the only compulsory parameters, and should be the names of two directories to compare. Their order doesn't matter, rsnapshot-diff will always compare the younger to the older, so files that appear only in the older will be reported as having been removed, and files that appear only in the younger will be reported as having been added. SEE ALSO
rsnapshot BUGS
Please report bugs (and other comments) to the rsnapshot-discuss mailing list: http://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss <http://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss> AUTHOR
David Cantrell <david@cantrell.org.uk> COPYRIGHT
Copyright 2005 David Cantrell LICENCE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 2011-07-09 rsnapshot-diff(1)
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy