Symbolic links provides practical solutions file name or path related problems. Symbolic links will create same file or folder with different name and path. In some situations this may cause problem and we have to remove and delete symbolic link.

符号链接提供了实用的解决方案,文件名或路径相关的问题。 符号链接将使用不同的名称和路径创建相同的文件或文件夹。 在某些情况下,这可能会导致问题,我们必须删除和删除符号链接。

列出符号链接 (List Symbolic Links)

We can start by listing existing links especially symbolic links with ls command like below. Symbolic links provide some redirect to the source file like symbolic link RealInput.

我们可以通过如下所示的ls命令首先列出现有链接,尤其是符号链接。 符号链接提供了一些到源文件的重定向,例如符号链接RealInput

$ ls -lh

List Symbolic Links
列出符号链接

删除符号链接(Remove Symbolic Links)

There are different ways to remove symbolic link. We can just issue rm command to the link file. In this example we will remote link named RealInput .

有多种方法可以删除符号链接。 我们可以向链接文件发出rm命令。 在此示例中,我们将名为RealInput远程链接。

$ rm RealInput

使用unlink命令删除 (Remove with unlink Command)

As we use ln command which is shortcut for link we have also command named unlinkwhich can unlink given links. In this example we can remove RealInput like below. unlink command is an alias for rm command.

当我们使用ln命令(它是链接的快捷方式)时,我们还使用了名为unlink命令,该命令可以取消链接给定的链接。 在此示例中,我们可以删除RealInput如下所示。 unlink命令是rm命令的别名。

$ unlink RealInput

使用sudo删除符号链接以解决“权限被拒绝”错误 (Remove Symbolic Links with sudo for “Permission Denied” Error)

Some symbolic links may be created by privileged user like root . If we try to remove this links with regular or less privileged user we will get an error like permission denied . So in order to remove this symbolic links we need to provide sudo command at the beginning of the command like below.

一些符号链接可能由root用户等特权用户创建。 如果我们尝试删除普通用户或特权较少的用户的此链接,则会收到类似permission denied的错误。 因此,为了删除此符号链接,我们需要在命令的开头提供sudo命令,如下所示。

$ sudo rm RealInput

删除硬链接 (Remove Hard Links)

We can easily remove hard links with the same commands too.

我们也可以使用相同的命令轻松删除硬链接。

$ unlink RealInput

OR

要么

