I need to write a bash shell script to achieve the following. Get a list of all files from a directory. In the destination directory, if any of these files exist, compare the dates. Copy files to the destination directly only when the source file is newer than the target file. You must do this for each file. I created a for loop to get a copy. But I need help comparing file dates.
thanks
source share