Created
April 23, 2015 12:30
-
-
Save yoggy/a2f0ff6c4eb401038a1f to your computer and use it in GitHub Desktop.
chattr +iって、たまに設定されてると忘れていて焦るよね…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ touch hoge | |
| $ ls -al hoge | |
| -rw-rw-r-- 1 yoggy yoggy 0 Apr 23 21:27 hoge | |
| $ lsattr hoge | |
| -------------e-- hoge | |
| $ sudo chattr +i hoge | |
| $ lsattr hoge | |
| ----i--------e-- hoge | |
| $ rm -rf hoge | |
| rm: cannot remove 'hoge': Operation not permitted | |
| $ sudo rm -rf hoge | |
| rm: cannot remove 'hoge': Operation not permitted | |
| $ sudo chattr -i hoge | |
| $ lsattr hoge | |
| -------------e-- hoge | |
| $ rm hoge | |
| $ ls -al hoge | |
| ls: cannot access hoge: No such file or directory | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment