Anyway to change the file create date?

Discussion in 'C Programming' started by wil, Jul 20, 2004.

  1. wil

    wil Guest

    Dear All,

    In the linux platform, is there anyway I can in a C program change the
    file create date?

    Thanks,
    wil.
     
    wil, Jul 20, 2004
    #1
    1. Advertising

  2. In article <>,
    wil <> wrote:
    >Dear All,
    >
    >In the linux platform, is there anyway I can in a C program change the
    >file create date?


    No record of a file's creation date is kept in unix (and linux)
    systems. The file system may keep a record of change, access and
    modification times only.

    Do "man 2 utime" for details.

    comp.unix.programmer is the right place to ask for further questions
    on this issue.

    --
    rr
     
    Rouben Rostamian, Jul 20, 2004
    #2
    1. Advertising

  3. wil

    Dan Pop Guest

    In <> (wil) writes:

    >In the linux platform,


    If you need a linux solution, ask in Linux/Unix programming newsgroup.

    >is there anyway I can in a C program change the file create date?


    Nope: C files have no timestamps. But Unix files do.

    Dan
    --
    Dan Pop
    DESY Zeuthen, RZ group
    Email:
     
    Dan Pop, Jul 20, 2004
    #3
  4. >>In the linux platform, is there anyway I can in a C program change the
    >>file create date?

    >
    >No record of a file's creation date is kept in unix (and linux)
    >systems. The file system may keep a record of change, access and
    >modification times only.


    Actually, on some UNIX systems, such as FreeBSD 5 when using a UFS 2 filesystem,
    there is a "file birth" date. Usually the reference to a "creation date" is
    from some bad documentation that called the st_ctime element of struct stat
    a "creation time" rather than an "file changed time".

    >Do "man 2 utime" for details.


    man 2 utime on FreeBSD 5 refers me to man 2 utimes, which discusses file birth
    dates.

    >comp.unix.programmer is the right place to ask for further questions
    >on this issue.


    Gordon L. Burditt
     
    Gordon Burditt, Jul 20, 2004
    #4
  5. wil

    Villy Kruse Guest

    On 20 Jul 2004 17:49:23 GMT,
    Gordon Burditt <> wrote:


    > Actually, on some UNIX systems, such as FreeBSD 5 when using a UFS 2 filesystem,
    > there is a "file birth" date. Usually the reference to a "creation date" is
    > from some bad documentation that called the st_ctime element of struct stat
    > a "creation time" rather than an "file changed time".
    >


    which isn't the same type of change as is recorded in the modification time.

    Villy
     
    Villy Kruse, Jul 21, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    645
    Matthew Speed
    Nov 8, 2003
  2. YeeCN
    Replies:
    1
    Views:
    1,898
    =?Utf-8?B?S29zdGFkaW4gS29zdG92?=
    Mar 11, 2005
  3. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,361
    Michael Borgwardt
    May 30, 2004
  4. Matt
    Replies:
    2
    Views:
    565
    Pete Becker
    Nov 8, 2003
  5. Wensui Liu

    anyway to create a table-like object?

    Wensui Liu, Feb 14, 2007, in forum: Python
    Replies:
    3
    Views:
    323
    Dennis Lee Bieber
    Feb 15, 2007
Loading...

Share This Page