To create a symbolic link in Unix, at the Unix prompt, enter the following command:
ln -s source_file myfile
Replace source_file with the name of the existing file for which you want to create the symbolic link (this file can be any existing file or directory across the file systems). Replace myfile with the name of the symbolic link. The ln command then creates the symbolic link. After you've made the symbolic link, you can perform an operation on or execute myfile, just as you could with the source_file. You can use normal file management commands (e.g., cp, rm) on the symbolic link.
Note: If you delete the source file or move it to a different location, your symbolic file will not function properly. You should either delete or move it. If you try to use it for other purposes (e.g., if you try to edit or execute it), the system will send a "file nonexistent" message.
本文详细介绍了符号链接的概念,它是如何与目标文件关联而不包含其实际数据的。文章还讲解了如何在Unix系统中创建符号链接,并提供了操作命令示例。
1041

被折叠的 条评论
为什么被折叠?



