I just figured out how symlinks work and boy am I impressed. It just made my coding a hell of alot easier. I just created symlinks from each 'site' here at my test server and keep one folder with the function files in it. Before, I had seperated each sites functions even though they all used the same ones.
Symlinks are shortcuts, basically. I still don't know the different between a hard link and a symbolic link though...
2014 is going to be a good year. More content, more streamlining. Be a part of history!
There are two concepts of `link' in Unix, usually called hard link and soft link. A hard link is just a name
for a file. (And a file can have several names. It is deleted from disk only when the last name is removed.
The number of names is given by ls(1). There is no such thing as an `original' name: all names have the same
status. Usually, but not necessarily, all names of a file are found in the filesystem that also contains its
A soft link (or symbolic link, or symlink) is an entirely different animal: it is a small special file that
contains a pathname. Thus, soft links can point at files on different filesystems (possibly NFS mounted from
different machines), and need not point to actually existing files. When accessed (with the open(2) or stat(2)
system calls), a reference to a symlink is replaced by the operating system kernel with a reference to the file
named by the path name. (However, with rm(1) and unlink(2) the link itself is removed, not the file it points
to. There are special system calls lstat(2) and readlink(2) that read the status of a symlink and the filename
it points to. For various other system calls there is some uncertainty and variation between operating systems
as to whether the operation acts on the symlink itself, or on the file pointed to.)
ln makes links between files. By default, it makes hard links; with the -s option, it makes symbolic (or
If only one file is given, it links that file into the current directory, that is, creates a link to that file
in the current directory, with name equal to (the last component of) the name of that file. (This is a GNU
extension.) Otherwise, if the last argument names an existing directory, ln will create links to each men-
tioned source file in that directory, with a name equal to (the last component of) the name of that source
file. (But see the description of the --no-dereference option below.) Otherwise, if only two files are given,
it creates a link named dest to the file source. It is an error if the last argument is not a directory and
more than two files are given.
By default, ln does not remove existing files or existing symbolic links. (Thus, it can be used for locking
purposes: it will succeed only if dest did not exist already.) But it can be forced to do so with the option
On existing implementations, if it is at all possible to make a hard link to a directory, this may be done by
the superuser only. POSIX forbids the system call link(2) and the utility ln to make hard links to directories
(but does not forbid hard links to cross filesystem boundaries).