0
votes
1answer
32 views

How to capture diff output from find command exec?

I am using Ubuntu (Precise 12.04) I am trying to write some bash script to see if file is changed via awk replace by using diff command. I did a test with the following: #! /bin/bash diff fileA.htm ...
0
votes
1answer
30 views

Dynamic diff of one file

I am trying to diff one file over time using process substitution in bash. diff <(cat /path/to/file | sort; sleep 20) <(cat /path/to/file) I also tried: diff <(cat /path/to/file | sort ...
1
vote
2answers
32 views

Find two newest change files and compare them

I have a script that wgets a .txt file and datifies the names. I'd like to diff the changes between the newest & next-to-newest file. This is how I am able to select them: ls -t -l | awk ...
1
vote
1answer
40 views

recursive diff of files case-insensitive

How do I run a recursive diff when the filenames are the same but have different cases? For instance: ./Root/Directory/FileName.txt ./Branch/directory/filename.txt diff -r -i Root Branch only ...
3
votes
1answer
559 views

Recursive diff and symlinks

I'm trying to diff two directories using (well) diff. However, diff actually follows symlinks and compares differences between the targeted files. I can't seem to find a way to not have diff do this. ...
1
vote
1answer
41 views

recursive diff with per-file preprocessing

How do I get a combined effect of diff -r left_dir right_dir and diff <(cat left_file | myfilter) <(cat right_file | myfilter) without much scripting?
1
vote
2answers
2k views

Rsync print only files that would have been changed

Is there a way to get rsync to print the full filepaths to all files that are different without actually transferring any files? Alternatively, I need a way to diff the files across two trees (over ...
4
votes
1answer
230 views

Diff between two directories and keep only the unchanged ones

I need to diff two directories: A: /path1/ B: /path2/ The directory A contains all files and subdirectories that are also contained in B. The files in A (and in its subdirectories) can have ...
1
vote
1answer
2k views

diff directories, excluding one folder inside

I think I have two directories with the same content, but I want to check it. Also, I want to exclude a folder that is inside both directories. How can I do it?
3
votes
2answers
2k views

Diff two files side by side, new lines on left column for no match

This has been getting the good half of my day and I am sure such a solution must exist (if not, then I am programming one), but alas, here is the question. I have two files, hpc.sorted.modules.txt ...
1
vote
2answers
1k views

Diff and ignore lines missing in one file

I want to diff two files and ignore lines that are present in one file but missing in the other. For example File1: foo bar baz bat File2: foo ball bat I'm currently running the following diff ...
4
votes
3answers
697 views

Diff 2 files while ignoring parts of lines

I would like to diff a file system. Currently my bash script prints out the file system recursively into a file (ls -l -R) and diffs it with an expected output. An example for a line in this file ...
3
votes
3answers
2k views

Diff in bash script?

I've been toying around with makefiles and bash scripts and I'm interested in this: Is it possible to get a boolean value from a diff(or something similar) so that I can use it in a bash script to ...
1
vote
1answer
185 views

Check for duplicate files in two collections, ignoring duplicates within A

I have four similar large collections of website files. They are archived copies of a similar directory tree from different times in the past. I want to merge them all to the most recent collection, ...