safe rm (linux command)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
public ver1 Nov 9, 2018
tests sample test Nov 10, 2018
.gitignore sample test Nov 10, 2018
LICENSE Create LICENSE Nov 9, 2018


SFRM (safe rm) is a preprocessor that checks every command you type on terminal and makes sure that you can not delete anything with the rm command easily.



preexec - a default feature of zsh ( and ksh ) shell to do something you specify before every command you typed run. More about preexe go here.


# Pull down our file from GitHub and write it to our home directory as a hidden file.
curl -o ~/
# Add its source to the tail of shell config
cat ~/ >> ~/.zshrc
source ~/.zshrc


The number of printout questions can be set by $SFRM_MAX env. By default three questions will be printout.


Supported shell(s)

  • zsh
  • bash