[KLUG Members] help for longtime (but novice) user who finally managed to misuse rm...?

Bruce Smith bruce at armintl.com
Mon Jul 11 20:56:16 EDT 2005


> Thanks again for your patience.  To sum up:  I am looking for a way to 
> find out what files I accidentally erased, using JFS tools presumably. 

I would NOT use JFS tools on an ext3 partition!  
You may end up destroying the entire partition!

>   I tried the rescuecd but again there are "superblock" problems, and 
> again that means nothing to me.

JFS tools are expecting to find an JFS partition.  They will get real
confused if there is some other filesystem on the partition that it
doesn't understand.  Any "recovery" operation that involves writing to
an ext3 partition with a JFS tool will most likely destroy EVERYTHING!

> I thought the point of a journaling file system was (at least partly) to 
> make it easy to see what has happened to files?!

Nope, journals are meant to keep filesystems stable during events like
abrupt power outages.  A "stable" filesystem does not even guarantee
that all the files will be as you expect them after a power outage, just
the filesystem will be mountable and the files not being used during the
outage should be OK.  (as opposed to trashing everything)

It also eliminates needs for LONG filesystem checks after a power outage
(which can take hours on large filesystems).

Journals are internal to the system and not for human consumption to
"see what happened to the files".

And Journals provide NO protection against user mistakes.  It assumes
that if you tell it to remove a file, that you mean it, and it's gone.
Use file managers with "trash folders" to prevent that kind of thing.

> > Thanks everyone for the suggestions.  I do keep backups of my key files, 
> > but I don't back up /everything/--for example my 50G of mp3s from my CD 
> > collection.  It just costs too much to have that redundant (especially 
> > since they're redundant in my CD's already, so to speak).  

It's a time vs. money thing, and something only you can decide.

You can buy a 200-300 GB drive for about $100 these days.  So backing up
50GB of data costs $25 or less.  If you'd rather spend the time ripping
all the CD's again, as opposed to spending $25, then you made the right
decision.  Depends on how much you consider your time to be worth.

Back to your original problem of finding out what files used to be on
the system before you accidentally removed some of them, one other thing
comes to mind:

Redhat usually installs a program called "locate".  It keeps a list of
all files in a database somewhere.  It may be possible to read that
database somehow (never checked into it).  

But, depending on when this happened, you may be too late.  I think
locate runs a cron job nightly that rebuilds the database, so the
information you seek may be lost.  (no idea if it keeps any history, 
but I doubt it)

 - BS




More information about the Members mailing list