V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
adminharlem
V2EX  ›  macOS

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

  •  
  •   adminharlem · Nov 11, 2018 · 3902 views
    This topic created in 2729 days ago, the information mentioned may be changed or developed.
    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 replies    2019-10-09 03:40:43 +08:00
    nicevar
        1
    nicevar  
       Nov 11, 2018   ❤️ 1
    有 root 权限不代表能删除一切文件,你了解一下 chattr
    bao3
        2
    bao3  
       Nov 11, 2018 via iPhone   ❤️ 1
    接楼上, 楼主还可以研究一下 chflags,文件能不能删除不只是用户权限哦
    vitalis
        3
    vitalis  
       Nov 14, 2018
    one more thing,看看 rm 是否被 alias 了。。。
    adminharlem
        4
    adminharlem  
    OP
       Oct 9, 2019
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   922 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 23:23 · PVG 07:23 · LAX 16:23 · JFK 19:23
    ♥ Do have faith in what you're doing.