$ rm RealInput
.uadf5b8db2f8636950ca1052038ff38fa , .uadf5b8db2f8636950ca1052038ff38fa .postImageUrl , .uadf5b8db2f8636950ca1052038ff38fa .centered-text-area { min-height: 80px; position: relative; } .uadf5b8db2f8636950ca1052038ff38fa , .uadf5b8db2f8636950ca1052038ff38fa:hover , .uadf5b8db2f8636950ca1052038ff38fa:visited , .uadf5b8db2f8636950ca1052038ff38fa:active { border:0!important; } .uadf5b8db2f8636950ca1052038ff38fa .clearfix:after { content: ""; display: table; clear: both; } .uadf5b8db2f8636950ca1052038ff38fa { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .uadf5b8db2f8636950ca1052038ff38fa:active , .uadf5b8db2f8636950ca1052038ff38fa:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .uadf5b8db2f8636950ca1052038ff38fa .centered-text-area { width: 100%; position: relative; } .uadf5b8db2f8636950ca1052038ff38fa .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .uadf5b8db2f8636950ca1052038ff38fa .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .uadf5b8db2f8636950ca1052038ff38fa .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .uadf5b8db2f8636950ca1052038ff38fa:hover .ctaButton { background-color: #E67E22!important; } .uadf5b8db2f8636950ca1052038ff38fa .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .uadf5b8db2f8636950ca1052038ff38fa .uadf5b8db2f8636950ca1052038ff38fa-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .uadf5b8db2f8636950ca1052038ff38fa:after { content: ""; display: block; clear: both; }

LEARN MORE  What Does "rm -rf" Command Do In Linux?

.uadf5b8db2f8636950ca1052038ff38fa , .uadf5b8db2f8636950ca1052038ff38fa .postImageUrl , .uadf5b8db2f8636950ca1052038ff38fa .centered-text-area { min-height: 80px; position: relative; } .uadf5b8db2f8636950ca1052038ff38fa , .uadf5b8db2f8636950ca1052038ff38fa:hover , .uadf5b8db2f8636950ca1052038ff38fa:visited , .uadf5b8db2f8636950ca1052038ff38fa:active { border:0!important; } .uadf5b8db2f8636950ca1052038ff38fa .clearfix:after { content: ""; display: table; clear: both; } .uadf5b8db2f8636950ca1052038ff38fa { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .uadf5b8db2f8636950ca1052038ff38fa:active , .uadf5b8db2f8636950ca1052038ff38fa:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .uadf5b8db2f8636950ca1052038ff38fa .centered-text-area { width: 100%; position: relative; } .uadf5b8db2f8636950ca1052038ff38fa .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .uadf5b8db2f8636950ca1052038ff38fa .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .uadf5b8db2f8636950ca1052038ff38fa .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .uadf5b8db2f8636950ca1052038ff38fa:hover .ctaButton { background-color: #E67E22!important; } .uadf5b8db2f8636950ca1052038ff38fa .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .uadf5b8db2f8636950ca1052038ff38fa .uadf5b8db2f8636950ca1052038ff38fa-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .uadf5b8db2f8636950ca1052038ff38fa:after { content: ""; display: block; clear: both; }

了解更多信息“ rm -rf”命令在Linux中做什么?

翻译自: https://www.poftut.com/remove-symbolic-links-linux/

如何在Linux中删除符号链接?相关推荐

  1. linux建立文件的符号链接,如何在Linux中创建符号链接[完整指南]

    Linux中的符号链接是什么,为什么使用它? 符号链接(也称为符号链接或软链接)是一种特殊类型的文件,它只是指向另一个文件或目录,就像Windows中的快捷方式一样,创建符号链接就像为实际文件创建别名 ...

  2. linux 命令行删除分区,如何在 Linux 中删除分区

    管理分区是一件严肃的事情,尤其是当你不得不删除它们时.我发现自己经常这样做,特别是在使用 U 盘作为实时磁盘和 Linux 安装程序之后,因为它们创建了几个我以后不需要的分区. 在本教程中,我将告诉你 ...

  3. groupdel 删除组_如何在Linux中删除组– groupdel命令

    groupdel 删除组 Linux groupdel command is used to delete a group. This is a very powerful command, so u ...

  4. linux 怎么删除大文件,如何在Linux中删除超大的(100-200GB)文件

    平日,要在 Linux 终端删除一个文件,我们应用 rm 敕令(删除文件).shred 敕令(安然删除文件).wipe 敕令(安然擦除文件)或者 secure-deletion 对象包(一个安然文件删 ...

  5. rm如何在Linux中删除一个大文件

    rm -rf命令是删除文件夹及其内容最快的方式之一. 仅仅一丁点的敲错或无知都可能导致不可恢复的系统崩坏. 下列是一些rm 命令的选项: rm 命令在Linux下通常用来删除文件. rm -r 命令递 ...

  6. 删除非空目录linux_如何在Linux中删除空的非空目录

    删除非空目录linux Linux file system consist of directories. A system administrator generally work with dir ...

  7. linux删除0字节的文件,如何在linux中删除许多0字节的文件?

    I've a directory with many number of 0 byte files in it. I can't even see the files when I use the l ...

  8. linux怎样删目录,删除如何在Linux中删除目录

    如何在Linux中删除目弽 有几种方法可以用来删除linux中的目弽.您可以从桌面环境中以图形方式处理它,也可以直接从命令行执行该操作.无论哪种方式都可行,而且它们都同样有效. 在Linux中删除目录 ...

  9. linux中设置环境变量_如何在Linux中设置环境变量

    linux中设置环境变量 Wondering how to set environment variables in Linux? This is exactly what we'll be doin ...

  10. linux disk 清除数据,如何在Linux中使用TestDisk恢复已删除的文件

    我们都知道寻找文件而不是找到文件的感觉,即使是在垃圾桶里也是如此. 由于TestDisk ,文件和数据丢失带来的创伤应该结束 - 这是一个免费的开源软件,最初设计用于恢复内存分区并使不可引导的磁盘再次 ...

最新文章

  1. linux 查询wwid命令,linux肿么查看硬盘的wwid
  2. RxJava 中的map与flatMap
  3. 大厂的 404 页面都长啥样?最后一个绝了...
  4. linux内核网络接收数据流程图【转】
  5. 蓝桥杯2015初赛试题
  6. 百度云观测优化建议解决方案:未设置max-age或expires
  7. mysql load 占位符_Mysql占位符插入
  8. spss相关性分析看结果_spss相关性分析
  9. selenium java项目_1)selenium+ java集成,待深度项目流程应用
  10. Android 使用传感器
  11. win10快捷键启动屏幕保护程序
  12. 切图工具:又一个处理大图的例子
  13. 摄影测量(tip1):空间前方交会与空间后方交会
  14. 微信如何直接下载apk,实现微信点击超链接自动下载APP
  15. python中add方法_python中add函数怎么用
  16. Fiddler之自动修改数据包(Free HTTP插件)
  17. BI 报表工具如何与 springBoot 框架集成
  18. 几种公共图床Python调用
  19. IL2CPP 构建大小优化
  20. Jmeter参数化的四种方式

热门文章

  1. 容器监控工具cAdvisor
  2. 墙裂推荐6款实用办公软件!超级好用!
  3. php里无法找到该网页,thinkphp搭建网站后端,入口文件找不到(无法加载)
  4. jsmind结合php,thinkCMF5与jsMind实现文章Mind版
  5. matlab计算方差和平均值,matlab求平均值和方差
  6. 调试笔记:BSOD 0xA
  7. 抖音推荐算法详细拆解
  8. 什么是PoE交换机?PoE交换机与PoE+交换机的区别!
  9. 创业者怎样才能赚到钱?八种最有效创业赢利模式
  10. LabVIEW软件、驱动安装及编程方法(理论篇—2)