|
发表于 2006-9-12 04:30:43
|
显示全部楼层
Post by littlebat
This test condition is come from Example 7-4. Testing for broken links
in http://www.tldp.org/LDP/abs/html/fto.html
I know the meaning of "-h", "-a", "!" and "-e", but I don't know the
meaning of the test condition of putting them together.
This is my understanding:
-h "$element" : test if "$element" is a symbolic link;
! -e "$element" : test if "$element" isn't exist;
But, I can't understand this entire test condition, who can give a
explain? thanks.
This is to test if a symlink is pointing to a non-existing file. You can create a file and then symlink it. Test with this statement and then remove the file and then test again. |
|