# Protect Specified Folder on Linux
## chattr
Just type the following command to protect your folder or file `$path` from being removed by command `rm` or `sudo rm -rf`.
```bash
chattr -R +i $path
```