Hi guys !
I have a quick question. I have a symlink which points to file in directory. Now I need to run 'stat' on the original file. The symlink is dynamic and keeps on pointing to different locations in different times. But when I run 'stat' on this symlink it gives me the properties of the symlink , not the file it is pointing to. How can I get the modified date of the actual file it is pointing to rather than the symlink ? any ideas ?
[Testing: /tmp]$ stat /iso
File: `/iso' -> `/misc/2007.bin'
Size: 46 Blocks: 0 IO Block: 4096 symbolic link
Device: 1h/1d Inode: 4573 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2007-07-10 11:10:48.817069000 +0000
Modify: 2007-07-10 10:36:52.633381000 +0000
Change: 2007-07-10 10:36:52.633381000 +0000
[Testing: /tmp]$ stat /misc/2007.bin
Size: 38211864 Blocks: 74728 IO Block: 4096 regular file
Device: 801h/2049d Inode: 14 Links: 1
Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2007-07-10 10:59:30.000000000 +0000
Modify: 2007-07-10 10:34:04.000000000 +0000
Change: 2007-07-10 10:34:04.000000000 +0000
You can see they are different.