InterviewSolution
Saved Bookmarks
| 1. |
How to check whether a link is a hard one or a soft link? |
|
Answer» We can use -H and -L OPERATORS of the test command to check WHETHER a link is HARD or SOFT (symbolic link).
One can also use: readlink FILE; echo $? // This returns 1 if it's a hard link and 0 if it's a symbolic link. |
|