How to create Hard Link in Linux
Hello,
I do not understand the following lines
Code:
linux: / usr / lib / openoffice / share / fonts # ln-v-d / usr/X11R6/lib/X11/fonts/TT /
create hard link `. / dd 'to` / usr/X11R6/lib/X11/fonts/TT'
Ln: creating hard link `. / Dd 'to `/ usr/X11R6/lib/X11/fonts/TT ': Operation not permitted
linux: / usr / lib / openoffice / share / fonts #
How can i make a hard link to that directory? Also what exact is the work of a hard link in linux. Thank you for your help.
Re: How to create Hard Link in Linux
A hard link is a directory entry that references the same inode as another directory entry (only working in the same file system). One should therefore avoid very sparingly and use only with good reason. If possible you should SymLinks favor, because hard links are difficult to understand something as symlinks, and are also not all programs be supported and you may want / would imagine it. Absolutely common for the uninitiated copy (not!) way, is something like:
Code:
chown root.root / home/user1/.profile
ln / home/user1/.profile / home/user2/.profile
ln / home/user1/.profile / home/user3/.profile
... (For all users)
This is all well all user profiles a par "(what the user personally, but not good and perhaps not even find the meaning of. profile equivalent), but an outsiders' Admin occurs as rapidly in a faux pas when he says, local what to change, its change in a magical way (via hard link) globally to all user s impact. And it is particularly bad if the setting happens to a terminal and then you see nothing more )
Re: How to create Hard Link in Linux
See this
Code:
> Ln-v-d / usr/X11R6/lib/X11/fonts/TT /
And
ln [OPTION] ... OBJECTIVE [command name]
Directories to link hard. (Only super-user)
Re: How to create Hard Link in Linux
As far as I know, no Linux support (external) hard links to directories. With external I mean that you can not create, because ".." and "." are internal hard links in linux operating system. I guess i am correct here.
Re: How to create Hard Link in Linux
You can not create under Linux, because this can cause problems, unless you really know what you are doing. For example, you could try a sort of second ".." create, it could at cp and find or create what I know quite a mess. Cycles are quite conceivable (never tested, that is not even supported) Why it is now generally prohibited, is a good question, which confirm that the option already protected because they can only use root. That is probably a kernel issue, so time to ask in a corresponding mailing list.
Re: How to create Hard Link in Linux
A link to a file can not be separated from the original directory entry, changes to a file is actually independent of the name used to refer to a file. Hard links do not usually refers to directories and may span file systems.