Tag Info

Hot answers tagged

4

Because the object of the ls invocation is not the same. In the first case, the argument is the current directory (.), and the link is displayed only incidentally (because the argument is a directory and the link is in it). In the second case, it is among the explicitly listed arguments, and the special rule "follow symbolic links" applies only to the ...


3

The easiest way to link to the current directory as an absolute path, without typing the whole path string would be ln -s "$(pwd)/foo" ~/bin/foo_link The target argument for the ln -s command works relative to the symbolic link's location, not your current directory. It helps to imagine that the created symlink simply holds the text you provide for the ...


3

Read your man page: Question 1 = 1st Form, this is because in linux all items are considered files, even directories. As an example, use your text editor to "open" /etc/, ie: nano -w /etc/ nano will politely tell you /etc/ is a directory Since it's technically legal to create never ending symlinks. In the old days, before the bounds check was written, I ...


2

According to the guidelines of the Linux Filesystem Hierarchy: /var/cache Is intended for cached data from applications. Such data is locally generated as a result of time-consuming I/O or calculation. This data can generally be regenerated or be restored. Unlike /var/spool, files here can be deleted without data loss. This data remains ...


2

Question 1: Why does the whole path need to be written out for both files/folders for a soft link, while for a hard link we can leave out the filename for the target file? You don't need to specify the path or the filename for the soft link too, unless the target is in the current directory. For example, if you have a file ~/Downloads/target_file, you ...


1

When you create a hard link, the source path is used at the link creation time, so it must be a path relative to the current working directory (or an absolute path). When you create a symbolic link, the source path is treated as a string; it will be interpreted when the link is used, so it is relative to the directory where the link is. Considering your ...


1

In order to invoke a command by name, you need to put that symbolic link in one of the directories on the command search path. The environment variable PATH lists the directories in the command search path. The command in your question creates a symbolic link in the current directory, which is not useful. For system-wide commands not provided in a package, ...



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