symlink

How can I resolve a symbolic link in Perl?

Hi, I have a symbolic name java or jre or jre1.5 or jre1.6 or java1.5 or java1.6 that will point to the respective directory. Taking into account the first instance, it will look like: java -> /usr/java/jdk1.5.x.x My aim is as follows: To check whether the symbolic exists or not To get the value of the directory it is pointing ...

Can the Subversion client (svn) derefence symbolic links as if they were files?

I have a directory on a Linux system that mostly contains symlinks to files on a different filesystem. I'd like to add the directory to a Subversion repository, dereferencing the symlinks in the process (treating them as the files they point to, rather than links). Generally, I'd like to be able to handle any working-copy operations wi...

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 old, i.e. there will be no possibility that something will notice disappearing of it, There...

Is symbolic tools missing?

When I input help sym in Matlab v7.6,it displays the words below: sym not found. Use the Help browser Search tab to search the documentation, or type "help help" for help command options, such as help for methods. I don't know why.Help! Thank you! ...

Uploading symlinks to a server

Hi all, Is it actually possible to upload symlinks and keep them as symlinks as opposed to uploading the files they're pointing to? I have a directory structure that relies on symlinks and I'm looking for a way to send this to users who have no command line knowledge and would want to upload it to their servers. Is there a way to cre...

Symlinks on windows?

Does anyone know of a way to make/read symbolic links across versions of win32 from Python? Ideally there should be a minimum amount of platform specific code, as I need my app to be cross platform. ...

Cygwin SVN symbolic link checkout broken

I've installed the latest version of Cygwin on Vista with SVN, Make and GCC in the installation. When I SVN checkout from a repository with some symbolic links in it, the symbolic links are not converted to symbolic links on Cygwin, rather they are just left as regular ascii files with "link ../../blah/blah" inside them. SVN proplist of...

Can you change what a symlink points to after it is created?

Does any operating system provide a mechanism (system call - not command line program) to change the pathname referenced by a symbolic link (symlink) - other than by unlinking the old one and creating a new one? The POSIX standard does not. Solaris 10 does not. MacOS X 10.5 (Leopard) does not. Is there anything that does? (I'm expec...

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 'path/to/symlink' ...

Check if a file is real or a symbolic link

Is there a way to tell using C# if a file is real or a symbolic link? I've dug through the MSDN W32 docs (http://msdn.microsoft.com/en-us/library/aa364232(VS.85).aspx), and can't find anything for checking this. I'm using CreateSymbolicLink from here, and it's working fine. ...

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

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" path, and in this case that's not helpful. I need it to actually give me the symlinked version. Does Python have a command for that? ...

Symlinks in Linux/PHP

Hello, Using PHP on Linux, I can just use the is_link() function to detect whether a given file is a symbolic link. However, is there a way to detect if a given file is the target of any other symbolic links? Thanks, Brian ...

following symbolic links in C

I'm looking to write a C program which, given the name of symbolic link, will print the name of the file or directory the link points to. Any suggestions on how to start? ...

Can 'make' check if mtime of a dependency is *different* between runs, not just if it's newer than target?

If foo_user.cpp depends on foo.h, then foo_user.cpp is built, and then foo.h's modification time is set to further in the past, make will not rebuild foo_user.cpp (because foo.cpp is 'newer'). I'd prefer it if make recorded the modification times of dependencies, and if they changed at all (newer or older), to consider targets of that de...

How to copy junction as-is instead of the folder it points to?

I copy set of folders from server 1 to server 2. Amongst files I also have junction: folder with set of config files: on server 1 this junction points to... let's say c:\Config (that contains config1.cfg, config2.cfg) On server 2 I also have c:\Config with the same set of files, but of course they contains their own settings that I do n...

Is there a way to edit a symlink without deleting it first?

So I created a symlink: ln -s /location/to/link linkname Now I want to change the location that the symlink links to. How do I do that? is there a way to do it without deleting it first? ...

Mulitple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, i currently duplicate the files each time i create a new site and uplaod different css and images. What would be the best practice to simply this into 1 main location for all common files? Here is my current structure for each site: /home/ftpus...

Create broken symlink with Python

Using Python I want to create a symbolic link pointing to a path that does not exist. However os.symlink just complains about "OSError: [Errno 2] No such file or directory:".. This can easily be done with the ln program, but how to do it in Python without calling the ln program from Python? Edit: somehow I really messed this up :/ ... b...

Ignore symlinks in clean URL's in .htaccess

Example URL: example.com/user /user is both a symlinked directory and a valid URL to content on my site. I user Horde Routes to request the content and all requests to the site go through index.php. I currently have a .htaccess file that looks like: Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com$ [NC] ...

Find symlinks to certain directory or one of its subdirs

Is there an easy way to show whether there are any symlinks in a specified path pointing to a certain directory or one of its children? ...