i want to know how to find if a certain file has a symbolic link to another file?
the LN command
# ln -s /etc/kannel.conf /etc/kannel/kannel.conf
how to confirm this symbolic link?
Use test
command.
pastas@ubuntan:~/tmp$ ls -alth
total 16K
drwxrwxr-x 2 pastas pastas 4.0K Dec 16 17:18 .
lrwxrwxrwx 1 pastas pastas 9 Dec 14 18:34 robot.cpp_2 -> robot.cpp
-rw-rw-r-- 1 pastas pastas 106 Dec 14 16:13 robot.cpp
pastas@ubuntan:~/tmp$ test -L robot.cpp_2 && echo "sym" || echo "not sym"
sym
pastas@ubuntan:~/tmp$ test -L robot.cpp && echo "sym" || echo "not sym"
not sym
ls -l /etc/kannel/kannel.conf
will show you if it exists and what it links to. Finding all links to a target when you only know the target is a different question, which one do you need?