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
29
votes
7 answers

Configure Symlinks for single directory in Tomcat

I have a directory to which a process uploads some .pdf files. This process is out of my control. I need to make those files available through the website using Tomcat. I have a directory /var/lib/tomcat5/webapps/test1 available to the web and I can…
jeph perro
  • 6,242
  • 26
  • 90
  • 124
29
votes
2 answers

How to create relative symbolic link in mac OS?

How to create a relative symbolic link that would always point to original folder two levels up? I would like to create a computer-independent alias that would work on any machine, provided that the original folder exists two levels up. …
Maggie
  • 7,823
  • 7
  • 45
  • 66
29
votes
7 answers

symlink-copying a directory hierarchy

What's the simplest way on Linux to "copy" a directory hierarchy so that a new hierarchy of directories are created while all "files" are just symlinks pointing back to the actual files on the source hierarchy? cp -s does not work recursively.
Max Spring
  • 1,111
  • 2
  • 11
  • 18
28
votes
3 answers

How to list all symbolic links on an NTFS filesystem

since Windows Vista there is an new Win32-API call CreateSymbolicLink to create a symbolic link on the NTFS filesystem. Does anyone know if there is an way to list all existing symbolic links on the filesystem?
Alexander
  • 3,724
  • 8
  • 42
  • 50
28
votes
1 answer

Why does recursive grep show 'No such file or directory' errors?

I'm grepping a local svn directory. When I run grep -r "pattern" . I get some errors such as grep: ./Data/test: No such file or directory Who asked grep to look for non-existent files? >grep --version grep (GNU grep) 2.10 >lsb_release -a No LSB…
user13107
  • 3,239
  • 4
  • 34
  • 54
28
votes
2 answers

Behavior of cd/bash on symbolic links

Assume I have the folders ~/a/b in my home folder, and the folder b contains a symbolic link to '..' named 'symlink'. Then I perform the following actions in bash: hm@mach:~$ cd a/b/symlink hm@mach:~/a/b/symlink$ pwd…
Hermann Speiche
  • 894
  • 1
  • 9
  • 16
27
votes
1 answer

git assume unchanged vs skip worktree - ignoring a symbolic link

I have a problems with a git repository and windows. The problem is that the git repository has a linux symbolic link in it and with developers running windows, that obviously does not work. Now since that symbolic link should never change, I want…
ryanzec
  • 27,284
  • 38
  • 112
  • 169
27
votes
1 answer

How to symlink python in Homebrew?

For some reason it's no symlinking when I run `brew link python.' I'm getting the following error and I do what it tells me to do but it's not working. I have tried doing what it tells me to do but maybe I'm not putting the formula_name right. Also,…
Jennifer
  • 297
  • 2
  • 5
  • 9
27
votes
5 answers

Windows 7 Symbolic Link - Cannot create a file when that file already exists

I'm trying to create a symbolic link between two directories. I have a directory called TestDocs and TestDocs2. I will be doing all my work in TestDocs, but I need it all to be reflected in TestDocs2. So all files that are in TestDocs2 will be…
user1513171
  • 1,912
  • 6
  • 32
  • 54
25
votes
6 answers

npm install errors on vagrant/homestead/windows: EPROTO: protocol error, symlink

I'm building my first project in Laravel and trying to use Elixir, using homestead on Windows 8.1. I've hit the known npm/vagrant issue of…
Diane Kaplan
  • 1,626
  • 3
  • 24
  • 34
25
votes
2 answers

How to force a symlink creation by overriding the existing symlink?

I use the fs module to create symlinks. fs.symlink("target", "path/to/symlink", function (e) { if (e) { ... } }); If the path/to/symlink already exists, an error is sent in the callback. How can I force symlink creation and override the existing…
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
25
votes
4 answers

How to treat a symbolic link as a directory in Mercurial?

As of 0.9.4, when adding a symbolic link Mercurial keeps track of the link itself, and not the file or directories it points to. However, there are cases when it is desirable to keep track of the files pointed to by the symbolic link. How can I…
D R
  • 21,936
  • 38
  • 112
  • 149
25
votes
3 answers

How can I tell if a directory from "ls" is a symlink?

I am using Mac OS X terminal. How can I tell if a directory returned by "ls" is a symlink or the actual directory? If it is a symlink, how can I inspect where it is linking to, or modify it? I actually tried to research this one a fair amount, but…
Don P
  • 60,113
  • 114
  • 300
  • 432
25
votes
4 answers

Commit symlink into subversion

I'm tring to commit a symlink into subversion, but I get this error when I try to add the actual symlink: Can't replace 'path/to/symlink' with a node of a differing type; the deletion must be committed and the parent updated before adding …
vise
  • 12,713
  • 11
  • 52
  • 64
24
votes
3 answers

resolve symlinks in Go

How can I resolve symlinks in Go? Currently I call readlink -f but I want something more idiomatic. package main import ( "os/exec" "fmt" ) func resolve(p string) string { cmd := exec.Command("readlink", "-f", p) out, _ :=…
mnagel
  • 6,729
  • 4
  • 31
  • 66