symlink

Deploy:symlink on capistrano points the “current” directory to previous release

僤鯓⒐⒋嵵緔 提交于 2019-12-05 01:47:24
问题 I am using capistrano to deploy my Ruby on Rails project. I am on a Dreamhost VPS and since a few weeks ago, with no change in capistrano or passenger, I began to experience a strange problem with the deployment: Every time capistrano is deploying my application, everything goes right except deploy:symlink (which is called by default) that should point the "current" directory to the newest release. Although the new release is deployed properly to the "releases" directory, the problem is the

Bash: how to get real path of a symlink?

独自空忆成欢 提交于 2019-12-05 01:26:33
Is it possible, executing a file symlinked in /usr/local/bin folder, to get the absolute path of original script? Well, .. I know where original file is, and I know it because I am linkging it. But, ... I want this script working, even if I move original source code (and symlink). #!/bin/bash echo "my path is ..." readlink is not a standard command, but it's common on Linux and BSD, including OS X, and it's the most straightforward answer to your question. BSD and GNU readlink implementations are different, so read the documentation for the one you have. If readlink is not available, or you

Follow symlinks in SVN

假装没事ソ 提交于 2019-12-05 01:24:09
I have a linux directory (and don't need any windows checkout): /home/me/projects/project1 In this project, I need SVN (1.8.8) to follow a symlink "link1": /home/me/projects/project1/link1/<some_directories_and_files> But SVN won't let me do that, it just add link1 but not its content. If I try to add its content, I get an error: svn add link1/* svn: E145001: Can't schedule an addition of '/home/me/projects/project1/link1/first_directory' below a not-directory node I tried converting link1 to hard link but I can't do that either: ln /path/to/my/linked/directory link1 ln: ‘/path/to/my/linked

Following a link into a git-repo without lengthy dialog

。_饼干妹妹 提交于 2019-12-04 22:59:37
In a directory I have symbolic links into a git-administered directory (all under Linux). Every time I want to e -dit such a link I get a dialog question: Symbolic link to Git-controlled source file; follow link? (yes or no) And I have to type y e s ⏎ to get to the file. Is there a somewhat simpler way? Ideally, something like declaring that a directory needs no dialog. Set vc-follow-symlinks . You probably want it to be nil (open link), but be sure to read the docs because t (open target) is also sensible. (setq vc-follow-symlinks nil) You can make this a dir local variable if you don't want

Modifying a symlink in python

北慕城南 提交于 2019-12-04 22:16:09
How do I change a symlink to point from one file to another in Python? The os.symlink function only seems to work to create new symlinks. If you need an atomic modification, unlinking won't work. A better solution would be to create a new temporary symlink, and then rename it over the existing one: os.symlink(target, tmpLink) os.rename(tmpLink, linkName) You can check to make sure it was updated correctly too: if os.path.realpath(linkName) == target: # Symlink was updated According to the documentation for os.rename though, there may be no way to atomically change a symlink in Windows. In that

Tomcat 7 symbolic link to war file

只谈情不闲聊 提交于 2019-12-04 19:40:59
I would like to have a symbolic link in tomcat's webapps directory that points to a war file at another place in my file system, and I would like that war file to be served as the default webapp. I have pieced together the following solution, but the app is not accessible from the browser. I have a folder in my home directory ~/tomcat/webapps. The owner is tomcat7. In this folder, I have my war file, myapp-1.0.war. In my /var/lib/tomcat7/webapps directory, I have a symbolic link: myapp -> /home/[me]/tomcat/webapps/myapp-1.0.war. In my /etc/tomcat7/server.xml, I have: <Context docBase="/var/lib

How to convert absolute path to relative in c linux

半腔热情 提交于 2019-12-04 16:55:54
I would like to know how an absolute path of a symbolic link can be converted to relative based on a given directory (that includes the linked file) in c language on linux (Ubuntu) OS. I thought searching for the sub-string of the relative path, but what if it already exists higher in the folder's hierarchy? Here is a more specific description of what I want to do: Relative path: folder/folder1/folder2 Absolut path: /home/giorgos/Desktop/folder/folder1/folder2/a.pdf changed to /home/giorgos/Desktop/myfolder/folder1/folder2/a.pdf Obviously I cant' simply search for and replace "folder/",

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

大城市里の小女人 提交于 2019-12-04 15:26:38
问题 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 modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS 回答1: By default, grep would not ignore non-existent or unreadable files. You need to supply the -s or --no-messages option in order to do so. Quoting from man grep : -s, --no

Apache Virtual Host in Windows - how do I deal with Symbolic links?

回眸只為那壹抹淺笑 提交于 2019-12-04 11:41:52
I'm trying to run a virtual host on a WAPP stack. My virtual host has the FollowSymLinks option, but in Windows, all those symbolic links (I'm using shortcuts, and I think this may be the problem) have the .lnk extension. So if I'm trying to access settings.html , Apache can't find it because all i have sitting there is settings.html.lnk . Apologies if my question is unclear. Apache doesn't understand shortcuts. You need to use a proper symlink. On windows this is accomplished using the command line tool mklink . See http://ipggi.wordpress.com/2009/09/07/windows-file-junctions-symbolic-links

apache alias vs symbolic link

拜拜、爱过 提交于 2019-12-04 11:38:45
问题 When working with apache on a unix system, If your file system has icons in /home/me/web/icons and you want the browser be able to display them when calling the url http://www.me.com/icons/myicon.jpg for example, then you have at least 2 solutions : alias ( Alias /icons/ /home/web/icons/ ) symbolic links ( ln -s /home/web/icons /home/me/web/www/icons ) It seems to me that using apache aliases is the best choice since we know exactly that aliases would normally be in the /etc/apache2 directory