Tag Info

New answers tagged

3

You can compare directories with diff: $ diff -qr dirA dirB Only in dirB: file.txt Files dirA/README and dirB/README differ


0

Solution 1: You can have a look there: http://askubuntu.com/questions/111495/how-to-diff-multiple-files-across-directories, especially Rinzwind's answer which stipulates that you can do directly diff -qr Folder1 Folder2. The other solutions are only useful if you want to merge the results. Solution 2: If you can run GUI application, the best solution would ...


0

I am sure that there are specialized tools for that purpose (fdupes comes to my mind) this simple script should do the job: #!/usr/bin/env sh if [ "a$1" = a -o "a$2" = a ] then echo Directory name missing. echo Exiting exit 1 fi for i in "$1"/* do filename=$(basename "$i") diff "${1}/${filename}" "${2}/${filename}" > /dev/null ...


0

You can use grep function to see the difference (file3 is the output file): grep -Fxvf file1 file2 > file3 Where the flags are: -F : Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. -x : Select only those matches that exactly match the whole line. -v : Invert the sense of matching, to select ...


1

gnu diff provided you have gnu diff (from diffutils, diff (GNU diffutils) 3.3). diff --old-line-format='old %L' --new-line-format='new %L' --unchanged-group-format='' u v old PV Name /dev/dsk/c0t4d0 new PV Name /dev/dsk/c99t4d0 (redirecting to a file is explain below). basic diff with awk with basic diff, ...


1

diff a b > differences should do the job. The differences between the two files will be stored in the file differences.



Top 50 recent answers are included