A symbolic link ("symlink") is a reference to a file or folder which may exist on the same or another drive in the system. Symbolic links allow users to create a more logical file layout, when the files themselves may be spread across multiple disks or relocated to more convenient locations.

learn more… | top users | synonyms (1)

6
votes
4answers
6k views

What are the advantages of symlinks over hard links and viceversa?

I understand the differences between symbolic and hard links, but I've never understood why choose one or the other.
6
votes
1answer
241 views

No performance increase on I/O intensive operation after symlink to ramdisk

We have a system that transforms a set of several thousand multi-MB files. After every step in the transform, it writes the intermediate file to disk. The concept is similar to a scratch disk. We ...
6
votes
4answers
832 views

VIM destroys symbolic links under Windows

It seems that when working with a file in VIM it primarily uses a backup version of the file then overwrites the original on save. This is a problem when using symbolic links under Windows (e.g. ...
6
votes
1answer
1k views

brew link jpeg issues

I am trying to install opencv on Mac OSX Lion. brew install opencv I get the following error (and a few other similar ones) Error: The linking step did not complete successfully The formula built, ...
6
votes
4answers
12k views

Sharing an external hard drive in Ubuntu using Samba

/media/MYDISK is where my hard drive is mounted automatically. I created a symlink using: ln -s /media/MYDISK /home/camilo/MYDISK chmod 777 /home/camilo/MYDISK I'm setting up smb.conf like this: ...
5
votes
3answers
9k views

How can I break a symbolic link loop?

While I was trying to compile a C shared object library, I accidentally created two symbolic links which point to each other. Is there a way to get rid of them without nuking the whole directory? I ...
5
votes
5answers
750 views

How to see the end of a long chain of symbolic links

Suppose I have a link that points to another link that points to another link, etc. way down the line. I'm not sure how many levels of links there are. What's the slick command line way to see the ...
5
votes
4answers
9k views

How to change a symlink in OS X?

How do I change where a symlink points to, without deleting and creating a new one (with ln -s "/path/to/point/to" "/path/where/symlink/is")? When I tried doing that with, for example, to Java's ...
5
votes
2answers
4k views

Symlink to current folder as absolute path without typing whole path

Symlinks are saved shortcuts for relative paths: ~/foo➤ ln -s . ~/bar/foo ~/foo➤ ls -l ~/bar total 8 lrwxr-xr-x 1 me me 1B 15 May 14:38 foo -> . The file ~/bar/foo is a symlink to bars ...
5
votes
2answers
6k views

How to change a symbolic link to a directory to another target?

# ln -sv /path/to/target /path/to/link ‘/path/to/link’ -> ‘/path/to/target’ Now I want to replace that target with target2: # ln -sfv /path/to/target2 /path/to/link ‘/path/to/link/target2’ -> ...
5
votes
3answers
1k views

Are world-readable/writable/executable links in /usr/bin security holes?

% ls -l /usr/bin/edit lrwxrwxrwx 1 root root 3 Jan 10 05:54 /usr/bin/edit -> vim* This seems to ...
5
votes
1answer
1k views

How to properly create symbolic link?

scenario : I'm in a place that is not in PATH I have a file name dofoo that is executable I want to create symbolic link in /usr/bin that points to dofoo in current directory quite hard to get the ...
5
votes
1answer
3k views

How to find all symbolic links to a given file/directory?

How can you find all symbolic links to a given file / directory? This previous question only applies to hardlinks (if I read correctly).
5
votes
1answer
3k views

How do I move a linked file on Unix?

I have a bunch of files in one directory and links to each one of those files in another directory. So ls -l looks something like this: lrwxrwxrwx 1 rembol rembol 89 Jan 25 10:00 copyright.txt ...
5
votes
3answers
5k views

How can I make git commit files in a symlinked folder

I have two folders: /home/me/code/project/ /srv/www/projectfiles/ In the /home/me/code/project folder, I have symlinked static to /srv/www/projectfiles/ i.e. /home/me/code/project/static/ -> ...
5
votes
1answer
2k views

No symlinks allowed in smb share

I have the following share setup on my Ubuntu machine # From /etc/fstab //192.168.1.13/media /home/USER/SHARE/media cifs username=USERNAME,password=PASSWORD,_netdev,uid=USER,gid=users 0 0 However ...
5
votes
1answer
2k views

Why is chattr and lsattr resulting in “Operation not supported while reading flags”?

I'm getting the following error: $ lsattr /etc/rc.local lsattr: Operation not supported While reading flags on /etc/rc.local $ sudo chattr +i /etc/rc.local chattr: Operation not supported while ...
5
votes
2answers
396 views

Windows 7 cross-volume symlinks affecting recycle bin

Related to this question but not identical. Scenario: C:\Folder\Symlink\ is a symlink pointing to E:\Folder\Folder\Target\ Problem: Deleting a file through C:\Folder\Symlink\* bypasses the Recycle ...
5
votes
5answers
19k views

Windows Server 2008 Create Symbolic Link, updated Security Policy still gives privilege error

Windows Server 2008, RC2. I am trying to create a symbolic/soft link using the mklink command: mklink /D LinkName TargetDir e.g. c:\temp\>mklink /D foo bar This works fine if I run the command ...
4
votes
4answers
9k views

Is there anything like a link or shared mount point for FAT32 folders in Linux/Android?

I often want the same files to be accessed by different apps on my Android phone, but the apps look in different folders. Is there a way to make two different folder paths on a FAT SD card point to ...
4
votes
1answer
3k views

Create Symlink in Windows from command line without “.lnk”

I want to mount a network share on a folder in Windows, because I have an application that's stored big files in a hard-coded path (e.g. c:\path\of\directory). I can't change that path. This is ...
4
votes
2answers
7k views

Give access to a subdirectory without giving access to parent directories

I have a scenario involving a Windows file server where the "owner" wants to dole out permissions to a group of users of the following sort: \\server\dir1\dir2\dir3: read, write and execute ...
4
votes
1answer
963 views

Symlink to .vimrc on windows makes file readonly upon write. Why?

I've put my .vimrc file in a central location (dropbox folder, also a hg repository). Under Windows 7, I've symlinked to it from my home folder (strangely enough I had to do it as an administrator, ...
4
votes
2answers
71 views

How do I get cd to switch to the full path when following symbolic links?

How can I get the shell to understand the full path after following a symbolic link. In the example below I'd like the first "pwd" command to report "/Users/sholden/Projects/PS1/examples", and the "cd ...
4
votes
2answers
995 views

How to stop following symlinks in dropbox

What I have: Dropbox\ projects\ serverfault\ stackoverflow\ superuser\ currentProject -> projects\superuser [Sometimes I change it to other project] When I sync ...
4
votes
1answer
4k views

How do I make a symbolic link on Windows 7?

I've recently changed from Ubuntu to Windows 7. One feature I'm struggling to develop without, is symbolic links. In linux, I would simply ln -s /where/to/ /where/from/ I've done some googling for ...
4
votes
1answer
1k views

How do I figure out if a link is a symbolic link, a hard link, or a directory junction in Windows?

If I've created a directory link via mklink, how can I figure out if it was a symbolic link, a directory junction, or a hard link (ie whether I used /d, /j, or /h)?
4
votes
2answers
4k views

NTFS symlinks in linux

I have an NTFS formatted drive (from a previous windows installation) and it contains some symlinks (reparse points), For some reason, I can't do anything with these symlinks: I can't go to where ...
4
votes
1answer
327 views

Unix: softlinks, hardlinks

I am somewhat confused what the differences between a softlink, and a hardlink are (on unix). It seems like a softlink is the same as a shortcut in windows or an alias on Mac OS X. (Can someone ...
4
votes
1answer
2k views

How can I create symbolic links in Windows 8.1 without an admin command prompt?

I am hoping that someone can correct me where I'm going wrong when trying to create a symbolic link in Windows 8.1 without having to run cmd.exe as administrator. Whenever I try to create a symlink ...
4
votes
1answer
4k views

NFS: too many levels of symbolic links. How to find and fix?

wim@wim-desktop:/media/data/dots/manouche$ ls > /dev/null ls: reading directory .: Too many levels of symbolic links wim@wim-desktop:/media/data/dots/manouche$ find . -type l -exec ls -l {} \; ...
4
votes
1answer
3k views

Checking where a symbolic link points at in Windows 7

In Windows 7, how can I check if a file is a symbolic link or not, if a folder is a junction or not, and how can I check where they are pointing at (in case they are symlink/junction). Both in ...
4
votes
1answer
337 views

Fun with symbolic links and `notepad.exe` (replacing default notepad application in Windows 7)

I'd like to change my default notepad program from notepad2 to notepad++ (but my question is more complicated than just that so please don't stop reading!) When making the change from notepad to ...
4
votes
2answers
351 views

How to move target a Windows shortcut points at and allow existing shortcut work?

I would like to do the following: Create a shortcut to a folder (say mLink.lnk --> C:\tmp) This will be emailed to users Move and/or rename the folder (C:\tmp --> C:\tmp2) Setup intermediate step ...
4
votes
1answer
1k views

How can I set a Removable External Device as a built-in Hard Drive?

I am using SSD with my laptop and running out of free space.. So I bought an 64GB microSD card as a secondary storage. But, when I launch My Computer, the SD card drive is recognized as, of course, ...
4
votes
2answers
304 views

Hard/SymLinks and Alternate Data Streams

An interesting thought just occurred to me while thinking about NTFS. NTFS supports hard links, symbolic links, and Alternate Data Streams. Is it possible for an ADS to be a link to another file? ...
4
votes
1answer
285 views

What kind of links (symbolic, hard, junction pts…) for multiple cloud backups?

Google-Drive's MS-Windows software doesn't follow links of any kind. Dropbox and Skydrive both - apparently, follow links. I am using MS-Windows7 64-bit professional edition. What I did was to move ...
4
votes
1answer
1k views

what is the difference between a symlink , junction , hard link and so on? [duplicate]

Possible Duplicate: What is the difference between NTFS hard links and directory junctions? well just got a litlle confused about all of them. so any explanation?
4
votes
1answer
179 views

Links in Excel changed after a crash

A few of my users use Excel spreadsheets that have cells linked to other spread sheats. It is set up so the catering.xslx pints to the inventory,comm2002.xls. I was told that excel will crash and all ...
3
votes
4answers
6k views

Symlink to a URL

Is there any way to create a symbolic link to a URL? Update: I need to symlink it to an HTTP URL. Update: The reason I want to do this is so that I can move this symlink to another computer without ...
3
votes
3answers
326 views

Is there a way to set symbolic links to only executable files in Linux?

I have a directory with code files and executable files and I want to know how to create a symbolic link only to executable files in that directory? I know that path-of-directory/* selects all files ...
3
votes
2answers
125 views

One line ls command to display symbolic links

How can I use just one single ls command to display all symbolic links in my /dev directory? I know ls -l and that's about it.
3
votes
2answers
3k views

Access is denied on mklink

I am trying to get a symlink working over a network drive. I have already tried suggestions on questions already asked, such as running as administrator and checking if the directory already exists. ...
3
votes
2answers
4k views

How to fix a symbolic link pointing to a wrong location?

I'm a little bit confused with hard/softlinks here. I'm on OSX, have a folder '4' and two links pointing to it: drwxr-xr-x 4 imm staff 136 14 Jun 21:24 4 lrwxr-xr-x 1 imm staff 1 14 Jun 16:56 ...
3
votes
3answers
436 views

How to know the level of a symlink in linux?

For example, if a symlink a -> b b -> c c -> d say, the symlink level of a is 3. Then, is there any utility to get this info? And, also I want to get the expansion detail of a symlink, ...
3
votes
5answers
2k views

Does ln -s require you to be in a certain directory?

I want to create a simple symlink to a file. It works perfectly if I run the command from inside the directory where I want the symlink to be created: /path/to/link $ ln -s /path/to/file . But if ...
3
votes
3answers
2k views

Check if two paths are pointing to the same file

I've got a script to recursively create symlinks in my home directory to my settings directory, to keep the files under version control. I would like it to skip files which are already symlinked via a ...
3
votes
2answers
2k views

How to mass remove symbolic links in Windows (amongs regular files that share similar name in many folders)?

Is there anyway to quickly remove many symbolic links in many folders that contains many other files. E.g some command in command prompt (be able to delete all slink created from day XX for example)? ...
3
votes
1answer
768 views

In OS X how could I create symlinks to everything within a given directory (rather than the directory itself)?

Say I have a bunch of config files that I'd like to store elsewhere, but if I move them and then symlink the directory, the application sees it as a symlink and won't use the contained files. Instead ...
3
votes
2answers
5k views

How to run a symlink pointing to an executable in terminal (Linux)

I installed NodeJs on an Ubuntu machine, and the package have been installed as nodejs. Now, to run it as node, I created a symlink: sudo ln -s /usr/bin/nodejs /usr/bin/node This will work if I ...