TheDocumentation Index
Fetch the complete documentation index at: https://docs.syntblaze.com/llms.txt
Use this file to discover all available pages before exploring further.
-L operator is a unary file test operator in Bash used to determine whether a specified path exists and is a symbolic link (symlink). When evaluated within a conditional expression, it inspects the file metadata without dereferencing the link to its target.
Syntax
- Exit Status: Returns
0(true) ifFILEexists and is a symbolic link. Returns1(false) ifFILEdoes not exist or is any other file type (e.g., regular file, directory, block device). - Target Resolution: Unlike operators such as
-eor-f,-Loperates strictly on the symlink’s inode. It does not follow or resolve the link to evaluate the target file. - Dangling/Broken Links: The operator evaluates to
0(true) even if the symbolic link points to a non-existent target. The existence of the link itself satisfies the condition. - Equivalence: In Bash, the
-hoperator is functionally identical to-Land is maintained for POSIX compliance and historical compatibility. Both evaluate the exact same metadata.
Master Bash with Deep Grasping Methodology!Learn More





