Skip to content

Instantly share code, notes, and snippets.

@ma6174
Created December 11, 2013 04:55
Show Gist options
  • Save ma6174/7905261 to your computer and use it in GitHub Desktop.
Save ma6174/7905261 to your computer and use it in GitHub Desktop.
安全“删除”文件
#!/bin/bash
# rm有风险,先将文件移动到/tmp/目录,在关机之前文件文件还是存在的,重启后才删除
mv -f $* /tmp/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment