file-test
Bash -L file test
True for a symbolic link, even when its target is absent.
Formal Syntax & Structure
bash syntaxbash
[ -L path ]Return Value
exit status
True for a symbolic link, even when its target is absent.
Working Example
Example Snippetbash
ln -s missing target[ -L 'target' ]printf '%s\n' "$?"