Data Catalog From Filesystem
creating an inventory by scanning a collection of folders
February 24, 2023
`diff` Also Compares Directories
Short post so that I can remember this everytime I need to do something similar! Using diff on more than individual files The quick and dirty explaination is that the GNU/Linux diff command has an -r flag to recursively compare two folders. The command help indicates that it is shorthand for the full --recursive flag, which might be easier to remember. diff --help # ... -r, --recursive recursively compare any subdirectories found # ... Example In the following example, “Only in” shows that particular files are only found in one of the folders. By default, matching files are not shown. If a file can be found in both folders and the two versions differ, the normal diff output is provided along with the modified times. All together these details provide a good summary of what a user might want to know when comparing two directories.
December 15, 2022