Changing Timestamp

Apr 17, 2013 at 5:18pm
Hi, i m working on a project to simulate the behavior of touch command using c programming in linux. I can create the file easily but can't change the time stamp as in touch command.
I m passing the file name on command line.
Plz hlp me.
Apr 17, 2013 at 5:52pm
The thing about open source, is that you can see the source.

This is the source code for touch on FreeBSD 9.1.0
http://svnweb.FreeBSD.org/base/release/9.1.0/usr.bin/touch/touch.c?revision=243808&view=markup

See line 206 for the answer.
Apr 17, 2013 at 8:00pm
thank u
Topic archived. No new replies allowed.