1

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?

1 Answers1

0

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
IsaacS
  • 1,106