comparing dates on files and comparing latest over older


Results 1 to 4 of 4

Thread: comparing dates on files and comparing latest over older

  1. #1
    Join Date
    Dec 2002
    Posts
    338

    comparing dates on files and comparing latest over older

    I want to set it up to have 3 respositories of source files for my program. I want one on my windows drive, one on my linux drive, one on my web server(partion of my linux drive). Now what I want to do is set up a cron script that runs periodically and checks which if either of the dates on windows or linux files are newer then the webserver version and if so takes the newest one and copies it over the other too. How can I do such a thing? I would like to do this without much programming but if its required I know c/c++ and perl.

  2. #2
    Join Date
    Feb 2002
    Location
    NC, USA
    Posts
    33
    Have you looked at rsync
    Does all that itself
    AMD Athlon 1.3 Ghz
    Fedora Core 1
    512 MB RAM
    Nvida Riva TNT2 Video Card

  3. #3
    Join Date
    Dec 2002
    Posts
    338
    that would work but it doesn't look like it compares file dates just copies from the source to destination, that I can do with cp .

  4. #4
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,947
    Is there some other server that's up all the time? You might be able to put the main repository there, and use CVS or something like it to sync the other three source trees.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •