LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Checking Timestamps on RHEL4 (https://www.linuxquestions.org/questions/linux-enterprise-47/checking-timestamps-on-rhel4-602531/)

ajatiti 11-26-2007 02:26 PM

Checking Timestamps on RHEL4
 
Hi,

I have RHEL4. I want to check the timestamp of the files and then compare with the system time, if it's same then OK otherwise error.

Could anybody please give me the command or a script to execute this?

Thanks,
Aj

unSpawn 12-01-2007 05:55 AM

Using epoch time you could
Code:

test `stat -c %Y /etc/mtab` -ne `date +%s` && echo error


All times are GMT -5. The time now is 05:19 AM.