Tag Info

New answers tagged

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 ...


0

How about: $ cd /Users/niels/something $ ln -s ./foo ~/bin/foo_link


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 ...


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

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

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, ...


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 ...


0

Make the replacement file /baz/bar.txt while the filesystem is NOT mounted. When /baz gets it's additional filesystem, this file will be below it and when the mounted filesystem has bar.txt, this will seem to replace the other file of below...



Top 50 recent answers are included