NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: possible new feature: unrm ?



Yes, it's possible to move to ~/.Trash or something -- but now you need to write ever-increasingly-complicated scripts to e.g. unrm a directory tree.

I agree that backups are necessary, but who hasn't had a corrupted backup?  And it's much less convenient.  With disks so big these days, a 'shadow filesystem' seems most logical to me.

Heck, if you think about it, this is precisely what VCSs like git or subversion do -- they give you 'infinite undelete'.  I'm just saying, gee, isn't that a grand idea --- shouldn't we do that for ALL files, by default?


On Wed, Jul 1, 2020 at 2:42 AM Ottavio Caruso <ottavio2006-usenet2012%yahoo.com@localhost> wrote:
On Wed, 1 Jul 2020 at 01:18, Michael Cheponis
<michael.cheponis%gmail.com@localhost> wrote:
>
> Have you ever done this:
>
> $ rm good-stuff
> $ echo oh noooooo\!
>
> because good-stuff is in the bitbucket of no return.
>
> unrm exists as a shell script: http://freshmeat.sourceforge.net/projects/unrm
>
> But, as the commenter says, it would be great to restore filenames and directories.
>
> TOPS-20 had this nifty feature where it would keep all versions of deleted files until one did an EXPUNGE.
>
> The idea would be to keep a 'duplicate' copy of the filesystem data for deleted files, as well -- a kind of shadow filesystem.
>
> If the filesystem was getting full, it could delete the oldest files in the 'shadow' to make room.
>
> So I'm proposing that "rm" move files to the shadow FS, and some other command or switch to rm to really remove them(e.g. temp files).
>
>

I can't actually get to download that script. I used to have a script
that moved the file to ~/Trash and then aliased that to rm. Or just:

alias rm='rm -i'

--
Ottavio Caruso


Home | Main Index | Thread Index | Old Index