How do `stat` and `file` differentiate symlinks? I was doing my routine work today and it seems the stat and file commands in the terminal don‘t show if a file is a symbolic link:

flow2k@myPad:dir ln -s aa.iml superlink
flow2k@myPad:dir stat superlink
16777220 11057327 lrwxr-xr-x 1 flow2k staff 0 6 "Dec  2 13:25:34 2017" "Dec  2 13:25:34 2017" "Dec  2 13:25:34 2017" "Dec  2 13:25:34 2017" 4096 8 0 superlink


How can I see whether something is a symlink?
The l in lrwxr-xr-x shows that is is a (symbolic) link.
Use readlink file to show where the symbolic link points to.

The stat manual page states:


  When invoked as readlink, only the target of the symbolic link is printed.  If the given argument is not a symbolic link, readlink will print nothing and exit with an error.