-L FILE (conditional operator)
true if the file is a symbolic link.
false if the file does not exist or is not a symbolic link.
-h is an alias of -L.
Links
Examples
- Different ways to test if a file is a symbolic link:
1 2 3 4test -L /bin/sh && echo "symbolic link" [ -L /bin/sh ] && echo "symbolic link" # Bash [[ -L /bin/sh ]] && echo "symbolic link"
BashSupport Pro ist eine Bash IDE mit Unterstützung für -L – probieren Sie es aus!