It's UWAweek 9 (1st semester, week 1)


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 1168 articles.
Currently 4 other people reading this forum.

 UWA week 39 (2nd semester, week 9) ↓
SVG not supported

Login to reply

4:14am Fri 29th Sep, Christopher M.

> 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.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy