Ln (Unix) - Usage

Usage

The SUS mandates for ln two options: -f will force removal of existing files to allow the link to be created; and -s will create symbolic links. Therefore, ln with no options creates a hard link, ln -f forces a hard link, ln -s creates a symbolic link, and ln -fs forces a symbolic link. In order to link to a folder (vs. a file), use the -n option so that the symbolic link is not dereferenced:

ln -sfn existing/folder new/folder/alias

Other Unix and Unix-like operating systems may add extra options. GNU ln adds options such as -b to back up files before creating links, -v to print out the name of each file before links are created, and others. BSD ln adds -h, preventing ln from descending into targets whose symlinks point to directories

ln file_name link_name

would have the effect of creating a hard link called link_name that points to the same data as the existing file file_name.

Read more about this topic:  Ln (Unix)

Famous quotes containing the word usage:

    Girls who put out are tramps. Girls who don’t are ladies. This is, however, a rather archaic usage of the word. Should one of you boys happen upon a girl who doesn’t put out, do not jump to the conclusion that you have found a lady. What you have probably found is a lesbian.
    Fran Lebowitz (b. 1951)

    I am using it [the word ‘perceive’] here in such a way that to say of an object that it is perceived does not entail saying that it exists in any sense at all. And this is a perfectly correct and familiar usage of the word.
    —A.J. (Alfred Jules)

    ...Often the accurate answer to a usage question begins, “It depends.” And what it depends on most often is where you are, who you are, who your listeners or readers are, and what your purpose in speaking or writing is.
    Kenneth G. Wilson (b. 1923)