ANONYMOUS wrote:
> 1. when not using -r, I'm assuming any sub directories found are ignored (otherwise is an empty sub directory with same name copied)
Without -r we only consider the files (not directories) in each top-level directory provided on the command-line.
With -r we consider all files and sub-directories in and below the top-level directories.
> 2. what happens if there exists 2 files of same name and same modification time in 2 different directories being syncd, but they have different contents, which one is desired as they're not identical?
> 3. are the identified files in the -n just printed into the shell / stdout?
With -n we don't have to print anything at all. Anything printed (debug output, whatever) will be ignored.
> Also, got a funky example scenario of various directories that will be syncd by mysync below. Can you please tell me what each directory would look like after syncing, thank.
> This is assuming default application of the program, so like [./mysync dir1 dir2 dir3]
> symbol + is used to denote the file that is up to date, having highest modification time.
The command ./mysync dir1 dir2 dir3 will result in all 3 directories each having a copy of all the files found in all 3 directories.
If 2 or more directories have any file with the same name, the the newest one will be copied to all 3 directories.
(hope that answers it).
>
> By my current understanding and assumptions, I would believe every directory (dir1,dir2,dir3) would each have the most recent files (file1+, file2+, file3+), and the subdirectories would be ignored? Again, a specific solution to my example would be very helpful.