Stat Symbolic Link
stat file
it only shows data on when the symbolic link was created.
I was hoping to get data on when the origin had been modified.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communitystat
calls lstat(2)
(by default) to get it's data. As the symlink occupies an inode in the filesystem, it gets the relevant data from that inode, which includes the modification time.
If you want to follow symlinks, stat
has -L
(--dereference
) option, which uses stat(2)
instead of lstat(2)
:
stat -L file