Re: file recovery and format

2001-01-24 Thread hawk


> > Oh, well, that's one for the collective memory . . . and looking
> > at the man page for strings doesn't provide any hint that there
> > is a way to change what it considers a character.  I suppose
> > I should have written a script to get all 7 bit ascii characters . . .

> Try the command "tr" for example:

> tr -d :cntrl:

> or something similar.

Yes, but it's too late :(  I saved the output of strings to work with, and
went back to using hte computer . . .

hawk




Re: file recovery and format

2001-01-23 Thread Lars Gullik Bjønnes

"Garst R. Reese" <[EMAIL PROTECTED]> writes:

| > "Stupid is as stupid does"

| Well, I work with a lot of handicapped people (aren't we all?) and have
| become very aware of how a small deficit in hand-eye coordination or
| visual acuity can lead to disaster. Unix was not designed with these
| people in mind. It's general philosophy is "I'm the infallible
| programmer, do what I tell you, no questions asked."
| Rick, the stupid lawyer com bungling scientist, LyX contributor fell
| prey.
| Garst

My underlying point is that an command or any nonliving object for
that matter can not be stupid. User are stupid sysadmins are stupid.
And the stupidity is not aloway that they use "rm" wrong, but that
they has not created an alternative delete command (or whatever).

Lgb



Re: file recovery and format

2001-01-23 Thread hawk

garst gabbed,


> > | Neither idea addresses the simple fact that rm is plain stupid.

lars lamented,
> > "Stupid is as stupid does"

> > Lgb
> Well, I work with a lot of handicapped people (aren't we all?) and have
> become very aware of how a small deficit in hand-eye coordination or
> visual acuity can lead to disaster. Unix was not designed with these
> people in mind. It's general philosophy is "I'm the infallible
> programmer, do what I tell you, no questions asked."

> Rick, the stupid lawyer com bungling scientist, LyX contributor fell
> prey.

shh, my students might hear :)

The really odd thing about the whole adventure is that it came from an
*extra* space, where I tend to have a problem with many keyboards
getting a space in the first place.

re: expansion

I'm aware of how * is expanded, but that's not what got me (that would
have been annoying at the time, but wouldn't have killed me). Is ~
expanded by the shell or the application?

re: what I got back

Andre noted that he recovers files the same way (yikes, I open this
doesn't happen to him *that* often :)  Though I"ve recovered 
enough thwacked partitions to have gotten good hat it [hint: do 
not *ever* run fdisk from drdos; it has a tendency to shift
the whole table . . .).

Anyway, I attached a zip drive, and used strings to get 
everything, for a total of about 40M on a 260M partition.  There
were certainly other lyx files around.  Why didn't I find anything?

As I'm going through what I recovered, I've noticed a couple of things:

1) The paper wasn't nearly as long as I thought :)  This was one of
those that fermented for months, and then came out in a long 
stream.  I have more work to do than I thought.

2)  The line breaks seem consistant with where lyx would place them. I 
get separate lines where math, emphasis, etc. would land.

3)  And as I write this message, I found the problem.  There 
isn't a single backslash in the 40 megs that strings produced . . .

Oh, well, that's one for the collective memory . . . and looking
at the man page for strings doesn't provide any hint that there
is a way to change what it considers a character.  I suppose
I should have written a script to get all 7 bit ascii characters . . .

rick, the stupid lawyer who was at least smart enough to get out of 
active practice :)





Re: file recovery and format

2001-01-23 Thread Garst R. Reese

