Questions tagged [symbolic-link]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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} ...
Jérôme Verstrynge's user avatar
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?
Jared's user avatar
  • 1,577
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?
cowgod's user avatar
  • 3,520
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 ...
ensnare's user avatar
  • 2,222
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 ...
solsol's user avatar
  • 1,131
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?...
Kalecser's user avatar
  • 543
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 ...
Sebas's user avatar
  • 545
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. ...
SyRenity's user avatar
  • 3,179
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 ...
rymo's user avatar
  • 513
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 ...
Doc's user avatar
  • 273
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 ...
Henry's user avatar
  • 441
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 ...
Vladimir's user avatar
  • 163
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, ...
Steven T. Snyder's user avatar
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. ...
blueFast's user avatar
  • 4,260
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 ...
unkilbeeg's user avatar
  • 243
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/...
user2723490's user avatar
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:\...
jayrdub's user avatar
  • 338
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 ...
JM4's user avatar
  • 1,144
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 ...
dthor's user avatar
  • 303
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 ...
HughG's user avatar
  • 251
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 ...
iDev247's user avatar
  • 751
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/...
Alaa Alomari's user avatar
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 ...
womble's user avatar
  • 96.6k
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 ...
Peter Westlake's user avatar
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 -...
tvl's user avatar
  • 369
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 ...
dan.codes's user avatar
  • 193
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 ...
ben's user avatar
  • 189
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 ...
Matthias Ronge's user avatar
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 ...
Amandasaurus's user avatar
  • 31.9k
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 ...
user1434058's user avatar
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 ...
Alfredo Palhares's user avatar
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
qodeninja's user avatar
  • 2,763
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 ...
Craig Otis's user avatar
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 ...
MysteryMoose's user avatar
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 ...
Richard T's user avatar
  • 1,242
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?
CagedMantis's user avatar
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 ...
George IV's user avatar
  • 375
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/...
Matt Sweeney's user avatar
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 ...
Tony's user avatar
  • 51
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 ...
Benjamin Pollack's user avatar
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 ...
user1044169's user avatar
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 ...
user avatar
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 ...
Steve Bennett's user avatar
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 ...
ensnare's user avatar
  • 2,222
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 ...
John's user avatar
  • 536
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.
George Tsiokos's user avatar
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/...
Naftuli Kay's user avatar
  • 1,728
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 ...
Levi Roberts's user avatar
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 ...
Matt's user avatar
  • 1,631
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 ...
Matt Hensley's user avatar

1
2 3 4 5