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)

83
votes
1answer
38k views

directory junction vs directory symbolic link?

MKLINK [[/D] | [/H] | [/J]] Link Target /D Creates a directory symbolic link. Default is a file symbolic link. /H Creates a hard link instead of a symbolic link. /J ...
74
votes
5answers
70k views

chown is not changing symbolic link

I'm trying to change the user/group of a symbolic link with the command: $ chown -h myuser:mygroup mysymbolic/ But it's not changing. I'm logged in as root. The current user/group is set to ...
73
votes
6answers
76k views

How can I delete a symbolic link?

I created a symlink using mklink. Now I need to change it but I can't figure out how to delete it so I can recreate it correctly.
51
votes
6answers
72k views

How to copy symbolic links?

I have directory that contains some symbolic links: user@host:include$ find .. -type l -ls 4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include 4737415 ...
42
votes
4answers
73k views

How to remove a symbolic link to a directory?

I made a symbolic link with the following commmand: ln -s ../test5 I want to remove it now but my rm fails: $ rm -Rf test5/ rm: cannot remove `test5/': Not a directory $ rm test5/ rm: cannot ...
33
votes
3answers
4k views

What are the various link types in Windows? How do I create them?

Is it possible to link two files or folders without having a different extension under Windows? I'm looking for functionality equivalent to the soft and hard links in Unix.
32
votes
8answers
46k views

How do I create a link in Windows 7 home premium as a regular user?

I am a Linux guy and as such I am very lost when I try and do anything is Windows. I am trying to create the following link: mklink /d C:\backup\data \\myth\backup\data But I do not have sufficient ...
26
votes
8answers
49k views

Create a symbolic link in the Mac OS X Finder

Is there a way to get the same functionality as the unix command ln -s in the Mac OS X Finder (OS 10.5)? I want to be able to create symbolic links while working in Finder windows without opening the ...
20
votes
2answers
15k views

How do I create a relative symbolic link in Linux?

I need a symlink that resolves relative to the directory it is placed in. What command is used to create such a thing?
20
votes
3answers
8k views

Does rm -f follow symbolic links?

I have a directory like this: $ ls -l total 899166 drwxr-xr-x 12 me scicomp 324 Jan 24 13:47 data -rw-r--r-- 1 me scicomp 84188 Jan 24 13:47 lod-thin-1.000000-0.010000-0.030000.rda ...
19
votes
3answers
9k views

What is the difference between Symbolic Link and Shortcut?

What is the difference between a Symbolic Link and a Shortcut?
14
votes
1answer
2k views

Why can't normal users on Windows create symbolic links?

Beginning with Windows Vista NTFS gained the ability to represent symbolic links to files (as opposed to directory junctions). Also the mklink utility appeared. However, non-administrative users can't ...
13
votes
1answer
12k views

When creating a symbolic link, how do I troubleshoot 'too many levels of symbolic links'?

I'm trying to create a symbolic link on Ubuntu 10.04 it says: me@laptop:~/PHPUnit$ ls assertions.php LICENSE PHPUnit README.markdown build.xml package.xml phpunit.bat ...
13
votes
2answers
19k views

Does Windows7 support symbolic links (folder 'shortcuts')?

I see W7 seems to have more support for virtual folders, that don't correspond to actual directories on the disk. Does it also support proper symbolic links so I can e.g create a symbolic link ...
13
votes
3answers
12k views

Ubuntu + latest samba version, symlinks no longer work on share mounted in windows

I just apt-getted (apt-got?) the latest software for my Ubuntu 9.10 linux box, and I noticed that samba was the included in the update. After the install, the symlinks in my home directory no longer ...
12
votes
4answers
7k views

How to copy symlinks to target as normal folders

i have a folder with symlinks: marek@marek$ ls -al /usr/share/solr/ razem 36 drwxr-xr-x 5 root root 4096 2010-11-30 08:25 . drwxr-xr-x 358 root root 12288 2010-11-26 12:25 .. drwxr-xr-x 3 root ...
12
votes
4answers
4k views

Any tool to create symlinks in GUI [closed]

I can use mklink, but I am wondering are there any GUI tools available?
12
votes
4answers
3k views

Scenario - NTFS Symbolic Link or Junction?

Differences ┌───────────────┬──────────┬──────────┬──────┬───────────┬─────┐ │ │ Absolute │ Relative │ File │ Directory │ UNC │ ...
10
votes
4answers
4k views

Does window have the ln -s or equivalent?

I need to link a file to c:\Windows\System32\drivers\etc\hosts. How can I do that with windows? Is there a soft link such as 'ln -s' or equivalent in Windows?
10
votes
4answers
12k views

How to allow acces to a symbolic link in my ~/Sites/ for Apache under Mac OS X Lion 10.7.2

I need allow access to a sym-linked directory within ~/Sites from my Apache. I Symlinked the directories like this ln -s ~/path/to/the/source/directory/ ~/Sites/source-link-here Now whenever I fire ...
10
votes
3answers
19k views

Creating a symbolic link to mapped network drive in Windows

I am having an issue creating a symbolic link on Windows 7 Ultimate. I want to map a folder from a mapped network drive into My Documents. mklink /D "C:\Users\Vegard\Documents\Virtual Machines" ...
9
votes
3answers
619 views

Figure out what non-symlink path would be?

On Linux, if I've cd'd around and am now in a directory, is there a way to figure out what the real path to that directory is if I had not used a symbolic link to get there? Consider: $ pwd ...
9
votes
2answers
6k views

Finding all symbolic and hard links to a file on UNIX

If I have a specific file in a UNIX filesystem, is there a way to use bash to find all links to that file, both symbolic and hard? If I need different commands for each, what are they?
9
votes
1answer
6k views

Permission to make symbolic links in Windows 7?

How can I grant a particular user the permission to create symlinks in Windows 7? I've searched through "Group Policy" and Google, but haven't found anything. On a side note, is there a way to ...
9
votes
2answers
5k views

Executing symbolic link to exe - “The specified path does not exist”

When trying to execute a symbolic link which points to an exe file (on Windows 7), the "Open with" windows appears. When renaming it to a ".exe" file, it says "The specified path does not exist. Check ...
9
votes
1answer
231 views

When should I use hard links as opposed to soft links?

I'm about to start toying around with mklink but I'm still trying to get a real grip on this whole "symlink" thing. In particular, I've noticed there's two types of links - "soft links" and "hard ...
8
votes
2answers
1k views

Tab-completion with directories/links

I have this problem with tab-completion in terminal in both archlinux and ubuntu: I have a link which links to a directory named "something" in my home directory. Now when I open a terminal and want ...
8
votes
4answers
7k views

How can I find all symlinks in Windows Vista or 7?

I'm looking for a way to search for all the symbolic links on a NTFS filesystem on Windows Vista or 7. It would be even better if I could specify a specific target to see if it has any symlinks ...
8
votes
2answers
1k views

When would one prefer a Junction Point (Directory Hard Link) over a symbolic link?

Technically, I get the difference between the two; this is just a usage question. In particular, I want to move some folders off of a smaller hard drive and onto a larger one, but I need to use some ...
7
votes
7answers
5k views

Straightforward, easy way to create symbolic links on Windows?

I need something supported at least on Windows XP and not requiring any new user downloads hopefully.
7
votes
2answers
4k views

View a list of symbolic links on system?

Is there a way to see a list of all the symbolic links that are active on a Windows machine?
7
votes
5answers
3k views

How do I alias a Homebrew installed Ruby 1.9 gem binary in /usr/local/bin?

Homebrew's Ruby 1.9 ships with rubygems. Doing gem install ... installs files and binaries into some long-winded path. For example, bundler is installed at: ...
7
votes
1answer
8k views

How do you make a symbolic link with a relative path using mklink?

This web page implies that it is possible to make symbolic links with relative paths using mklink. I have tried all sorts of ways to make relative symbolic links, but I always end up with an absolute ...
7
votes
7answers
2k views

Automatically cycle numerous or large files to the trash

I've been tasked with fixing a vendor's program that, under certain conditions, dumps gigs of junk files into a log directory. It ends up filling users' machines. My task is to figure out how to make ...
6
votes
2answers
23k views

How to find all soft links (symbolic links) in current directory?

Question relates to shell-scripting in bash. How to check with a script which files within the current directory are soft links? In case I have used the wrong term, when I say soft links, I am ...
6
votes
4answers
2k views

Need to hide a symbolic link without hiding the directory it links to

I created a symbolic link (specifically a symbolic link & not a Finder alias which bash can't follow) to a directory in my home folder using ln -s link $HOME/directory & now I wish to hide the ...
6
votes
1answer
3k views

When using Time Machine, does it follow Symbolic Links in mac?

I have a mac with a 250gb hd. My iTunes library is in an external hard disk, 500gb. I have Symbolic Links in my home music folder pointing to the files and the xml library (I dont let iTunes organize ...
6
votes
4answers
4k 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
2answers
14k views

Using symbolic link in Windows XP

Junction is a good symbolic link tool in XP. However, it's not so easy to use at first moment, ie. only can use command line interface; move/rename target file/folder; got to use 'junction -d ' to ...
6
votes
2answers
6k views

Linux, can a home directory be symlinked?

I have a second large storage hdd mounted in Ubuntu in /media/storage. I would like my home directories for me and all future users of the system to be located on this storage drive as well. I was ...
6
votes
2answers
11k views

Ubuntu: Creating a symlink with network shared folder

I'm trying to create a symlink with a network shared folder (located in a windows sys) from my ubuntu system using the command. ln -s smb://sys-name/www www It creates a link but it says the link is ...
6
votes
3answers
747 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
2answers
3k views

How do I change target of symlink in windows

Is it possible to change the target of a symlink or junction in Windows? In Linux it can be modified with: ln -f
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, ...
5
votes
3answers
10k views

Why can't I make a symbolic link (mklink) even when I'm an administrator

When I run mklink /D "C:\Users\bwilliams\AppData\Roaming\Sublime Text 2" "C:\Users\bwilliams\Dropbox\Sublime Text", I get this error `You do not have sufficient privilege to perform this operation. ...
5
votes
3answers
8k 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
1answer
392 views

Convert symlinks to hard links

I'd like to recursively convert soft links to hard links in a directory. I've tried something like this: for f in *; do (mv $f{,~} && ln $(readlink $f~) && rm $f~) done …but it ...
5
votes
1answer
807 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)?
5
votes
2answers
2k 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
1answer
2k 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).