Example 1: Deleting a directory containing a soft link to another directory.
susam@nifty:~/so$ mkdir foo bar
susam@nifty:~/so$ touch bar/a.txt
susam@nifty:~/so$ ln -s /home/susam/so/bar/ foo/baz
susam@nifty:~/so$ tree
.
├── bar
│ └── a.txt
└── foo
└── baz -> /home/susam/so/bar/
3 directories, 1 file
susam@nifty:~/so$ rm -r foo
susam@nifty:~/so$ tree
.
└── bar
└── a.txt
1 directory, 1 file
susam@nifty:~/so$
So, we see that the target of the soft-link survives.
Example 2: Deleting a soft link to a directory
susam@nifty:~/so$ ln -s /home/susam/so/bar baz
susam@nifty:~/so$ tree
.
├── bar
│ └── a.txt
└── baz -> /home/susam/so/bar
2 directories, 1 file
susam@nifty:~/so$ rm -r baz
susam@nifty:~/so$ tree
.
└── bar
└── a.txt
1 directory, 1 file
susam@nifty:~/so$
Only, the soft link is deleted. The target of the soft-link survives.
Example 3: Attempting to delete the target of a soft-link
susam@nifty:~/so$ ln -s /home/susam/so/bar baz
susam@nifty:~/so$ tree
.
├── bar
│ └── a.txt
└── baz -> /home/susam/so/bar
2 directories, 1 file
susam@nifty:~/so$ rm -r baz/
rm: cannot remove `baz': Too many levels of symbolic links
susam@nifty:~/so$ tree
.
├── bar
│ └── a.txt
└── baz -> /home/susam/so/bar
2 directories, 1 file
The soft link as well as its target survive.