• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need way to set the Creation date of a file via OSX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need way to set the Creation date of a file via OSX


  • Subject: Re: Need way to set the Creation date of a file via OSX
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sat, 21 May 2005 21:05:45 -0400

chmod/chown don't let you set the creation time directly, but when you use them to change the mode or owner (or use chgrp to change the group, or ln to create another hard link to the file, or do anything else that affects the file's metadata, that updates the ctime to the time of the change.

At least, that's how it's supposed to work.  But on Tiger HFS+ the ctime seems to change every time the mtime does... which confuses me.

Here's an example from a Linux system:

I was mistaken; I should have known better.  Any time you change the metadata associated with a file, the ctime is updated.  That includes changing the modification time, so any time the mtime changes, the ctime does as well.  It's not in any way  a creation time; it's a change time.  I had the relationship backwards as far as which one changes more often.

The ctime will change when the mtime doesn't - when the file mode is changed with chmod, or the owner with chown, or the group with chgrp, or the number of links with chgrp, etc.  Those actions don't change the modification time, because the file contents don't change, but they do change the ctime.



On 5/21/05, cris <email@hidden> wrote:

On May 18, 2005, at 1:07 PM, Mark J. Reed wrote:

> touch doesn't change the ctime either, unless you're using a
> version that supports that as a special option and supply said
> option.   chmod and chown, however, do.  ctime is basically the
> mtime for the inode.

Can you give an example how changing the creation date should work
with chmod/chown?

Greetings
cris



--
Mark J. Reed < email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Need way to set the Creation date of a file via OSX
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Need way to set the Creation date of a file via OSX (From: "Mark J. Reed" <email@hidden>)
 >Re: Need way to set the Creation date of a file via OSX (From: "John C. Welch" <email@hidden>)
 >Re: Need way to set the Creation date of a file via OSX (From: "Mark J. Reed" <email@hidden>)
 >Re: Need way to set the Creation date of a file via OSX (From: cris <email@hidden>)

  • Prev by Date: Waiting for script to exit
  • Next by Date: Re: Need way to set the Creation date of a file via OSX
  • Previous by thread: Re: Need way to set the Creation date of a file via OSX
  • Next by thread: Re: Need way to set the Creation date of a file via OSX
  • Index(es):
    • Date
    • Thread