What is the difference between test -L filename and test -h filename in ksh shell. From the man page, both were used to identify a symbolic link, but I want to know the exact difference.
Here is the description from the man page.
-h file True if file exists and is a sym-
bolic link.
-L file True if file exists and is a sym-
bolic link.
The source code for
ksh93, in filebltins/test.c, shows that these two options are treated exactly the same, except for the author’s hopes for the future:From this I conclude that they behave exactly the same, but that
-his a legacy option and may one day disappear 🙂