Linux Command - ln soft and hard links connected

Linux command

ln command can generate soft links and hard links, symbolic links can also be called entities and links. Interested in-depth understanding can be found in the relevant documentation, the general reader can only remember the following points:

1. whether it is soft or hard links will not link additional disk space (though the reality may be taking up a Block)
2. soft link will take an inode, and hard links do not take inode (want to get to the bottom of the can itself Check out, do not get to the bottom of the can directly skip)
3. hard links can not cross file system, you can not link directories (soft links can be drawn is possible).

I believe that by explaining the example above, you should be able to identify themselves in a manner which link which case it is selected.

bash ### ###
# Common command options
# default hard links
-s # soft link
-f # if the target file exists, then remove the direct creation (dangerous)

# Next day when you want to remove soft links bbb
# as long as the knock following command
rm -f bbb

# Do not knock on effect the following commands, so will aaa inside the 10 files deleted
rm -rf bbb / use of soft connection, use absolute paths, if you want to use the route, the number of connections may appear too many mistakes,

Guess you like

Origin www.linuxidc.com/Linux/2019-09/160773.htm