V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
adminharlem
V2EX  ›  macOS

为啥在 root 权限用 rm -rf 都删无法删除?

  •  
  •   adminharlem · 2018-11-11 00:43:35 +08:00 · 3418 次点击
    这是一个创建于 1964 天前的主题,其中的信息可能已经有所发展或是发生改变。
    sh-3.2# rm -rf 501/
    rm: 501//11.vmwarevm: Directory not empty
    rm: 501/: Directory not empty
    sh-3.2# ls -l
    total 8
    drwxrwxrwx@ 1 _unknown _unknown 4096 11 11 00:18 501

    已经在废纸篓了,也无法清空。
    4 条回复    2019-10-09 03:40:43 +08:00
    nicevar
        1
    nicevar  
       2018-11-11 08:53:25 +08:00   ❤️ 1
    有 root 权限不代表能删除一切文件,你了解一下 chattr
    bao3
        2
    bao3  
       2018-11-11 09:14:50 +08:00 via iPhone   ❤️ 1
    接楼上, 楼主还可以研究一下 chflags,文件能不能删除不只是用户权限哦
    vitalis
        3
    vitalis  
       2018-11-14 18:21:26 +08:00
    one more thing,看看 rm 是否被 alias 了。。。
    adminharlem
        4
    adminharlem  
    OP
       2019-10-09 03:40:43 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3189 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:27 · PVG 20:27 · LAX 05:27 · JFK 08:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.