in reply to [OT] undo rm command ??
rm REMOVES files. There is no attention paid to recovery. Yes, you can sometimes forensically recover files that have been removed, but it is extremely unwise to rely on such recovery -- it's more fragile than you might imagine.
The better solution is this:
$ chown root:wheel /bin/rm $ chmod 0550 /bin/rm $ echo mv $* $HOME/.rmTrash/ >/usr/local/bin/rm.safe $ chown root:users /usr/local/bin/rm.safe $ chmod 0555 /usr/local/bin/rm.safe $ for dir in /home/*; mkdir $dir/.rmTrash > echo alias rm=rm.safe >> $dir/.aliases ; done
Then only root and the people in the wheel group can use the "real" rm, the rest will use the "safer" version. If you can't trust people in wheel, then you have bigger problems.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: [OT] undo rm command ??
by Anonymous Monk on Apr 20, 2010 at 14:08 UTC |