Skip to main content
Share Your Experience: Take the 2024 Developer Survey
177 votes

"directory junction" vs "directory symbolic link"?

Symbolic links have more functionality, while junctions almost seem to be a legacy feature because of their limitations, but the security implications of these limitations are specifically why a ...
u8it's user avatar
  • 2,309
93 votes
Accepted

In a symlink pointing to '127.0.1.1:+xxxxx', what is the plus character for?

Symbolic links which don't point to a file have no generic meaning at all. In this case it might be the process ID, or a port with some special protocol spoken over it, or another identifier. It all ...
grawity_u1686's user avatar
88 votes

How can I create a symbolic link on Windows 10?

Open a PowerShell session as elevated administrator and type: New-Item -ItemType SymbolicLink -Path E:\Data\MyGames -Target "C:\users\UserName\MyGames" or using less verbose syntax: ni E:\Data\...
Peter Hahndorf's user avatar
82 votes

How to view all the Symbolic links, junction points, hard links in a Folder using dir?

You don't necessarily need to download additional programs to list junctions, symlinks and hard links, but if you have specific output format requirements, they may help. List all junctions, symlinks ...
Jimadine's user avatar
  • 1,382
46 votes
Accepted

Clients can't create symlinks on Samba share

Thanks to @grawity for hinting that my problem might be related to the protocol version. I found a solution that enable symlinks with SMB3 by adding the mfsymlinks option to the mount command like so: ...
tompi's user avatar
  • 793
43 votes

rsync and symbolic links

@grawity has a great answer, but here's a screenshot of some relevant info from the documentation. Here's the exact wording of the -l (lowercase letter L, not a one) and -L options, for instance, ...
Gabriel Staples's user avatar
36 votes
Accepted

7Zip Cannot create symbolic link, access is denied to libhdfs.so and libhadoop.so

How do I fix this? I am getting the error: "Cannot create symbolic link : Access is denied" You need to run 7-Zip File Manager in administrator mode. Right-click the icon of 7-Zip File Manager, ...
DavidPostill's user avatar
  • 158k
28 votes

How to view all the Symbolic links, junction points, hard links in a Folder using dir?

