IntegrityChecker java (icj): Command Line Usage Tips
Quick intro — drag-and-drop
Most people are not comfortable with the command line. It is simple to use.
- Open a Terminal window (/Applications/Utilities/Terminal).
- Type "icj" followed by a space followed by the command (e.g. verify or update).
- Type a space after the command, then drag anything into the Terminal window from the Finder (a folder or multiple folders, or a volume or even multiple volumes).
- Press the RETURN or ENTER key.
In step #3, you can also type in the desired item(s) instead.
- To stop (forcibly kill) icj in a Terminal window, type control-C (control, not cmd).
- To temporarily suspend icj in a Terminal window, type control-Z. To resume, type "fg" (foreground).
- The macOS file cache can steadily degrade performance as it caches absolutely everything that icj reads. There is currently no technical way to tell macOS to not cache when reading files from a Java program. The performance hit can be up to 40% on machines with lots of memory. Any time there is more than 50GB of data, it would be wise to enable cache flushing To enable icj to flush this cache, run icj using "sudo" as in:
sudo icj verify MasterData
- Spaces matter in file, folder and volume names. So you want to verify the volume "My Stuff", the volume name must be quoted, like this (include the straight quotes):
icj verify "My Stuff"
To avoid this nuisance, it is better just to rename volumes and folder to not use spaces at all eg MyStuff”, not “My Stuff”.
- icj can be run more than one Terminal window. So if you want to simultaneously operate on three different backup drives (such as to verify), just open three Terminal windows and start icj in each window, something like:
icj verify Volume1 s
icj verify Volume2
icj verify Volume3
Just keep in mind that running more than one icj at the same time on the same hard-drive-based storage volume will slow things down substantially, due to disk-drive head contention. This is not an issue with SSDs.
- You can "detune" icj if it is desirable for it to use less CPU time buy specifying few threads and buffers. For example, adding these options will limit icj to just two hashing threads and four I/O buffers:
icj verify --threads 2 --large-buffers 4 MyData
- To verify folders/volumes one after another in series, the best way is separate invocations. This invocation does the three items as a single job:
icj verify MyStuff Work MasterData
Whereas this series of three commands runs three invocations, one after another (use a ";" to separate the commands):
icj verify MyStuff; icj verify Work; icj verify Photo
Overview of commands
Typing "icj" or "icj help" in Terminal will show this summary.
diglloyd-MacPro:MPG lloyd$ icj ... Available commands: verify verify hash values
status summarize files that are new, or of changed size or date: options --ignored
update update new and date/size changed files, forget missing items: options --hmode icj|icjh|both
update-all update hash values for all files, whether or not they already have hashes: options --hmode icj|icjh|both
update-new update only files lacking hash values: options --hmode icj|icjh|both
clean remove hash data files: options --kind=ic|icj|icjh|all
compare compares two folders for equality
dupes show duplicate files, emit remove or cloning commands: options --size=<size> --types=type[,type]* --emit=<rm|clone|symlink|nop>
empty show empty files
pref open preferences eg open ~/.icj_prefs
sha test hashing speed: options --size <size> --repeat <num> --sha <SHA-512|SHA1>
version display the version and other information
help show help summary, or show help for specific command eg 'help verify'
Lines that start with "#" are comments. These examples assume a folder called MyStuff and a volume (entire drive) called Work.
# ensure that hashes exist for all files on volume Work
icj update Work # ensure that hashes exist for all files in folder MyStuff icj update MyStuff # ensure that hashes exist for all files in folder /Volumes/Work/Photos icj update /Volumes/Work/Photos
Copyright © 2008-2010 diglloyd Inc, all rights reserved