Advertisement
mmaruseacph2

RM by mistake solved

Jan 27th, 2012
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. # MM: don't delete files, move them to /tmp and let a reboot delete them. Use
  2. # rrm to do the actual remove.
  3. do_rm ()
  4. {
  5.     DELDIR='/tmp/deleted_files'
  6.     [ -d $DELDIR ] || mkdir -p $DELDIR
  7.     mv $@ $DELDIR
  8. }
  9. alias rm='do_rm'
  10. alias rrm='/bin/rm'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement