Questions tagged [symbolic-link]
The symbolic-link tag has no usage guidance.
222
questions
233
votes
4
answers
334k
views
Symlink not updating as expected when using an absolute with relative path
I am trying to use symbolic links. I did some reading and found the following commands:
Creation -> ln -s {/path/to/file-name} {link-name}
Update -> ln -sfn {/path/to/file-name} {link-name}
...
143
votes
9
answers
308k
views
Find out symbolic link target via command line
Say that I setup a symbolic link:
ln -s /root/Public/mytextfile.txt /root/Public/myothertextfile.txt
is there a way to see what the target of myothertextfile.txt is using the command line?
120
votes
8
answers
185k
views
How do I create a symbolic link in Windows?
Windows Vista added the ability to create symbolic links to files and directories. How do I create a symbolic link and what are the current consumer and server versions of Windows that support it?
102
votes
3
answers
88k
views
Perform rsync while following sym links
I have a directory that contains symbolic links to other directories located on different media on my system:
/opt/lun1/2011
/opt/lun1/2010
/opt/lun2/2009
/opt/lun2/2008
/opt/lun3/2007
But the ...
45
votes
2
answers
28k
views
how to update a symbolic link target (ln -f -s not working)
I'm using
ln -f -s
/var/www/html/releases/build1390
app-current
to update symbolic link "app-current" with a new destination.
However, this doesn't work, the link "app-current" keeps it ...
44
votes
4
answers
63k
views
How to list symbolic link chains?
Given this example:
mkdir a
ln -s a b
ln -s b c
ln -s c d
If I execute:
ls -l d
It will show:
d -> c
Is there a way for ls or any other linux command to show d -> c -> b -> a instead?...
33
votes
6
answers
13k
views
How to create a symbolic link without using ln?
I deleted a critical symbolic link - libc.so.6. I have the file it should point at, but the basic commands such as ln or wget won't work anymore due to the link missing. However, echo or other Bash ...
24
votes
4
answers
16k
views
ln -s vs mount --bind
Is there any practical difference between using ln -s or mount --bind?
I want to move some folders to another partition, without changing their daemon setting, and wonder what approach I should take.
...
20
votes
5
answers
20k
views
Create NTFS symbolic links from within Linux
Is there a Linux utility that can create NTFS symbolic links? That is, a link on an NTFS partition that points to another NTFS folder - one that will work within Windows 7, specifically.
I wish to ...
17
votes
2
answers
34k
views
Symbolic link and filezilla over sftp
I'm pretty new to debian, and I'm trying to set up a server.
I have created a user who can only access his folder /home/username (and its subdirectory).
Now I want to use that user for the webserver ...
17
votes
1
answer
9k
views
How can I prevent rsync replacing symbolic links with new directories in the target directory hierarchy?
I am using rsync(1) to synchronize files between a source area and a target area, where the target directory hierarchy contains symbolic links.
When a source directory has the same name and relative ...
16
votes
1
answer
19k
views
How do I find circular symbolic links?
I'm working on a HP-UX system and I want to find if there are any circular symbolic links.
So far I'm using the command:
ls -lrt `find ./ -follow -type l`
But it's only doing ls -lrt on current ...
16
votes
1
answer
17k
views
How do I assign an SELinux label to a symlink with semanage so it persists after a relabel?
My apache DocumentRoot /var/www is a symbolic link to another path. The target has the appropriate file context label (httpd_sys_content_t) so that apache can read it with SELinux enabled. However, ...
14
votes
1
answer
23k
views
Force rsync to copy symlink, even if referent does not exist
I am getting this message with rsync:
symlink has no referent: "/a/path"
Well, rsync is right: in the source filesystem, the (symbolic) link is pointing to a non-existent location. That is intended. ...
14
votes
1
answer
7k
views
Preserving existing destination symlinks with rsync
I am using rsync(1) to keep a local debian repository updated. Recently, the disk I am using to store it started running low on space, so I decided to use symlinks to allow me to move some of the ...
13
votes
2
answers
56k
views
How to remove 'update-alternatives' links on Linux
Sorry for asking this, but I cannot resolve such a simple issue for a few hours:
I made a typo mistake in
update-alternatives --install /usr/lib64/R/lib/libRblapack.so libRblapack.so /usr/lib64/R/...
13
votes
3
answers
968
views
What are possible drawbacks of an IIS 7 site having an NTFS junction as a web root?
I am trying to come up with a way to deploy ASP.NET code with as little site disturbance as possible. One thought was to set up the site to be served from an NTFS junction c:\www\example.com where
c:\...
12
votes
3
answers
24k
views
Linux Symbolic Linking not working as expected
I have achieved my "goal" several times before but am running into an issue I have not yet experienced before. I have a webserver setup with Nginx on Ubuntu 12.04 LTS. I have my system setup the way I ...
12
votes
1
answer
18k
views
In Windows, is it possible to share a symlink as a network share?
Summary
Is it possible to share a symlink to a network location as a Network Share in Windows? E.G:
D:\folder\Shared\foo on \\server is shared as \\server\foo, where D:\folder\Shared\foo is actually ...
11
votes
4
answers
8k
views
How do I find broken symlinks automatically on Windows?
Not sure if this is bad style, but I'm asking this question here because I couldn't find the answer elsewhere, and then I worked out one solution on my own. I'd be interested to see other people's ...
10
votes
2
answers
4k
views
Symbolic link and sudo
I create a symbolic link:
ln -s /tmp/folder1 /tmp/folder2
Then I go to /tmp/folder2 and run pwd:
$ cd /tmp/folder2/
$ pwd
/tmp/folder2
$ sudo pwd
/tmp/folder1 # <-- This is the odd part
Why ...
10
votes
3
answers
26k
views
how to create symbolic link (ln) between two partitions
I have two partitions on my Ubuntu 10.04.3 server.
partition 1: /mnt/storage/
partition 2: /var/www/myweb/
now when i run the following command
$ ln /mnt/storage/sourcefile.txt /var/www/myweb/...
10
votes
5
answers
9k
views
How do I find and report on broken symbolic links automatically?
As tidy sysadmins, we like to ensure that the little things are just as well covered as the big things (when time permits). One of these things is ensuring that our systems aren't full of broken ...
10
votes
2
answers
19k
views
Why do some host volumes in Docker containers give the error "too many levels of symbolic links"?
I'm running docker with a host directory mounted:
$ docker run -v /usr/groups/thing -ti imagename /bin/bash
Files in /usr/groups/thing/foo are accessible:
# ls /usr/groups/thing/foo
a b c
But ...
8
votes
2
answers
24k
views
Remove symlink with Ansible
I have a dead symlink named dead_symlink under the directory /usr/local/bin
When Ansible check the file it reports it exists
- stat: "path=/usr/local/bin/dead_symlink"
register: dead_symlink_bin
-...
8
votes
2
answers
47k
views
Setup symbolic link where users can access it with FTP
I have a folder on a server where a client of mine has a bunch of folders that they upload images and what not for a site, I do a symbolic link to those folders to the root of the website. This way I ...
7
votes
6
answers
14k
views
Can't delete symbolic link
I accidentally reversed the parameters of my ln and called:
ln -s my_link my_dir
where my_dir already existed and my_link did not. I deleted my_dir, but am unable to delete my_link.
If I ls -l ...
7
votes
2
answers
10k
views
Best practice to link with WebDAV, as FollowSymLinks doesn’t allow to show symlinks
Symbolic links are a widespread practice on linux to make a ressource (e.g. directory) available in another location without having to maintain several copies of it. This is implemented in many ...
7
votes
4
answers
4k
views
Linux disk usage analyser that acts like symlinks are real files
I am using git-annex, an extension to the DVCS git, which is designed for handling large files. It makes heavy use of symlinks. The actual large files are moved to the .git/annex directory and the ...
7
votes
2
answers
16k
views
NFSv4 "Too many levels of symbolic links" error
Both machines are running Ubuntu 12.04
Remote NFSv4 Client
$ ls /mnt/storage/aaaaaaa_aaa/bbbb/cccc_ccccc gives this error:
ls: reading directory .: Too many levels of symbolic links
How can I fix ...
7
votes
4
answers
17k
views
Using symbolic links with git
I used to have my system configuration files all in one directory for better management but now i need to use some version control on it.
But the problem is that git doesn't understand symbolic links ...
6
votes
4
answers
28k
views
How do you create a symbolic (hardlink) in CMD.exe
I need to do this without installing software...
Any ideas?
MSDOS (cmd.exe) on Windows XP
6
votes
3
answers
25k
views
Fixing Shared PCRE Library on CentOS
This is less a question about PCRE, and more a question about updating shared libraries. The distribution of CentOS I'm running only allows for yum upgrades to version 6.6, or somewhere similar.
I'm ...
6
votes
2
answers
1k
views
Symbolic Links and Multiple Mount Points
I am sure this may seem like a simple question, but I cannot seem to ask Google the correct question for the life of me. In short, I am having trouble understanding how symbolic links function when a ...
6
votes
2
answers
11k
views
How to configure NFS to resolve symbolic links on the server side?
My beard is solid grey now, and I long recall using NFS for all these decades and here I cite the original RFC that gives us the basis for the NFS we have today RFC1094. Of course, three decades and ...
5
votes
3
answers
27k
views
List all symbolic links on a unix system
How can I find all of the symbolic links on a unix/linux system?
5
votes
6
answers
457
views
Does Windows have symlinks?
I have been doing something on Unix that required a symlink. I want to port my application to Windows. Does Windows have symlinks?
EDIT: I should be more specific. I'd prefer XP. I'll install Vista ...
5
votes
3
answers
1k
views
Is it an unsafe practice to symlink /etc conf files?
To manage the configuration of a server, I keep some configuration flies (located in /etc) under version control (in the home folder) and then symlink to them from their /etc locations:
/etc/someprog/...
5
votes
1
answer
22k
views
fail to enable mysqld service but after reboot the service is running on centos 7
After I installed, I run systemctl enable mysqld.service.
Then, the output is:
Failed to execute operation: Too many levels of symbolic links
After this error, I reboot my service, and I check the ...
5
votes
2
answers
506
views
Under what circumstances would a junction point be more appropriate than a symbolic link?
Symbolic links were introduced an incredibly long time ago in Windows, yet I still encounter a large number of systems that use junction points. I know that symbolic links afford functionality not in ...
5
votes
1
answer
10k
views
mklink errors out with "The device does not support symbolic links"
I need to store symbolic links in a network folder. Trying this:
mklink \edgeserver\public\test.pdf \fileserver1\files\test.pdf
and getting an error:
The device does not support symbolic links
...
4
votes
4
answers
2k
views
Does anyone knows how to create a sybmbolic "directory" in linux?
I've tried the ln -s directory_to_use directory method, but all it does is just create a "file" that links to directory_to_use, which doesn't work when using FTP.
What I'm looking for is, for ...
4
votes
3
answers
758
views
Prevent 'cd' remembering symbolic links traversed
Say you have directory ~/mytool that softlinks to /usr/local/mytool. Then cd mytool leaves your current directory as ~/mytool, which may cause scripts to behave incorrectly. Is there a way to avoid ...
4
votes
1
answer
249
views
Make folders on multiple drives appear in a single folder without using symlinks
I have directories sorted by date on different physical drives:
/mnt/drive1/2000
/mnt/drive1/2001
/mnt/drive2/2002
/mnt/drive3/2003
/mnt/drive4/2004
/mnt/drive4/2005
/mnt/drive5/2006
How can I get ...
4
votes
1
answer
11k
views
Moving postgres data folder on NFS drive. Is it better to symlink, reinit cluster, or modify init.d script?
I want to move my postgres data folder to an NFS drive but I'm not sure what would be the best way to do it. I've got three options in mind:
According to Postgres Documentation, one method would be ...
4
votes
3
answers
3k
views
Replace symbolic-link with target
How can you replace all symbolic-links in a directory (and children) with their targets on Mac OS X? If the target is not available, I'd prefer to leave the soft link alone.
4
votes
2
answers
13k
views
Apache Error: Symbolic link not allowed or link target not accessible
I can't seem to get a symlink working in my Apache VirtualHost, no matter what I try and I see the following error in the error log:
Symbolic link not allowed or link target not accessible: /var/www/...
4
votes
2
answers
20k
views
nginx symlinks permission denied / 403 Forbidden on Mac OSX
So I have an nginx server running on Mac OSX and I am trying to create a symlink in my nginx www directory from somewhere else. In the browser I get the wonderful 403 Forbidden error.
I have also ...
4
votes
1
answer
13k
views
Following Windows SymLinks in network shares
I have a shared folder, let's call it
e:\folder2\
'Everyone' has read permission to the share and file system.
From a command line, with pwd at
e:\folder2\
I ran
mklink /D slF1 e:\folder1
The ...
4
votes
3
answers
2k
views
IIS7 doesn't monitor changes across symlinks
I've used the mklink utility to create a symlink to a directory of web content. IIS7 doesn't "see" changes to any classic ASP files in this linked directory without issuing an iisreset. I've disabled ...