As of Powershell 5+ the following one-liner recursively lists all file hardlinks, directory junctions and symbolic links and their targets starting from d:\Temp\: dir 'd:\Temp' -recurse -force | ?{$_....
Anton Krouglov's user avatar
25 votes

How can I create a symbolic link on Windows 10?

If you want a GUI Tool for making/editing that symlinks use http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html Link Shell Extension (LSE) provides for the creation of Hardlinks , ...
odvpbre's user avatar
  • 359
22 votes

7Zip Cannot create symbolic link, access is denied to libhdfs.so and libhadoop.so

The accepted answer is not really correct, although possibly may work in some scenarios, is not the reason "why", and privilege doesn't really apply here. The problem is going to arise in most ...
ForeverZer0's user avatar
22 votes

In a symlink pointing to '127.0.1.1:+xxxxx', what is the plus character for?

As far as I know the "+" means that the number after the IP (the "xxxxx") refers to a "process ID" (not a port which usually uses the notation [IP-address]:[portnumber]). It is possible that this "...
Albin's user avatar
  • 10.8k
21 votes
Accepted

How to create symbolic links in /usr/bin on a Mac?

You get this message because of Apple's System Integrity Protection. System Integrity Protection includes protection for these parts of the system: /System /usr /bin /sbin Apps that are pre-installed ...
13dimitar's user avatar
  • 819
21 votes
Accepted

Linux symbolic links: how to go to the pointed to directory?

In bash the cd builtin uses -P and -L switches; pwd understands them in the same way: user@host:~$ ln -s /bin foobar user@host:~$ cd -L foobar # follow link user@host:~/foobar$ pwd -L # ...
18 votes

How do file permissions apply to symlinks?

baraboom's and peth's answers are both correct: Permission bits on the symbolic links themselves are irrelevant (except on macOS; see below), and changing permission on a symbolic link – by the chmod ...
astralblue's user avatar
18 votes
Accepted

How does Robocopy handle file system links (symbolic links, hard links and junctions)?

The Robocopy docs lists options that control Robocopy's behavior regarding file system links: /sl Don't follow symbolic links and instead create a copy of the link. /xj Excludes junction points, ...
Marco Eckstein's user avatar
17 votes

Removing certificate and re-running update-ca-certificates leaves lingering symlinks

According to the man pages for update-ca-certificates, add the -f switch to remove symlinks in /etc/ssl/certs -f, --fresh Fresh updates. Remove symlinks in /etc/ssl/certs directory. This ...
markybb41's user avatar
  • 301
15 votes

How can I make git commit files in a symlinked folder

If you are using linux, I particularly like the solution provided by GitBLSR. It is a library that is loaded via LD_PRELOAD that transparently dereferences symlinks to files and folders outside a ...
Mark's user avatar
  • 396
14 votes

View a list of symbolic links on system?

There's also a handy program for that called NTFSLinksView. Edit: there's also SageLinks, this one checks the validity too.
colin lamarre's user avatar
12 votes
Accepted

View a list of symbolic links on system?

$_.Linktype misses Symlinks. $_.Attributes misses Hardlinks. Junctions are listed in both properties. -Force is needed else hidden symlinks are skipped. Full working example which gets symlinks, ...
Joachim Otahal's user avatar
11 votes

Symbolic links and 7zip

As of 2019, 7-Zip has resolved this issue in Windows. The latest version has a checkbox to include symlinks in TAR and WIM archives and it works great!
Michael Yaeger's user avatar
11 votes
Accepted

Creating symlink for a file on Windows 7 gives error

By using mklink /D you're telling it to create a directory symbolic link and D:\test\11.txt is not a directory. So if you try to access the directory C:\11.txt it will give you an error. Just leave ...
Seth's user avatar
  • 9,193
11 votes
Accepted

does PATH search include symlinks?

The permissions of the symlink itself are irrelevant. You couldn't even change them if you tried. What matters are permissions of the underlying file. It is fine to have directories in your PATH ...
John1024's user avatar
  • 16.9k
10 votes

How do I change target of symlink in windows

Powershell New-Item -Type SymbolicLink -Path "C:\linkpath" -Target "C:\newtarget" -Force Mind the -Force Luke P.S. elevated mode required
jitbit's user avatar
  • 580
10 votes
Accepted

How to configure bash to always resolve full path for symlinks

There is a shell-wide option for this: -P If set, do not resolve symbolic links when performing commands such as cd which change the current directory. The physical directory is used ...
muru's user avatar
  • 1,205
9 votes

Does Windows have the ln -s or equivalent?

Powershell As long as Microsoft advices to use powershell as a command interpreter since more than 5 years ago and cmd.exe is becoming a legacy application this question lacks an answer in Powershell:...
maoizm's user avatar
  • 1,073
9 votes

Symlink to a URL

You want an automatic URL link, stored in a file in your file system, to open. The way to do this is with a minimalist .HTML file. For example, to take you to the Google home page, place the following ...
wwmbes's user avatar
  • 221
9 votes
Accepted

How to place symlinks to all executables installed through Chocolatey in a particular directory?

tl;dr: What you are attempting to do is not possible in the way you want to do it. Fortunately, ShimGenerator can do this exact thing (that's what it was designed for and it comes with Chocolatey): &...
ferventcoder's user avatar
  • 4,847
9 votes

Symbolic link does not work in Git over Windows

I have similar issue with repository with submodules on the Windows host system (then project deployed on the docker containers, one of the container fail to start). To check if you haven't enabled ...
Kiryl's user avatar
  • 91
8 votes

Is it possible to make Windows 10 show symbolic links with a different icon in Explorer?

Natively, no, there does not appear to be a way to do it. But you can with an Explorer shell extension, such as Link Shell Extension.
Darren Monahan's user avatar
7 votes

Replace Symbolic Links with Files

find ./ -type l -exec sh -c 'for i in "$@"; do cp --preserve --remove-destination "$(readlink -f "$i")" "$i"; done' sh {} + based on https://superuser.com/a/...
Diego's user avatar
  • 195

Only top scored, non community-wiki answers of a minimum length are eligible