1826217 Members
3127 Online
109691 Solutions
New Discussion

Re: undelete

 
Alex Gavi
New Member

undelete

I used to have an undelete utility in the past on my HPUX 9.x server. It worked sometimes depending on the state of the inode table. Does any one know if there is one still available for 11.xx?

Thanks
10 REPLIES 10
Patrick Wallek
Honored Contributor

Re: undelete

There is no undelete, at least none that I am aware of, on HP-UX 11. There may be some shareware type stuff out there somewhere, but there is nothing native to HP-UX.
Vincenzo Restuccia
Honored Contributor

Re: undelete

rm -i ... :)
boley janowski
Trusted Contributor

Re: undelete

doesn't the rm -i just ask you if you really want to remove something, if you set this as an alias for rm you might be a little safer but once its gone its gone?
Mark Vollmers
Esteemed Contributor

Re: undelete

Hi-

I thought that if you used the 'del' command, it would tuck the file somewhere (like a trash can on Windows) but then you had to remember to delete it from there. This doesn't work for rm, though. So I guess that the only "undo rm" type command would be "go get backup tape"

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
boley janowski
Trusted Contributor

Re: undelete

Vollmers,

I forgot, thats how i undo my bad rm's, of course not that i ever have any!!
Mike Nemeth
Advisor

Re: undelete

Well, I use is on my 10.20 system.
It only handle the last 15 deletions.
I have no Idea if it works with 11.
I've a unrm.sh file containing a binary and a man page.
The man page has the author's email
addy: rdg@fc.hp.com.
I remember geting it at some hp site but cannot find it now! I've attached
the shar file.
Mark Mitchell
Trusted Contributor

Re: undelete

You could set up a lv and make a script to move specified files there. Then go back and rm them later.
Davide Depaoli
Occasional Advisor

Re: undelete

Another idea is to replace or aliasing the rm command with the mv.
For example, using the Lost&Found directory as a "trash" or mkdir trash directory.

cp /bin/rm /bin/rm.orig
vi /bin/rm
*begin of script*
/bin/mv $1 /trash_dir
*end of script*

Remeber where is (for file restore) and monitor disk space for trash directory

hope this helps
regards Davide
Davide Depaoli
Occasional Advisor

Re: undelete

hoops.....mistake.......

mv /bin/rm /bin/rm.orig
Chris Calabrese
Valued Contributor

Re: undelete

Changing the system rm command doesn't seem like a really good idea. I think doing it as ksh alias in your own .profile might be a bit safer.

Also, the script should probably check if it's running interactively and just call rm if it's not.
Brainbench MVP for Unix Administration and Internet Security, SANS Review Editor, and Center for Internet Security HP-UX Benchmark project leader