Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS 下防止 rm -rf 误删 #39

Open
HuangXiZhou opened this issue May 3, 2018 · 0 comments
Open

MacOS 下防止 rm -rf 误删 #39

HuangXiZhou opened this issue May 3, 2018 · 0 comments
Labels

Comments

@HuangXiZhou
Copy link
Owner

在一次手快 rm -rf /* 之后,发现全完了...

ceeb653ely1fnfitptpevj20c80c7q3b

遂决定根除隐患,发现 mac 下有废纸篓的概念,可以对 rm 命令进行修改,将删除的文件放到废纸篓里。

  • 下载 trash 代替 rm -rf

    brew install trash
  • 别名替换 rm 命令,一劳永逸

    alias rm=trash

这样就可以在废纸篓里面寻回误删文件了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant