I want to check if a file is changed or no using stat linux command.
linux@server:~/$ stat test.txt File: `test.txt' Size: 23
Blocks: 8 IO Block: 4096 regular file Device: 802h/2050d Inode: 4887765 Links: 1Access: (0644/-rw-r--r--) Uid: ( 1000/ anis) Gid: ( 1000/
anis)Access: 2014-07-07 16:34:42.476315578 +0200
Modify: 2014-07-08 12:54:15.756553868 +0200
Change: 2014-07-08 12:54:15.756553868 +0200
we can see the time of change. the purpose is to use this change time to check if the file is modified or no
linux@server:~/anis$ stat test.txt |grep Change
Change: 2014-07-08 12:54:15.756553868 +0200linux@server:~/anis$ stat test.txt |grep Change
Change: 2014-07-08 15:14:03.107977776 +0200
so how made script running in infinite loop to check if time is changed ?