undelete directory
Alex Satrapa
grail at goldweb.com.au
Thu Oct 31 16:37:58 EST 2002
Antti.Roppola at brs.gov.au wrote:
> Would it be sensible to change the behaviour of delete
> to not unlink the file but move it into a cache?
I'm not sure what all this means, but you might take a look at this:
http://groups.google.com/groups?hl=en&lr=&ie=ISO-8859-1&q=undelete&btnG=Google+Search&meta=group%3Dcomp.sources.misc
I don't know if that code is Linux-compatible (judging from the age, I'd
guess not). AFAIK, it's only a replacement for the shell "rm" command -
thus no use to Samba and friends.
Users of Macintosh computers are in luck though - it's the desktop OS
that manages the Trash. IIRC, depending on whether you use netatalk or
Dave or Mac OS X's built-in SMB support, the trash will appear in
.Trash, .Network\ Trash or /.Trashes or even ./._.Trashes.
> For example, I used to have a trashcan app that cycled
> through 7 daily trashcans, giving me a week's grace.
Back in the Good Old Days of Mac OS 7, there was a utility called
"TrashMan" which would delete files from the Trash after a set period of
time. So all that would be in the Trash would be files that were
trashed sometime in the last 7 days, for example.
> On a side not, I once discovered a "deleted" directory
> months after the fact. Someone had used a GUI to drop it
> deep into some forgotten corner of the filesystem.
All the more reason to be careful about permissions - have the sysadmin
set up directories inside read-only directories, so they can't be moved ;)
And although I don't (yet) follow my own advice - don't forget backups!
Alex
More information about the linux
mailing list