Using PowerShell, on at least Windows OS, you can find symbolic-links in any given directory, such as the following:
Get-ChildItem 'C:\nodejs\bin\' | Where-Object {$_.LinkType -eq 'SymbolicLink'}
A more concise alternative would be to use Get-ChildItem
's alias ls
:
ls 'C:\nodejs' -Attributes ReparsePoint -Recurse
And you can get relevant information on a symbolic-link by doing any of the following:
Get the file item and output its Target property. Target being the "value" of the symbolic-link. In an addition, method or command signatures for creating symlinks when juxtaposing between operating systems, the arguments names of: 'target', 'path' and/or 'value' may hold different meanings than another method signature on a different OS.
E:\AIT> Get-Item -Path 'C:\nodejs\bin\ionic.cmd' | Select-Object -ExpandProperty Target
E:\AIT\out\dependency_symlink.cmd
Get the file item and output its LinkType property. An item with a LinkType value of SymbolicLink means that its, well, symbolic.
E:\AIT> Get-Item -Path 'C:\nodejs\bin\ionic.cmd' | Select-Object -ExpandProperty LinkType
SymbolicLink
Get the file item and output its Mode property. An item with l
in the Mode value indicates that it is a symbolic-link.
E:\AIT> Get-Item -Path 'C:\nodejs\bin\ionic.cmd' | Select-Object -ExpandProperty Mode
-a---l
Get the file item and output its Attributes property. An item attributed with a ReparsePoint value maybe indicative to a symbolic-link.
E:\AIT> Get-Item -Path 'C:\nodejs\bin\ionic.cmd' | Select-Object -ExpandProperty Attributes
Archive, ReparsePoint