symlink

How do I grant SeCreateSymbolicLink on Windows Vista Home edition

I want to be able to use mklink to create symbolic links on my Windows Vista Home edition computer. However, I must grant SeCreateSymbolicLink before mklink will be able to function on Vista Home edition (by default the right is revoked). Home edition provides no UI or tool facility to grant/revoke discreet rights. A Wikipedia link on...

Find out whether a file is a symlink in Powershell

Edit: Changed the question title since the answer explicitly only handles Symlinks. I am having a Powershell script which is walking a directory tree and sometimes I have auxiliary files hardlinked there which should not be processed. Is there an easy way of finding out whether a file (i. e. System.IO.FileInfo) is a hard link or not? I...

which way to create a soft link on XP or Vista for projects?

I'd like to create a soft link on XP and Vista so that c:\proj01\lib will point to c:\lib and c:\proj02\lib will point to c:\lib the reason to do so is that some IDE has auto complete to suggest the function name or can quick jump to the function in different files, but all files must be under one folder, such as c:\proj01, so I ho...

Powershell Hard and Soft Links

Can Powershell 1.0 create hard and soft links analogous to the unix variety? If this isn't built in, can someone point me to a site that has a ps1 script that mimics this? This is a nessary function of any good shell, IMHO. :) ...

mod_rewrite vs symlink: the browser is not fooled.

I have a file foo.bar.1 on my server and when I try to access it from a browser (firefox) I get a popup that says "You have chosen to open foo.bar.1 which is a: 1 file ... What should Firefox do with this file...". If I create a symlink to it, foo.dat, I can access it just fine; the contents display in the browser as I expect. My probl...

How to do internal svn:externals

I'm trying to set up a sort of symbolic link in our subversion repository with svn:externals, but it's not really working all that well. What I want to do is link a folder in one part of the same repository to another, like so: src/somewhere_else/schema https://svn.acme.com/svn/project/trunk/src/schema This works fine for truly externa...

Multi-domain Subversion Deployment on Media Temple DV

This is a question pretty specific to Media Temple DV servers, but I'm hoping someone out there can help. Our deployment process on a DV server involves ssh'ing in and doing a Subversion checkout into a folder called "svn" and then creating a symlink in "httpdocs" to point to a release folder in that "svn" folder. I'm wondering if it's p...

What does git do to files that are a symbolic link?

If I have a file or directory that is a symbolic link and I commit it to a git repo what happens to it? I would assume that it leaves it as a symbolic link until the file is deleted and then if you pull the file back from an old version it just creates a normal file. What does it do when I delete the file it references? Does it just co...

Java reports alias (symlink) as size 0 on Mac OSX. How do I get the true file size?

File file = new File("path to file alias foo"); where "path to file alias foo" is an alias reports file size to be 0 instead of the actual file size. I found a workaround to test for aliases: public boolean isLink() { try { if (file.getAbsolutePath().equals(file.getCanonicalPath())) { return false; ...

How do I determine the value of an symbolic path

When I use "lynx" via the terminal I believe it is using an symbolic link, but my Google searches have failed to show me how to determine the symbolic path value. That is, I would like to determine the symbolic link value for "lynx", and a few others, e.g. wget, etc. Thanks for any insights and suggestions. P.S. I am using the termi...

Exposing symbolic links to a UPnP server

Hi, I have a DNS-32 NAS drive with 2 volumes - one used for backup in a RAID 0 configuration and the other is just for media files, and I have my UPnP server pointed at its root. I decided to backup my photos and music collection, so I copied them to volume 1. But since I wanted them exposed to the UPnP server, I figured all I need is a...

Emulating symlink-like behaviour in a source control repository

Suppose I have the following (desired) folder structure: *CommonProject *Project#1 ----> CommonProject(link) *Project#2 ----> CommonProject(link) Where the CommonProject is the location of the source belonging to that project, and CommonProject(link) is merely a soft link to the main location. If we imagine this as a tree-view in a vi...

Delete a symbolic link when the original folder is deleted

I was thinking of using inotifywait to watch the original folder where the original folders are in, then when ever it detects that a folder has been deleted, then delete the same symbolic link in the other folder. So my question is, is that the best way? Or are there better ways to delete a symbolic link when the original folder gets de...

How to tell cscope not to dereference symbolic links?

How do I tell cscope to ignore symbolic links when it is recursively traversing a directory to index source code files? I do something like this: find . \( -name "*".hh -or -name "*".h -or -name "*".hxx -or -name "*".H -or -name "*".C -or -name "*".cxx -or -name "*".c -or -name "*".cc \) -type f -print > cscope.files cscope -qb Ther...

How can I put a WebDAV filesystem in my DVCS when I can't write to the root?

I have WebDAV access to a filesystem where I can't write to the root of the filesystem, but can write to 2 folders beneath it. I'd like to: track my changes in a single DVCS repo (git/hg preferred) work directly on the WebDAV connection rather than constantly pulling changes into it (this would hurt my workflow quite a bit) Assume th...

How can I derefence symbolic links in bash?

How can I take any given path in bash and convert it to it's canonical form, dereferencing any symbolic links that may be contained within the path? For example: ~$ mkdir /tmp/symtest ~$ cd /tmp/symtest/ /tmp/symtest$ mkdir -p foo/bar cat/dog /tmp/symtest$ cd foo/bar/ /tmp/symtest/foo/bar$ ln -s ../../cat cat /tmp/symtest/foo/bat$ cd ....

How do I create a link to open an ssh connection

I am trying to create a link to open an ssh connection to another computer. I am an OS X 10.5.7 and Ubuntu 9.04 user. I am tempted to create a symbolic link as such: ln -s "ssh user@computer_name" computer_name I know this is wrong. Could someone point me in the right direction? ...

Ruby: How do I get the target of a symlink?

I have a string containing the file system path to an existing symlink. I want to get the path that this link points to. Basically I want the same that I'd get through this bit of hackery: s = "path/to/existing/symlink" `ls -ld #{s}`.scan(/-> (.+)/).flatten.last but I want to do it without shelling out. ...

Bash script to automatically create symlinks to subdirectories in a tree

Ok, this is my third try posting this, maybe I'm asking the wrong question!! It's been a few years since I've done any shell programming so I'm a bit rusty... I'm trying to create a simple shell script that finds all subdirectories under a certain named subdirectory in a tree and creates symbolic links to those directories (sounds more...

Combing a symlink to an external folder with a Rewrite Rule?

I've created a symlink in an account to an folder external to that user account (although with the same ownership). The symlink works but I'd like to combine it with a RewriteRule, and I'm having problems with that. For instance I create the symlink with: ln -s /home/target shortcut And I add the following RewriteRule to .htaccess: ...