Tag Info

Hot answers tagged

33

It's not a bug. The use case is for when you want to link a file to the same basename but in a different directory: cd /tmp ln -s /etc/passwd ls -l passwd lrwxrwxrwx 1 xxx xxx 11 Jul 29 09:10 passwd -> /etc/passwd It's true that when you do this with a filename that is in the same directory it creates a link to itself which does not do a whole lot of ...


6

The easiest way to find out of course, is to try it and see. When no 2nd argument is given, ln will create a link in the current directory with the same name as the original: $ ln -s /etc $ ls -l lrwxrwxrwx 1 terdon terdon 4 Jul 29 16:09 etc -> /etc This is also explained in man ln: In the 2nd form, create a link to TARGET in the current ...


3

Also note that the error you gave above ln: creating symbolic link `/etc/init.d/jboss1': Permission denied is not due to the owner of the symlink being somebody else than the owner of the original file. It is (most probably) caused by user askar not having write access to the directory /etc/init.d.


2

It's not available as part of standard Unix or a graphical Linux interface. Linux system administrators can use overlayfs. Actually one of the most important uses is to allow modifications to a running LiveCD system, e.g. installing extra packages. There are also equivalents in FUSE, which can be used on Linux without root privileges. There will be ...


1

When you did the ls -il /usr/bin, you were listing file names and matching inode numbers. In this context, it's probably best to think of "file name" as separate from "inode", and to think of the inode as the file. The "inode" is typically an on-disk data structure containing metadata (permissons, ownership, creation time, access time, etc) and the disk ...


1

I have no idea what the best approach is and elegance is certainly in the eye of the beholder, but I use the following for my dotfiles: A ~/.dotfiles directory that contains all of the dotfiles themselves. These are all managed in a git repo. A script, also in ~/.dotfiles that creates the required links into my home directory. I don't have any dotfiles in ...


1

0xC0000022L's answer is thorough for the Windows side of things. The Mac can recognize Linux's symlinks; however Linux cannot recognize aliases made in the Mac's Finder (symlinks created using ln -s work fine).



Only top voted, non community-wiki answers of a minimum length are eligible