Linux Certification, System Administration, Programming, Networking Books
Checking Dead Links

I am writing a shell script (bash) for system administration.Now in that script, I want to check whether a perticular soft
link on the system is dead or alive.

I want something like this,

if [ alive ]
then
......
else
......
fi

>>>>>>>>

I just tested it and dead symlinks fail "if [ -e file ]" but pass "if [ -h file ]".

>>>>>>>>

[ -e file ] worked.

Quick Links:
Do you have a Linux Question?

Linux Home: Linux System Administration Hints and Tips