how to check if a path is actual or symbolic link

Posted by hits_lucky on Stack Overflow See other posts from Stack Overflow or by hits_lucky
Published on 2010-06-13T16:07:14Z Indexed on 2010/06/13 16:12 UTC
Read the original article Hit count: 174

Filed under:
|

Hi,

I am writing my own shell program. I am currently implementing the cd command using chdir. I want to implement the cd with the below options : -P Do not follow symbolic links -L Follow symbolic links (default)

My query is that , when a given path is entered on the shell how to figure out if the path is a symbolic link or an absolute path progamatically?

Thanks

© Stack Overflow or respective owner

Related posts about unix

Related posts about symbolic-link