就像在windows下创建两个点以上的文件无法删除一样,linux下也可以有同样的技巧:

[root@localhost ~]# touch test/.immutable
[root@localhost ~]# chattr +i test/.immutable
[root@localhost ~]# chattr +i test/
[root@localhost ~]# mkdir test/foobar
mkdir: cannot create directory `test/foobar': Permission denied
[root@localhost ~]# touch test/barfoo
touch: cannot touch `test/barfoo': Permission denied

 

相关文章:

  • 2021-11-14
  • 2021-04-08
  • 2021-12-26
  • 2021-10-13
  • 2021-12-26
  • 2022-12-23
  • 2021-12-30
猜你喜欢
  • 2021-11-24
  • 2021-11-09
  • 2022-02-17
  • 2021-12-13
  • 2021-10-15
  • 2021-11-18
  • 2021-11-26
相关资源
相似解决方案