Guest

RM by mistake solved

By: mmaruseacph2 on Jan 27th, 2012  |  syntax: Bash  |  size: 0.25 KB  |  hits: 214  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  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'