[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what file's mtime is the current time?

G> If you realy, realy, realy need to do this /proc/self would be much
G> better since you don't have rights for the inits proc entry in a
G> chroot.

But that is not "now":
$ stat -c %y /proc/self /proc/1;LC_ALL=C date
2003-08-18 06:10:52.000000000 +0800
2003-08-18 06:21:24.000000000 +0800
Mon Aug 18 06:21:24 GMT-8 2003
P.S. won't be using chroot.

T> Why would you need to do that?

I want to do
$ test file1 -nt filenow
to see if the mtime of file1 is in the future or not, in a simple
shell script.

Reply to: