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

Re: Howto recover deleted files/folders without comercial apps?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Håkon Alstadheim wrote:
> shampavman skrev:
>> If I were you , I would write a simple wrapper for rm.
>> Here is what I would do.
>> if rm or rm -r is encountered, create a local dir somewhere call it
>> 'Mytrash' then mv the files over there.. instead of from the machine...
>> Then run a cron perhaps every month to actually remove it .
>>
>> PS: Im assuming that your talking about accidentally removed files... If
>> not then I sorry .
>>   
> I've seen lots of places using an alias for rm called 'del', with a
> corresponding 'undel'. Check your system default .bashrc, it might
> already be available on your system by just removing a '#' character.
> Also check your standard package-search-mechanism for stuff to do with
> bash. Most likely these aliases already exist.

Just my humble opinion:

I don't like the concept of having some 'layer' between the user and the
rm command. It just adds complexity: remember to empty the wastebin,
remember where to copy the files from the wastebin in case it is lost.
Either adjust the backup script to ignore all wastebin files or have
files multiply backed up...

And it prevents the learning curve of thinking before issuing dangerous
commands...

Everyone makes mistakes now and then, but people should learn what 'rm'
means (and options like -rf and shell expansions like *). For disasters
there are backups. They should work simple and often and will help with
 other mishaps as well [1], not just erroneous typing...

Just my 2ct, everyone is free to adapt a concept that suits her/him
best, of course!

Johannes

[1] like hardware failure, software bugs, security incidents, plus many
more  kinds of accidents...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrYOaQACgkQC1NzPRl9qEUbkACeImSt3iuexfWHvRPvGFDMjQ6U
GmMAn3OGNj79Q7ZTTZg04WN2nj+Nms/g
=iaxu
-----END PGP SIGNATURE-----


Reply to: