I can't understand the operation of the "readlink" systemcall in Linux.
Can anyone explain about it with simple example on it?
If you have a symbolic link, e.g.
$ ls -l /vmlinuz
lrwxrwxrwx 1 root root 30 2009-08-03 08:59 /vmlinuz -> boot/vmlinuz-2.6.28-15-generic
then readlink
syscall will get you the symlink target (boot/vmlinuz-2.6.28-15-generic
), just like readlink
command:
$ readlink /vmlinuz
boot/vmlinuz-2.6.28-15-generic
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With