adminharlem
V2EX  ›  macOS

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

  •  
  •   adminharlem · Nov 11, 2018 · 3968 views
    This topic created in 2765 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   ·   2988 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 07:16 · PVG 15:16 · LAX 00:16 · JFK 03:16
    ♥ Do have faith in what you're doing.