"Lars Gullik Bjønnes" wrote:
> 
> "Garst R. Reese" <[EMAIL PROTECTED]> writes:
> 
> | John Weiss wrote:
> | >
> | > On Mon, Jan 22, 2001 at 04:46:03PM -0500, Lior Silberman wrote:
> | > >
> | > > You should alias rm to be 'rm -i'. This is possible on almost all shells.
> | >
> | > Wherever I can use GNU-fileutils, I alias rm to 'rm -v'.  This
> | > prevents one from having to confirm every single delete, while giving
> | > you feedback on what's going on and simultaneously slowing down the
> | > delete enought that you can abort a bad one.
> | >
> | Neither idea addresses the simple fact that rm is plain stupid.
> 
> "Stupid is as stupid does"
> 
> Lgb
Well, I work with a lot of handicapped people (aren't we all?) and have
become very aware of how a small deficit in hand-eye coordination or
visual acuity can lead to disaster. Unix was not designed with these
people in mind. It's general philosophy is "I'm the infallible
programmer, do what I tell you, no questions asked."
Rick, the stupid lawyer com bungling scientist, LyX contributor fell
prey.
Garst



Re: file recovery and format

2001-01-23 Thread Kayvan A. Sylvan

On Tue, Jan 23, 2001 at 10:20:08AM +0100, Lars Gullik Bjønnes wrote:
> Lior Silberman <[EMAIL PROTECTED]> writes:
> 
> | > Under unix-like OS, the * is expanded by the shell, not by the rm command,
> | > so the rm command never sees the *.  You'd have to hack the shell, not the
> | > rm command, and the question becomes, how do you do that consistently?  Do
> | > you specialcase for a command rm with one of the arguments being * ?
> | 
> | You should alias rm to be 'rm -i'. This is possible on almost all shells.
> 
> And this can be equally dangerous. If you assume that "rm" really is
> "rm -i" and to a "rm *" to select the files that should be deleted...
> (and this has happend in realy life one of the reasons I really abhore
> "rm -i")
> 
> Lgb

Truly, heed well Lars's words above.

You just need to be verrry verrry careful with random "rm"s (and do
backups).

The only real "solution" is to implement a "trash can" concept, where
"rm" really does not remove, but moves files to a temporary holding area
for later removal.

-- 
Kayvan A. Sylvan   | Proud husband of  | Father to my kids:
Sylvan Associates, Inc.| Laura Isabella Sylvan | Katherine Yelena
http://www.successlinks.com/kayvan | Reach your goals now! | Robin Gregory



Re: file recovery and format

2001-01-23 Thread Lars Gullik Bjønnes

"Garst R. Reese" <[EMAIL PROTECTED]> writes:

| John Weiss wrote:
| > 
| > On Mon, Jan 22, 2001 at 04:46:03PM -0500, Lior Silberman wrote:
| > >
| > > You should alias rm to be 'rm -i'. This is possible on almost all shells.
| > 
| > Wherever I can use GNU-fileutils, I alias rm to 'rm -v'.  This
| > prevents one from having to confirm every single delete, while giving
| > you feedback on what's going on and simultaneously slowing down the
| > delete enought that you can abort a bad one.
| > 
| Neither idea addresses the simple fact that rm is plain stupid.

"Stupid is as stupid does"

Lgb










Re: file recovery and format

2001-01-23 Thread Lars Gullik Bjønnes

Lior Silberman <[EMAIL PROTECTED]> writes:

| > Under unix-like OS, the * is expanded by the shell, not by the rm command,
| > so the rm command never sees the *.  You'd have to hack the shell, not the
| > rm command, and the question becomes, how do you do that consistently?  Do
| > you specialcase for a command rm with one of the arguments being * ?
| 
| You should alias rm to be 'rm -i'. This is possible on almost all shells.

And this can be equally dangerous. If you assume that "rm" really is
"rm -i" and to a "rm *" to select the files that should be deleted...
(and this has happend in realy life one of the reasons I really abhore
"rm -i")

Lgb



Re: file recovery and format

2001-01-22 Thread Garst R. Reese

John Weiss wrote:
> 
> On Mon, Jan 22, 2001 at 04:46:03PM -0500, Lior Silberman wrote:
> >
> > You should alias rm to be 'rm -i'. This is possible on almost all shells.
> 
> Wherever I can use GNU-fileutils, I alias rm to 'rm -v'.  This
> prevents one from having to confirm every single delete, while giving
> you feedback on what's going on and simultaneously slowing down the
> delete enought that you can abort a bad one.
> 
Neither idea addresses the simple fact that rm is plain stupid.
Garst



Re: file recovery and format

2001-01-22 Thread John Weiss

On Mon, Jan 22, 2001 at 04:46:03PM -0500, Lior Silberman wrote:
> 
> You should alias rm to be 'rm -i'. This is possible on almost all shells.

Wherever I can use GNU-fileutils, I alias rm to 'rm -v'.  This
prevents one from having to confirm every single delete, while giving
you feedback on what's going on and simultaneously slowing down the
delete enought that you can abort a bad one.

-- 
John Weiss

"Not through coersion.  Not by force.  But by compassion.  By
affection.  And, a small fish."  -His Holiness, the 14th Dalai Lama 



Re: file recovery and format

2001-01-22 Thread Lior Silberman


On Mon, 22 Jan 2001, Eric J. Schwertfeger wrote:

> On Mon, 22 Jan 2001, Garst R. Reese wrote:
> 
> > "Richard E. Hawkins" wrote:
> > > 
> > > Several months ago, in one of those tragic typing accidents, I
> > > inserted a space into "rm -r *~" on my laptop.  I ceased using it
> > Can't help you, but this is an obvious stupidity in rm.
> > rm -r [asterisk] ~ makes no sense. I think rm should be modified to
> > strip blanks after an *.
> 
> Under unix-like OS, the * is expanded by the shell, not by the rm command,
> so the rm command never sees the *.  You'd have to hack the shell, not the
> rm command, and the question becomes, how do you do that consistently?  Do
> you specialcase for a command rm with one of the arguments being * ?
> 
> 

You should alias rm to be 'rm -i'. This is possible on almost all shells.

Lior.




Re: file recovery and format

2001-01-22 Thread Eric J. Schwertfeger

On Mon, 22 Jan 2001, Garst R. Reese wrote:

> "Richard E. Hawkins" wrote:
> > 
> > Several months ago, in one of those tragic typing accidents, I
> > inserted a space into "rm -r *~" on my laptop.  I ceased using it
> Can't help you, but this is an obvious stupidity in rm.
> rm -r [asterisk] ~ makes no sense. I think rm should be modified to
> strip blanks after an *.

Under unix-like OS, the * is expanded by the shell, not by the rm command,
so the rm command never sees the *.  You'd have to hack the shell, not the
rm command, and the question becomes, how do you do that consistently?  Do
you specialcase for a command rm with one of the arguments being * ?




Re: file recovery and format

2001-01-22 Thread Garst R. Reese

"Richard E. Hawkins" wrote:
> 
> Several months ago, in one of those tragic typing accidents, I
> inserted a space into "rm -r *~" on my laptop.  I ceased using it
Can't help you, but this is an obvious stupidity in rm.
rm -r [asterisk] ~ makes no sense. I think rm should be modified to
strip blanks after an *. Granted you might want something like rm -r a*
b*, but even that is
dangerous. There already exists a routine in fileutils to
strip_trailing_slashes,
I think strip_trailing_blanks_from_asterisks would be a good thing.
But it seems that fileutils may have problems with file names containing
blanks also. This would be OT for LyX except that LyX does not provide a
delete file option, so users are stuck with rm.
Garst



file recovery and format

2001-01-22 Thread Richard E. Hawkins


Several months ago, in one of those tragic typing accidents, I 
inserted a space into "rm -r *~" on my laptop.  I ceased using it 
immediately, and eventually used dd and strings to strip
the hard drive, hoping to recover a half-written paper.

Nothing *should* have been written to the hard disk after the 
castrophe, but I am finding two plain text versions, and no lyx files
of the paper.  The end of the longer paper may or may not be
truncated by a postscript file.

I suppose I could go ahead with just this, but does anyone have any
suggestions?  It seems to me that I *should* have a full dump of
any ascii, but I'm just not finding the lyx files--or *any* lyx
files, for that matter.  

  grep -i "This..ile" xa* | grep -i creat

comes back with three hits, none of which are what I"m after.

rick