How can I get the absolute path of a symbolic link? If I do it as follows:
char buf[100]; realpath(symlink, buf);
I will not get the absolute path for the symbolic link, but instead I will get the absolute path referenced by the symbolic links. Now my question is: what if I want to get the paragraph path of the symbolic link itself? Is there any function in Linux c that allows me to do this? Note. What I would like to achieve is the absolute path of the symbolic link itself. Not the way he points to! for example, the relative path of smybolic link: Task2/sym_lnk , I want its paragraph path, which can be: home/user/kp/Task2/sym_lnk
source share