This assignment is designed to help you become familiar with UNIX file I/O, e.g.
ID: 658494 • Letter: T
Question
This assignment is designed to help you become familiar with UNIX file I/O, e.g., open(), close(), read(), write(), etc. In this assignment, you are going to write a program that does the following:
Your program takes two directories as parameters, say, dirA and dirB, and will synchronize the two directories.
More specifically, if a file exists in dirA and it does not exist in dirB, the file must be copied to dirB. Similarly, if a file exists in dirB and it does not exist in dirA, the file must be copied to dirA.
For the files that exist in both directories, the file with the most recent modified data/time must be copied from one directory to the other.
Eventually, your program will make the two directories have the same files with the same modified data/time.
Explanation / Answer
The following points may be helpful.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.