How can I fix corrupt Creation Dates?

Discussion in 'Mac Basics and Help' started by Mebsat, Mar 17, 2010.

  1. Mebsat macrumors regular

    Joined:
    May 19, 2003
    Location:
    Florida
    #1
    While upgrading a MDD G4 to Leopard and backing up beforehand,
    I noticed the creation dates on the root level of the drive had been corrupted/changed to April 5, 1976.

    These folders were affected:
    Macintosh HD, /Applications, /Library, /Users, etc.
    (but not /Users/username folder, which has a valid date, as do most enclosed folders)

    Also, Tiger would not correctly update the “last opened on:” field in Get Info, so I decided to upgrade to Leopard and hope for the best.

    While trying to fix this before upgrading I:

    Ran Disk Utility
    Repaired Permissions
    Ran Disk Warrior 4.2
    Flashed the PRAM
    Changed the 3.6V battery (it wasn’t bad)
    Reset the PMU
    Sacrificed a few small animals
    and ran FSCK in single-user mode

    To backup, I CCC’d the drive to an external and it of course now reads the 1976 creation date on that drive as well (awesome!).

    After upgrading to Leopard (Archive and Install), and then 10.5.8, the machine runs fine.

    But the creation dates remain at April 5, 1976.
    However, Leopard did fix the issue of “last opened on.”

    I understand that these dates get corrupted due to power outages and bad batteries.
    (This machine has been left unplugged for long periods of time, frequently >3 weeks)

    The QUESTIONS:

    If I’m stuck with these dates, does it matter at all?
    Is there no way to *repair* the creation dates back to the correct dates once they are corrupted? (I feel like this used to be fixable.)
    Should I bother fixing them manually in the Terminal via the touch command? (Do I just pick a date closer to what it *should* be?)
    Should I format and start over?

    Any advice or tales of similar experiences would be appreciated.

    Thanks in advance.
     
  2. Queso macrumors G4

    Joined:
    Mar 4, 2006
    #2
    The creation dates shouldn't matter. You can change the last accessed or modified dates with the UNIX "touch" command.
     
  3. Mebsat thread starter macrumors regular

    Joined:
    May 19, 2003
    Location:
    Florida
    #3
    Thanks, Queso.

    I kind of figured it didn't matter too much, but it's still kind of irksome.

    Any idea how to write the command in terminal so that I can change all the 1976 dates to 2005, without doing them one by one?
     
  4. Queso macrumors G4

    Joined:
    Mar 4, 2006
    #4
    Personally I would use the find command to list everything and pipe to touch. It's been a while since I did this, but if I get a chance this afternoon I'll check on a command syntax and post back.

    (Sorry, a bit busy right now :eek:)
     
  5. Mebsat thread starter macrumors regular

    Joined:
    May 19, 2003
    Location:
    Florida
    #5
    Much appreciated, I'm not so terminal savvy...
     
  6. Queso macrumors G4

    Joined:
    Mar 4, 2006
    #6
    OK. Firstly, if you don't have a backup of the drive now's the time to do one (just in case).

    Then open the Terminal and type:-

    cd /
    sudo find . -exec touch -t 20100318hhmm {} \;


    Replace hhmm with the current time. This will take a while but all files should then have the last modified date and time as you've entered it. If you want to test this first you can navigate to a directory (for instance ~/Desktop, which is your account's Desktop) and run the second command.
     
  7. Mebsat thread starter macrumors regular

    Joined:
    May 19, 2003
    Location:
    Florida
    #7
    Thanks for your help, Queso

    (it did the trick)
     
  8. Queso macrumors G4

    Joined:
    Mar 4, 2006

Share This Page