Overview of Utility to Recursively Compare Directories
by John Vincent
Posted on May 1, 2018
Recursively Compare Directories
The purpose of this utility is to provide to a developer the ability to quickly and easily find all differences between 2 directories. The only files remaining are files that are different. These files can then be compared and the differences noted.
The aim is to delete all files that are of interest before performing the actual compare.
- Allows for a compare to be performed.
- Identical files may be deleted.
- Allows for differences to be shown.
For binary files, compares are performed at the byte level. Otherwise, compares are performed at the character level.
- Messages are logged to the file by default, or the application.
- Allows for the creation and display of the statistics of the last comparison.
- Make all file priveleges read and write. This is probably best performed at the OS level.
- Enable/Disable messages.
- Drag and Drop
To execute app from the command line, use
Provide two directories you wish to compare.
Cleaning options are for removing files that are not of interest. Thins out the forest so you can see the trees.
The compare options perform the actual compare. Delete if identical allows for more cleaning out of files that are not of interest.
The aim is to end up with a detailed compare log of all differences between the two directories.
At Github, create repository
cd /Users/jv/Desktop/MyDevelopment/github/java/Utilities create-repo java-diffall
Remove non-relevant files.
For details, see Diffall/README.md
- Right click, Services
Create Java Project
- File, New, Project
- Java Project
Project Name: Diffall
Use default location
JRE; Use an execution environment JRE: JavaSE-1.8
Create separate folders for sources and class files
Default output folder:
- Right click, New, Package
Copy code to this package and change package names.
Create Symbolic Link
ln -s /Users/jv/Desktop/MyDevelopment/github/java/Utilities/java-diffall/Diffall/diffall.command /Users/jv/Desktop/MyDevelopment/github/repo_shell_scripts/mac/unix-scripts/bin/java-diffall
Save java-diffall as a Mac App
Execute from Finder
- Go, Applications
- Execute: Automator (or Automator.app)
- Quick Action, or
and then select
From the middle pane, double click Run Shell Script
Shell: /bin/bash Pass input: as arguments
- File, Save:
- Save as: java-diffall
- Where: Applications
saves java-diffall.app in Applications.