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
20
votes
2 answers

Replace important symbolic link ‘safely’

I would like to change the target of symbolic link from within a bash script. The problem is that the symlink is quite important (it's /bin/sh, namely) and I would to do it in fashion that: New target will be available immediately after removing…
Michał Górny
  • 18,713
  • 5
  • 53
  • 76
19
votes
3 answers

How do I prevent IIS 7.5 from caching symlink content?

I have set up IIS 7.5 to statically serve some files, and some of these files are actually symbolic links (created by mklink). Even if I disabled both kernel and user caching, these files seems to be cached somehow by IIS. And IIS is still serving…
TN.
  • 18,874
  • 30
  • 99
  • 157
19
votes
3 answers

Symbolic links in TFS 2010 Source Control?

As far as I know, Team Foundation Server 2010's source control (and prior versions) doesn't support linking (Symbolic links) of files. Linking (per Visual SourceSafe) was the concept of providing one "hard" file in a folder, and then "linking" to it…
RobS
  • 9,382
  • 3
  • 35
  • 63
19
votes
6 answers

Windows XP vs Vista: NTFS Junction points

Problem: I relied heavily on NTFS Junction points in Windows XP, even though they apparently were not an "official" feature of the operating system. Now MSFT has generously made NTFS Junction points an official part of Vista, but apparently they…
dreftymac
  • 31,404
  • 26
  • 119
  • 182
19
votes
2 answers

Create relative symlinks using absolute paths in Node.JS

I have a projects with the following structure: project-root ├── some-dir │   ├── alice.json │   ├── bob.json │   └── dave.json └── ... I want to create symlinks like the following ones: foo -> alice.json I chose to use the fs.symlink…
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
19
votes
4 answers

Is it possible to edit a symlink with a text editor?

When we create a symlink, the number of bytes the symlink takes up is exactly the length of the origin it points to. For instance, $ ln -s dest link1 $ ln -s longer_dest link2 $ ls -l lrwxrwxrwx 1 username 4 Mar 26 20:21 link1 -> dest lrwxrwxrwx 1…
4ae1e1
  • 7,228
  • 8
  • 44
  • 77
19
votes
2 answers

Is there a version of os.getcwd() that doesn't dereference symlinks?

Possible Duplicate: How to get/set logical directory path in python I have a Python script that I run from a symlinked directory, and I call os.getcwd() in it, expecting to get the symlinked path I ran it from. Instead it gives me the "real"…
Gabriel Hurley
  • 39,690
  • 13
  • 62
  • 88
18
votes
1 answer

Resolve symbolic links when copying bundle resources in Xcode

I have a project in Xcode and some resources for the project. The resources contain several symbolic links. When Xcode builds the project, it copies the resources, but does not resolve the symbolic links. Is there a way to tell Xcode to resolve the…
zoul
  • 102,279
  • 44
  • 260
  • 354
18
votes
1 answer

NTFS Junctions vs. Symbolic Links (for directories)

From a high-level standpoint (meaning only worrying about the results and the interface, not the implementation), what is the difference in behavior, if any, between an NTFS reparse point that points to a directory and a symbolic link that points to…
user541686
  • 205,094
  • 128
  • 528
  • 886
18
votes
1 answer

How to figure out if a file is a link?

I have the below code only a part of it is shown here and I am checking if a the type of file. struct stat *buf /* just to show the type buf is*/ switch (buf.st_mode & S_IFMT) { case S_IFBLK: printf(" block device\n"); break; …
Eternal Learner
  • 3,800
  • 13
  • 48
  • 78
18
votes
4 answers

How to obtain the target of a symbolic link (or Reparse Point) using .Net?

In .NET, I think I can determine if a file is a symbolic link by calling System.IO.File.GetAttributes(), and checking for the ReparsePoint bit. like so: var a = System.IO.File.GetAttributes(fileName); if ((a & FileAttributes.ReparsePoint) != 0) { …
Cheeso
  • 189,189
  • 101
  • 473
  • 713
17
votes
1 answer

How to make a symlink in Java when running in Linux?

How to make a symlink in Java/JVM when running in Linux? Are there any other ways to this than using Java Native Interface (JNI) or java.lang.Runtime.exec("/bin/ln -s /some/path symlink")? Creating a symlink is very platform dependant, but I mostly…
Juha Syrjälä
  • 33,425
  • 31
  • 131
  • 183
17
votes
2 answers

Check for symbolic link

I have a symbolic link a.c in my home directory to another file in the same directory. a.c -> b.c I know how to check a.c is a symbolic link using the shell script if [ -L /home/nit/a.c ] ; then echo "a.c is a symbolic link" fi But my question…
nitin_cherian
  • 6,405
  • 21
  • 76
  • 127
17
votes
1 answer

How do I monitor symlinked modules with Nodemon?

I’m developing a module in Node.js which I’ve npm-linked into another projects node_modules folder. I’d like to restart this other projects server upon file changes in my module. Nodemon ignores node_modules by default, but I assumed I could…
Victor Nystad
  • 171
  • 1
  • 3
17
votes
1 answer

How do you determine using stat() whether a file is a symbolic link?

I basically have to write a clone of the UNIX ls command for a class, and I've got almost everything working. One thing I can't seem to figure out how to do is check whether a file is a symbolic link or not. From the man page for stat(), I see that…
hora
  • 3,661
  • 5
  • 25
  • 26