Skip to content

b1f6c1c4/protect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

protect a folder from accidental rm -rf

Threat Status
rm -rf Protected
find . -delete Protected
sudo rm -rf NOT Protected
chmod -R 777 && rm -rf NOT Protected
dd if=/dev/zero of=/dev/sda NOT Protected
Gun shot into your disk NOT Protected

Usage

  • To protect a folder against accidental rm -rf:

    protect <folder>...
  • To stop protecting a folder:

    protect --disarm <folder>...

Compatability

  • git
  • docker

Install

# We recommand using https://github.com/b1f6c1c4/git-get
#     ... to download the script
# rua install git-get
git get -o ~/.local/bin/ b1f6c1c4/protect -- protect

Dependency

  • POSIX sh