This would by necessity be a very platform-specific function, and one which is pretty useless these days, because it only works on ext2 and not on the more modern file systems such as ext3, ReiserFS, XFS, etc. I imagine that these days ext2 is only used on systems that have been in production a long time, or systems which depend on the minimal speed benefit it still enjoys over journaling filesystems. Such systems are unlikely to be handled by someone who is fumble-fingered enough to habitually delete the wrong file, and even then they would normally have backups. If you want to write a Perl wrapper for debugfs, go for it, but I don't imagine it'll get much use.
Anyway, solving this at the filesystem level is the wrong way IMO. If you have users you don't trust to take enough care when deleting, alias the rm command to something that moves files into a temporary directory. IIRC there are some free libraries about which let you do this transparently, so you don't need to mess with shell aliases. And above all, keep backups!
In reply to Re: [OT] undo rm command ??
by tirwhan
in thread [OT] undo rm command ??
by kulls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |