Copying and insuring directory and subdirectory contents have been synchronized.

From: Davis Kriss P (kpdavis_at_ILSTU.EDU)
Date: 04/25/03

  • Next message: Bill Verzal: "Re: Copying and insuring directory and subdirectory contents have been synchronized."
    Date:         Fri, 25 Apr 2003 09:10:26 -0500
    To: aix-l@Princeton.EDU
    
    

    I was wondering if anyone here has a suggestion or script to share on
    this.

    I really don't need a byte comparison, what I would like to know is if
    the filesizes are different primarily and/or change dates. The contents
    of the files will probably follow along if the sizes mesh.

    Every once in awhile, the users of one of our UNIX applications want a
    copy of the data in the LIVE/PRODUCTION subdirectories placed into the
    TEST subdirectories.

    Logged in as root, I use:

    cd /datatel/live/collive

    cp -pr DATA /datatel/work/c16test/

    The intent is to get everything in DATA and its subdirectories from
    collive to c16test.

    This actually works pretty well EXCEPT it does not copy all the files
    and does not output an error message when it skips one.

    We have one or two data files that are REALLY huge and their names
    change periodically. These do not copy over I think because there is no
    room to hold two copies of the file while the copy command completes.

    It would be nice to know this has happened so you could go back and copy
    the individual files after the global copy or better yet, have a better,
    more durable copy method.

    I was also thinking of building a script with rm commands in it for some
    of the bigger files to allow the cp command more space to work.

    I do not see a VERBOSE option for cp anywhere to help me know an
    individual file was not copied.

    The DATA directory and its subdirectories have several GIG of data and
    files in them and doing a stanard recursive DIF is real output
    intensive.

    Any ideas on how to make this more bulletproof or at least have some
    output to know there was a problem?

    Thanks in advance,

    Kriss Davis
    Ill. State University
    kpdavis@ilstu.edu


  • Next message: Bill Verzal: "Re: Copying and insuring directory and subdirectory contents have been synchronized."

    Relevant Pages