Restore
adams
k7qo at commspeed.net
Thu Apr 19 16:33:43 UTC 2007
On Thu, 2007-04-19 at 11:00 -0500, Lokeey wrote:
> right...i just thought there was a way to restore from the command
> line as well. that's cool. i had a back up so i'm all good now!
>
> thanks!
>
The rm command does not save anything anywhere. That is why it is
called "remove". :-)
But there is a way to get around it, but it requires some effort on
the users part.
In in the home directory add alias rm="" to .bashrc and type that
in for the current shell on a command line with the prompt
and this does away with user typing rm on a command line to remove
a file. It becomes a null command.
Do a mkdir ~/trash on the command line to create a "trash bin".
Now the user must "mv file_name ~/trash" to get rid of it, but
it still exists. To really really delete a file you/they have
to type /bin/rm file_name and because it requires thinking
the user remembers that what they do will destroy the file.
I was thinking that maybe in .bashrc one could do something
like
alias rm="mv $1 ~/trash"
where $1 refers to the argument, but $1 is used in C-shell
scripting, and I am a novice when it comes to the bash shell.
I was using a beta copy on the day the Challenger incident (1984)
happened and found many many errors and hadn't been back to
it until recently since everyone seems to be using it now.
A quick google didn't get me the info needed to add the
argument for the command reference in the alias. And then
there is the issue of multiple file deletes....
Glad to hear you had a backup. That is what they are for and
every one should be doing frequent backups. We live in the
age of cheap cheap CD/DVDs.
FYI
>
More information about the kubuntu-users
mailing list