From 5c4c1bdbadb551c6b7866ad94c4f65fb6a63c11d Mon Sep 17 00:00:00 2001 From: bevilj Date: Sun, 18 Nov 2018 15:56:19 +0000 Subject: [PATCH] fs: add link page by @vivarn git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@249 a672b425-5310-4d7a-af5c-997e18724b81 --- site/pages/fs/ln.html | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 site/pages/fs/ln.html diff --git a/site/pages/fs/ln.html b/site/pages/fs/ln.html new file mode 100644 index 0000000..8e32998 --- /dev/null +++ b/site/pages/fs/ln.html @@ -0,0 +1,48 @@ +--- +layout: page +category-page: fs +category-title: FileSystem +tags: link symbolic hard file shortcut +author: Riccardo Antonio Vivanco +title: ln +--- + +The ln command is used to create a link of a file or directory. +A link is used to create multiple copies of a file in +different places without using more storage than that needed to store a single copy +of the given file.
+The copies are instead a link that points to the original file. If the original is deleted, +the copies will point to a non-existant file and become pointless.
+The name of the command stands for LiNk

+ +There are 2 kinds of links: hard and symbolic.
+ +In an hard link, the original is indistinguishable from the linked copy, and the changes +made to the file are the same, regardless of whether the modified file is the +original or the linked copy. Hard links are not used for directories. +ln creates hard links by default
+ +The symbolic link (symlink) instead contains the path to the original file and referencing the linked copy +will make the referencer point to the original file instead.
+ +
+ln [flags] [source1] [source2] ... [target_dir]
+ln [flags] [source] [target]
+link [source] [target]
+
+ +The link command can be used instead of ln, but flags and multiple +source files won't be supported.
+ +If multiple sources are supplied, the last parameter of the command must be a directory inside +which the links will be created. + +

Flags

+ +