ANONYMOUS wrote:
> Hi there, hope everyone is doing well.
>
> I have two questions
>
> First : ./mysync -r -a dir1 dir2
>
> Since -a ask that all directories including . and .. be synced and -r ask that everything in the subdirectories also be synced recursively. When I try to sync ., it becomes a infinite loop as cd . brings me to my current working directory and cd .. brings me to my parent directory and since both of them contain . and .., I don't know where to stop
the answer is the same to this one:
[help2002]⬈
> Second : ./mysync -a -p dir1 dir2
>
> Upon reading some web results online, it seems like MacOS does not support files that start with . for their modification time to be changed. Does this mean that when I run this command, I am only required to change the modification times and permissions of the regular files & directories? Thank you.
I'm unsure what webpage you've read, or if you're misunderstood it, but try this command:
touch .hidden ; ls -ld.hidden ; sleep 65 ; touch .hidden ; chmod 444 .hidden ; ls -l .hidden
The names of regular files and directories can both begin with '.' - no restrictions.
AND, a reminder that the project will be marked on Linux, and not macOS.