To perform a recursive diff on all the files of two folders we just need to add the -r (or --recursive) parameter that recursively compares any subdirectories found.
To avoid needless messages from the tool, we can also use the -q (or --brief) parameter that reports only when files differ.
Example of performing diff on two folders recursively while preventing needless messages.
Gotta love diff! Finding all files and folders that are different in two locations is extremely easy. Using only two parameters we can exhaustively compare two directories, including their sub-directories and produce a list of their differences as such: The -q parameter instructs diff to print only the files that…
Recently, we had to create a git patch for the deployment of a 3rd party repository in our code. Some of the changes we had to apply using the patch mechanism was the creation of a few new files. We did not want to have an external script to copy…
Assuming you have a whole bunch of files that you need to change their extension from one to another, you can use the following commands after setting the values for the BEFORE and the AFTER variables to the values you need. BEFORE='.txt'; AFTER='.csv'; find . -type f -name "*$BEFORE" -exec…