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.


stat 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.