Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by tonydba
at 2024-04-06 12:41:42
Point:500 Replies:7 POST_ID:828912USER_ID:11812
Topic:
Linux;;
What are the advantages of symbolic link?
Author: tonydba replied at 2024-04-08 09:33:16
yes understood.
Accepted Solution
Expert: omarfarid replied at 2024-04-06 20:02:35
500 points EXCELLENT
You can not link files or folders across servers. For that you may use NFS.
You may create NFS share on one server and mount it on the other server.
For links there are two types of links:
hard link and soft link
Hard link can be used for:
- having a different name for the fie (not dir, not possible) in the same dir or different dir but has to be within the same file system
- have more than one link for the same file which a way to protect against deletion by mistake
- if the file is moved or renamed then still you can reach it via other name
- have different name for the same tool so it function differently when run by different names. If not mistaken vi, ed are examples of such use
- can be used to have shorter path to the same file
soft link can be used for
- having a different name for the fie or dir in the same dir or different dir and can be across different file systems
- soft links will not protect files or folders from deletion.
- If the original file or dir is move or renamed then the link is not valid
- have different name for the same tool so it function differently when run by different names.
- can be used to have shorter path to the same file or dir
You can not differentiate between hard links to the same file since they are identical in everything except the name.
hard links have the same inode number and hence can find which file names in a file system belong to same file by searching file by inode number.
Soft links are special files that contains the path to the original file. If the original file or dir is moved or renamed then the soft link is not valid
You may create NFS share on one server and mount it on the other server.
For links there are two types of links:
hard link and soft link
Hard link can be used for:
- having a different name for the fie (not dir, not possible) in the same dir or different dir but has to be within the same file system
- have more than one link for the same file which a way to protect against deletion by mistake
- if the file is moved or renamed then still you can reach it via other name
- have different name for the same tool so it function differently when run by different names. If not mistaken vi, ed are examples of such use
- can be used to have shorter path to the same file
soft link can be used for
- having a different name for the fie or dir in the same dir or different dir and can be across different file systems
- soft links will not protect files or folders from deletion.
- If the original file or dir is move or renamed then the link is not valid
- have different name for the same tool so it function differently when run by different names.
- can be used to have shorter path to the same file or dir
You can not differentiate between hard links to the same file since they are identical in everything except the name.
hard links have the same inode number and hence can find which file names in a file system belong to same file by searching file by inode number.
Soft links are special files that contains the path to the original file. If the original file or dir is moved or renamed then the soft link is not valid
Expert: Tintin replied at 2024-04-06 17:01:47
Symbolic links are useful for all sorts of things.
A good example is when you have different versions of software installed. A symbolic link makes it very easy to swap between versions without having to change paths.
Say you have the following:
/usr/software-1.04-b1
/usr/software-1.05-b1
Then you can create a symbolic link /usr/software to point to whichever version of the software you want active.
That way, you just need /usr/software in your PATH, rather than having to manually update the PATH whenever the software version and path changes.
A good example is when you have different versions of software installed. A symbolic link makes it very easy to swap between versions without having to change paths.
Say you have the following:
/usr/software-1.04-b1
/usr/software-1.05-b1
Then you can create a symbolic link /usr/software to point to whichever version of the software you want active.
That way, you just need /usr/software in your PATH, rather than having to manually update the PATH whenever the software version and path changes.
Author: tonydba replied at 2024-04-06 14:40:54
what command I have to link in another server..?
How will know that a particular file is linked..
How will know that a particular file is linked..
Expert: duncanb7 replied at 2024-04-06 14:09:15
when you type or more or vim or vi or edit one.txt that will read /mnt/source/ted.txt
and one.txt is just a link point to /mnt/source/ted.txt from all linux command
and one.txt is just a link point to /mnt/source/ted.txt from all linux command
Author: tonydba replied at 2024-04-06 14:03:22
for example
/mnt/source
what will happen after a soft link is created.
ln -s /mnt/source/ted.txt one.txt
/mnt/source
what will happen after a soft link is created.
ln -s /mnt/source/ted.txt one.txt
Expert: duncanb7 replied at 2024-04-06 12:48:27
If you have old database or file on your server, you need to remove to some other NEW location.
But some older user just know the old location. And it is hard to tell all user
your file location is moved to NEW , so just your link to point to new location in the old location so that the users doesn't need to know the exact path of the new file location
and they can read all files at New location (even they don't know the file is moved to NEW)
The site explain more
http://en.wikipedia.org/wiki/Symbolic_link
The site is how to make a link
http://www.cyberciti.biz/faq/unix-creating-symbolic-link-ln-command/
Duncan
But some older user just know the old location. And it is hard to tell all user
your file location is moved to NEW , so just your link to point to new location in the old location so that the users doesn't need to know the exact path of the new file location
and they can read all files at New location (even they don't know the file is moved to NEW)
The site explain more
http://en.wikipedia.org/wiki/Symbolic_link
The site is how to make a link
http://www.cyberciti.biz/faq/unix-creating-symbolic-link-ln-command/
Duncan