Linux 上某个文件 root 的权限 只有 write 和 read,请问怎么删除

2019 年 2 月 2 日
 WhyAreYouSoSad

如题,我怎么删都删不掉,也没提示任何信息。

7059 次点击
所在节点    程序员
76 条回复
deemoe
2019 年 2 月 2 日
是 root 的话应该可以随便改文件权限的吧?
season4675
2019 年 2 月 2 日
你 ls -l 让我们看看 dwr 权限怎么样的啊,还有你怎么删的,是右键鼠标删的还是 rm -f 甚至 sudo rm -f ?? 说清楚呀
WhyAreYouSoSad
2019 年 2 月 2 日
@season4675 sudo -s rm -f
ThirdFlame
2019 年 2 月 2 日
如果你是 root 那么可以删掉。
如果你不是 root 请 su 到 root,或者 sudo 删。如果你还不能 su 或者 sudo 那么你肯定删不掉。
WhyAreYouSoSad
2019 年 2 月 2 日
-rw -r --r-- 1 root root 18754 Feb 1 10:07 index
我想删了这个 index.lock 的文件
WhyAreYouSoSad
2019 年 2 月 2 日
@season4675 ls -l 信息在 5l
msg7086
2019 年 2 月 2 日
whoami ?
WhyAreYouSoSad
2019 年 2 月 2 日
谢谢各位,已经删除了。
可是我做错了,请问要怎么把这个文件恢复回来,Trash 里面找不到了。。。。
msdlisper
2019 年 2 月 2 日
...优秀
ETiV
2019 年 2 月 2 日
这就是为什么 WhyAreYouSoSad ……
Cyron
2019 年 2 月 2 日
哈哈哈哈
wwqgtxx
2019 年 2 月 2 日
rm 删掉的文件并不会进 trash
newmind
2019 年 2 月 2 日
看逗了
xiexingjia
2019 年 2 月 2 日
su - jeffdean -c "rm index.lock"
Kirscheis
2019 年 2 月 2 日
您想笑死我
dorothyREN
2019 年 2 月 2 日
@WhyAreYouSoSad 终端登录木有 trash
cakegg
2019 年 2 月 2 日
谢谢,我真的被楼主逗笑了...
leoleoasd
2019 年 2 月 2 日
chmod -i?
kokutou
2019 年 2 月 2 日
...666
nailuoGG
2019 年 2 月 2 日
😂️这是试试看能不能删的意思吗

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/532601

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX