info
-
lncreates links between files -
ln option target linkname
-
lncreates a link to filetarget -
with the name
linkname -
lncreateshard linksby default -
-sor--symbolicfor symbolic links
-
demo
-
create file and link
# create a file `a` $ echo "hello" > a # create `hard link` # called `b` to `a` $ ln a b # create `soft link` # called `c` to `a` $ ln -s a c -
printing the contents
$ cat a hello $ cat b hello $ cat c hello -
remove file
a$ rm a -
printing the contents again
$ cat a cat: a: No such file or directory $ cat b a $ cat c cat: c: No such file or directory