By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,219 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,219 IT Pros & Developers. It's quick & easy.

Anyway to change the file create date?

P: n/a
wil
Dear All,

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

Thanks,
wil.
Nov 14 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In article <fa**************************@posting.google.com >,
wil <xw***@mail.hongkong.com> 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
Nov 14 '05 #2

P: n/a
In <fa**************************@posting.google.com > xw***@mail.hongkong.com (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: Da*****@ifh.de
Nov 14 '05 #3

P: n/a
>>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
Nov 14 '05 #4

P: n/a
On 20 Jul 2004 17:49:23 GMT,
Gordon Burditt <go***********@burditt.org> 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
Nov 14 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.