Questions tagged [symlink]

Symlink is short for symbolic link (also soft link). It is a term for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.

symlink is short for symbolic link (also soft link). It is a term for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution

2458 questions
17
votes
3 answers

How do I create a soft link programmatically in C/C++?

How do I create a soft link programmatically in C/C++? link() system call in freebsd will create a hard link.
Professor_Chaos
  • 323
  • 1
  • 2
  • 6
17
votes
3 answers

Using mklink command with network drives

I have two network drives that I access through Windows 7: V:\ and T:\ I am trying to create shortcuts between the two that alphabetise with folders (rather than files), so I am using the mklink command: mklink /d \Photos V:\Photos which creates a…
Sam
  • 2,172
  • 3
  • 24
  • 43
16
votes
4 answers

Difference between test -h and test -L

What is the difference between test -L filename and test -h filename in ksh shell. From the man page, both were used to identify a symbolic link, but I want to know the exact difference. Here is the description from the man page. -h file …
Sachin
  • 20,805
  • 32
  • 86
  • 99
16
votes
4 answers

How to find all files which are basically soft or hard links of other directories or files on linux?

How could I get the list of all linked files on my system or from a certain directory. I used to create links but they became unmanageable with time. I want the list of all such links from a directory. Can anyone help?
DKSRathore
  • 3,043
  • 6
  • 27
  • 36
16
votes
1 answer

Creating a symbolic link with Java

I'm having trouble creating a symbolic link to a directory in Java. I'm using the createSymbolicLink() method from the Files class: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html Absolute paths: Target: /some/path/target Link:…
omnibrain
  • 533
  • 2
  • 6
  • 18
16
votes
3 answers

Git file is beyond a symbolic link

I've ran into an issue wherein Git believes that a file is beyond a symbolic link, and that, thus, it cannot be version controlled, but it appears to be a real file. [root@r1 h]# stat -f conf/core-site.xml File: "conf/core-site.xml" ID:…
jayunit100
  • 17,388
  • 22
  • 92
  • 167
16
votes
3 answers

How to get Git on Windows to ignore symbolic links

I can't get this to work. I have cloned a repository that has a dummy file (named src): /path/src. On Windows I have created a symbolic link: mklink -d /path/src /otherplace/src (but I of course had to delete the dummy src file first). In both my…
Magnus Johansson
  • 28,010
  • 19
  • 106
  • 164
16
votes
6 answers

Virtualenv not creating an environment

I installed Virtualenv on Ubuntu 12.04 and was using it to work on a sample project under the unity desktop. I'm using VirtualBox and was having some issues with the unity desktop so changed to the KDE desktop. I'm now trying to create a new…
adohertyd
  • 2,689
  • 19
  • 58
  • 78
15
votes
4 answers

After symlinking a file, how do I get the path of the original file in Ruby?

I have a Ruby script with path /foo/bar/gazook/script.rb. I also created a symlink to it in $HOME/bin. Now, I want my Ruby script to access some other file in directory /foo, and to keep paths relative, I have a variable FOO_DIRECTORY =…
grautur
  • 29,955
  • 34
  • 93
  • 128
15
votes
4 answers

Packaging symlinks via rpmbuild?

Is it possible to make rpmbuild to preserve symlinks on packaging? The current behavior is to create copies of files, which I would like to avoid.
SyBer
  • 5,407
  • 13
  • 55
  • 64
15
votes
2 answers

Creating Hardlinks and Symlinks in Android

I am creating an app in which I would like to make use of hardlinks and symlinks in the Android external memory filesystem. I have tried using the commands Os.link("oldpath", "newpath"); Os.link("oldpath", "newpath"); However, when I try this, I…
Ashwin Kudva
  • 325
  • 2
  • 16
15
votes
4 answers

How do I stop TeamCity from turning symbolic links into files when using server checkout mode with a Windows server and a Mac agent?

We're moving from a combination of CC/CC.NET to TeamCity. The core of our product is Windows but we have a Mac agent. We have our VCS checkout mode set to "Automatically on server". Meaning the source will be checked out on the (Windows) server and…
Redwood
  • 66,744
  • 41
  • 126
  • 187
15
votes
1 answer

Creating a relative symbolic link through the os package

I would like to create a relative symbolic link in go using the os package. os already contains the function: os.SymLink(oldname, newname string), but it cannot create relative symlinks. For example, if I run the following: package main import ( …
rolfl
  • 17,539
  • 7
  • 42
  • 76
15
votes
2 answers

Correct way to setup Virtualbox 4.3 to use symlinks on guest (for meteor)

I use Windows 8 and installed Virtualbox so i can access to a Linux (Ubuntu) System. The most i still did to do this - so at this moment i have a working Virtualbox with Ubuntu 14.04 LTS. In my case i need this Virtualbox with Linux for meteor. The…
TJR
  • 6,307
  • 10
  • 38
  • 64
14
votes
1 answer

How to make GNU/Make stop de-referencing symbolic links to directories

GNU/Make manual §5.7 states the following: 5.7 Recursive Use of make Recursive use of make means using make as a command in a makefile. This technique is useful when you want separate makefiles for various subsystems that compose a larger…
user405725