Re: How to follow symbolic link(s) to the actual filename?



Peter T. Breuer wrote:
moma <moma@xxxxxxxxxxx> wrote:
I need a bash (shell) command(s) that can follow symbolic links to the actual filename.

man -k symbolic | grep links

  derefsymlink (1)     - dereference symbolic links
  symlinks (1)         - symbolic link maintenance utility
Peter

Thank you. symlinks tool will be usefull. --

Found also readlink.

$ readlink -f link2
../afile
------------------------

Just for info:
Hard-links share the same i-node value with the file it points to.

$ ln afile link3

$ ls -i afile link3
1304631 afile   1304631 link3

Hard-links ain't problem here.
.