The tag has no wiki summary.

learn more… | top users | synonyms

71
votes
8answers
101k 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?
29
votes
6answers
3k 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 ...
17
votes
3answers
16k 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?
17
votes
2answers
9k 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 ...
13
votes
4answers
7k 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. ...
13
votes
3answers
16k views

How to override/update a symlink?

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} ...
11
votes
3answers
418 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 ...
10
votes
3answers
20k 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 ...
8
votes
2answers
521 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 ...
7
votes
1answer
6k 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 ...
7
votes
4answers
3k 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 ...
7
votes
1answer
5k views

How can I prevent rsync replacing symbolic links with new directories in the target directory hierarchy?

I am using rsync 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 ...
6
votes
2answers
4k views

symbolic link and filezilla over sftp

I'm pretty new to debian, and I'm trying to set up a server. I created a user which can only access to his folder /home/username (and its subdirectory). Now I want to use that user for the webserver ...
6
votes
2answers
1k 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 ...
5
votes
6answers
366 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
2answers
358 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 ...
4
votes
5answers
2k 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 ...
4
votes
1answer
5k 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 ...
4
votes
1answer
170 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
3answers
259 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: ...
4
votes
1answer
36 views

Preserving existing destination symlinks with rsync

I am using rsync 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 ...
4
votes
1answer
4k 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, ...
4
votes
4answers
4k 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 ...
3
votes
3answers
8k views

List all symbolic links on a unix system

How can I find all of the symbolic links on a unix/linux system?
3
votes
4answers
644 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 ...
3
votes
3answers
297 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 ...
3
votes
3answers
5k views

What is the difference between a 'symbolic link' versus a 'junction' when use 'Link Shell Extension'?

What is the difference between a 'symbolic link' versus a 'junction' when use 'Link Shell Extension' ? Please explain.
3
votes
2answers
2k 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 ...
3
votes
2answers
575 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 ...
3
votes
3answers
685 views

Native Symlink Windows 2008 r2 with cygwin

Is it possible for me to create an ssh session on windows which then does some folder/file manipulation and then creates a NATIVE windows symlink. i.e. a symlink that will be recognised by IIS and ...
3
votes
3answers
1k 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.
3
votes
1answer
2k 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 ...
3
votes
1answer
884 views

How do I rearange a file tree and then export it over NFS?

I've got a backup server that stores incremental backups in a tree like this: /backups hourly.0 server 1 server 2 hourly.1 server 1 server 2 hourly.2 ...
3
votes
1answer
220 views

Is there a way to make Apache follow symlinks for the header content-type?

If I serve a file named image.jpg the header content-type is sent as image/jpeg, but if I make a softlink named image that points to image.jpg the content-type is sent as text/plain. Is there a way ...
3
votes
1answer
158 views

What does “link to unknown” mean?

I just upgraded my server to Fedora 17 which made a switch of my bootloader from GRUB Legacy to GRUB2. There are two symbolic links in the /etc folder that points to the files grub.conf and grub.cfg ...
3
votes
1answer
3k views

Virtual hosts & symbolic links, why can't I set DocumentRoot to a symbolic link?

I have recently setup Capistrano on my server and it works great. I changed my virtual hosts to point to the symbolic link created by Capistrano. My virtual hosts file: <VirtualHost *:80> ...
3
votes
1answer
258 views

How do you find the target of a symlink created with mklink

Once a symlink is created using mklink, is there any way to find the link target, other than parsing the output of dir command ? As an example, junction.exe will return the substitute name when ...
2
votes
5answers
4k views

How to find the actual working directory?

When I try to find the current working directory at a linux command prompt (using "pwd"), it will show the directory with symbolic links included. For example, if I make a symbolic link and use it to ...
2
votes
1answer
4k 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 ...
2
votes
2answers
99 views

How to delete directories without symlinks in one folder

I have this folder structure: build.1 build.2 build.3 build.4 current -> symlink to build.4 previous -> symlink to build.3 I am running debian, what is the proper way to delete every build ...
2
votes
3answers
493 views

Are there any common symlink gotchas?

Part of my migration strategy of moving to Amazon EC2 for our servers involves making use of symlinks to keep installs and files in their 'standard' locations on the servers but the actual storage of ...
2
votes
1answer
2k 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 ...
2
votes
2answers
7k 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: ...
2
votes
3answers
2k views

How can I verify a symbolic link exists in CentOS

Normally, ls -la would give this to me but I guess CentOS is different. I need to verify that a symbolic link exists.
2
votes
7answers
5k views

WinXP - Map network location to local folder

I have a network location, \\myserver\myshare. On my Windows XP box, I wish to map this location to the path c:\somefolder. Am I asking the impossible?
2
votes
3answers
1k views

Permission denied for symlink to executable in nfs mounted directory with the sticky bit enabled

We have an NFS export for any of our users to install and maintain useful software for the network mounted at /public on our clients. On the NFS server, this directory is world writable with the ...
2
votes
2answers
1k 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 ...
2
votes
2answers
226 views

How to rename junction without breaking link

If I rename a folder which is the target of a (or multiple) junction, is there any way to update all the junctions to point to the renammed folder instead of just breaking?
2
votes
1answer
28 views

delete empty file link

I accidently made a link and can't delete that: big:~# ls -al total 88 lrwxrwxrwx 1 root root 27 May 28 18:10 -> /etc/apache2/ssl/apache.pem drwx------ 8 root root 4096 May 29 01:45 . ...
2
votes
2answers
298 views

execute cgi script from directory that is a symbolic link

I have a script that is available through Apache that modifies parent directory. Ew. mybin/a.pl, which modifies ../data/ directory. I would like to create various aliases eg. localhost/www/mybin/a.pl ...