## XFS file recovery

Open discussion on or around SGI; software/hardware related posts should go in the appropriate subforum.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
Posts: 14
Joined: Wed Oct 15, 2003 4:18 am
Location: Washington State, USA
Contact:

### XFS file recovery

Are there any programs that any of you know of to recover files that you accidentally removed with the rm command?

I could'a sworn I typed "rm .*" to rm all the preferences from a users dirrectory. But... somehow it deleted serveral folders in there too.. which didn't begin with . This isn't like a life or death thing... but I put a lot of work into those files.

I've come accross a few things for linux, nothing for IRIX though. I don't have a compiler for my IRIX machines, so I can't compile anything myself.

I have an Octane and an Origin 200, on the Origin 200 I accidentally deleted the contents of 5 hard drives (4 9GB's and a 4Gb) who's filesystem was extended accross all of them, not in a raid.

dexter1
Moderator
Posts: 2206
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands
You are sad out of luck. There is a slight chance of recovery if you immediately disconnect the mountpoints and extract the disks after shutdown, and sending them to a datarecovery company.
You really don't want to mess around with XFS. It's journalling i know, so maybe there is a neat trick to roll back the journal, but this requires very skilled knowledge of XFS, which almost nobody has.

akimmet
Donor
Posts: 289
Joined: Sun Feb 09, 2003 10:39 am
Location: Middle Of Nowhere, OH, US
That and typing rm .* is a bad thing, because unix considers the current directory is called . and by calling .* rm is also picking up everything in your current directory (eg. YourImportantStuff is being picked up as ./YourImportantStuff). This effect can also run away and nuke your whole disk, because the previous directory is denoted as .. which is also included in the wildcard you entered.

This happens to alot of users who are use to the GNU fileutils rm (the one included with most Linux distros), because it has built-in safeguards for such a situation and quietly only removes what the user probably expected and not everything your username has the permissions to delete...

Embarrassing, as it is to admit I once fell for this one too, so don’t feel that badly.

dexter1
Moderator
Posts: 2206
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands
I am sensing a "me too" thread

"Me too"

Lost my home directory once that way with the exact same command "rm .*" , had to backup everything from an older tape

Posts: 14
Joined: Wed Oct 15, 2003 4:18 am
Location: Washington State, USA
Contact:
Thanks very much for the help though.

Fresh starts can always be kind of nice.

I did want to put some bigger harddrives in that Origin, and was trying to think of a way to easily transfer the files (since all of the drive bays are full). I guess that problem is solved!

Also I learned new and... exciting... things about IRIX's rm command...

cvisors
Moderator
Posts: 179
Joined: Fri Jan 31, 2003 2:50 am
Location: Melbourne Australia
Contact:
Your not the only one who has done this, I did it to my website root the other day. lucky I had a backup, it was old but it was a backup.

Benjamin
one you lock the target
two you bait the line
three you slowly spread the net
and four you catch the man

akimmet
Donor
Posts: 289
Joined: Sun Feb 09, 2003 10:39 am
Location: Middle Of Nowhere, OH, US
Even though this has trapped many people, I do still believe that the way it is done in GNU rm is wrong...

It should do exactly what the command was instructed to do (even if the user was in error), instead of quietly doing something else.

Perhapse replacing the non-standard behavior with a warning would be more apropriate. Instead of letting users get away with doing something incorrect, then having that incorrect habit bite them in the ass when it is least expected.

RageX
Donor
Posts: 490
Joined: Wed Feb 05, 2003 5:32 pm
Location: New York
Safegard against user error with some sensible aliases.

Code: Select all

alias del '/usr/bin/rm -i'alias rm 'mv !* ~/dumpster'alias mt '/usr/lib/desktop/telldesktop "empty dumpster"'

If you really mean it you can always /usr/bin/rm

dexter1
Moderator
Posts: 2206
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands
RageX wrote:If you really mean it you can always /usr/bin/rm

Or \rm