Tag Info

New answers tagged

2

You have an extra backslash in your symbolic link. The actual path is /Applications/Sublime Text.app/Contents/SharedSupport/bin/subl but you created a symbolic link to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl When you use the text of the symbolic link in the shell, the backslash is interpreted as an escape character, so you get ...


2

See @Lambert for part of the answer. You will have to allow Apache to follow links, because if not used carefully, following symlinks can allow access to the rest of the filesystem, so Apache doesn't allow that by default. The option is Options FollowSymLinks for a directory. Another (probably a cleaner) way of doing this is bind-mounting. A symlinked ...


2

The Linux way is to create a symbolic link: ln -s /source_path /path/to/link_name This way you can either create links to files as well as to directories. See https://technet.microsoft.com/en-us/library/cc753194.aspx for reference on mklink where Microsft states that /D is to be used to create symbolic links. And http://unixhelp.ed.ac.uk/CGI/man-cgi?ln for ...


2

The difference is negligible and irrelevant. Creating a hard link or a symbolic link only takes up a few bytes. A hard link costs one directory entry: space to store the name and the inode number in the directory. A symbolic link also costs one directory entry, plus space to store some metadata about the symbolic link; depending on the filesystem, this ...


5

Welcome to the future. It is now 2012, and in your brand new Fedora version 17 /bin is now merely a symbolic link to /usr/bin. There is no separate /bin directory. Further reading Joe 'Zonker' Brockmeier (2012-01-30). The Ever-Changing Linux Filesystems: Merging Directories into /usr. linux.com. Harald Hoyer and Kay Sievers (2012). UsrMove. Fedora ...


3

Symbolic link files take more space. Hard linked files share the same inode; but a symbolic file is a pointer to the original (location). Despite that, there are two caveats for hard links: Not all file system support hard links. Hard links cannot be applied for folders. I guess you do not need to consider about the storage issue since in most of the ...


1

If using bash, then first run shopt -s failglob Or better, put in your .bashrc Now whenever you do: ln -nfs origin_directory/*.pdf -t . It will succeed or fail (with an error message, and do nothing). from manual failglob If set, patterns which fail to match filenames during pathname expansion result in an expansion error.


1

on bash this would work if [ -e origin_directory/*.pdf ] ; then ln -nfs origin_directory/*.pdf . ; fi EDIT: In case you have too many files if [ $(ls origin_directory/*.pdf | wc -l) -gt "0" ] ; then ln -nfs origin_directory/*.pdf . ; fi


2

Depending on what exactly you're trying to accomplish, you might want to consider GNU Stow - it's designed to act as basically a package manager for things built from scratch, and it works by creating symlinks of the sort you're describing from each package's unshared build directory to a common deployment directory. It should be able to do what you're ...


0

If you just want to have a shorter way to run ~/PocketMine/start.sh, you can make an alias for it. Add the following line in ~/.bashrc and call pm to run that script: alias pm=~/PocketMine/start.sh If you need to change to the script's directory first, make it a function: function pm ( cd ~/PocketMine && exec ./start.sh "$@" ) If you want to ...


4

You actually don't need any symlinks, just edit your ~/.bashrc and add the following statement: PATH=$PATH:$HOME/PocketMine This avoids polluting your filesystem with unnecessary clutter like symlinks. If you are a csh/tcsh user rather than a bash user, then edit ~/.cshrc and add set path = ( $path ~/PocketMine ) Personally I'd go one step further ...


1

Adding a symlink to a directory already in your PATH is often preferable. If you want the software to be visible system-wide (by other users), add a symlink to /usr/local/bin. If you want the software to be visible only by you, add once $HOME/bin/ to your PATH (some distributions are configuring the bash shell to add that directory automagically if it ...


3

If you are looking for way to run/execute program/script as a command directly from terminal, then I think putting scripts or links to /usr/local/bin is good choice! Also the advantage is that it is already in path. Visit this related post. But if a program directory provides several executables, then I think exporting path of that directory may ...


0

When you try to use chmod to set the link's permissions, the actually you do is to set the permissions of the link's target.The link's permissions are meaningless.


2

You were told to "symlink folders in /var/lib/vz to /etc/vz". This means you need to create a link in /etc/vz pointing to each of the directories in /var/lib/vz. To do that, run: ln -s /var/lib/vz/names /etc/vz ln -s /var/lib/vz/dists /etc/vz That will create the symlinks /etc/vz/names and /etc/vz/dists which point to /var/lib/vz/names and ...



Top 50 recent answers are included