我有一个重要目录的符号链接.我想摆脱那个符号链接,同时保持它背后的目录.
我试着rm回去rm: cannot remove 'foo'.
我试着rmdir然后回来rmdir: failed to remove 'foo': Directory not empty
然后继续前进rm -f,rm -rf然后sudo rm -rf
然后我去寻找我的备份.
有没有办法摆脱符号链接,而不是用洗澡水扔掉婴儿?
我想删除符号链接以及源目录.
例如 -
ls -lrt
testsymlink -> /user/temp/testdir
Run Code Online (Sandbox Code Playgroud)
我想删除testsymlink和/user/temp/testdir.考虑一下,我知道唯一的符号链接名称.
使用python的任何实用程序都会很棒.