Compare new version of two directory

How to compare new version exist of two path directory.
for e.g., path1 - /user/path/test/
path2 - /user/path/score/

If its exist new version then copy that new version into the first path directroy. How will do this.

You have to loop through the files from one directory and compare it with other one using -newer option of find command if its new copy or move the new file to the other directory..

Need that script

---------- Post updated at 08:07 AM ---------- Previous update was at 07:11 AM ----------

To get help:

  • Show a listing of the two directories, with one or two files in each.
  • Show what the desired result is, how it will look after the script runs.
  • Show what you've tried so far.

This will help people understand what you are trying to do, keep us from trying to read your mind. :slight_smile: