Operating System - HP-UX
1833157 Members
3095 Online
110051 Solutions
New Discussion

accidentially delete files!

 
aajk
Occasional Contributor

accidentially delete files!

Hi there, Would anyone tell me if I can recover the deleted files without backup before?
Thanks a lot!!

wil
7 REPLIES 7
Thierry Poels_1
Honored Contributor

Re: accidentially delete files!

hi,
this is tricky business on a multiuser system.
There is shareware/freeware around for undeleting files, but there is a mega-chance that the file location is already overwritten!
good luck anyway,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Ravi_8
Honored Contributor

Re: accidentially delete files!

no, u can't since in multiuser mode once the files are deleted the inode will be acquired by some one
never give up
Printaporn_1
Esteemed Contributor

Re: accidentially delete files!

Hi,

w/o special software HP-UX doesn't have undelete feature.
enjoy any little thing in my life
Stefan Schulz
Honored Contributor

Re: accidentially delete files!

Standard HP-UX has no procedure to back up files befor deleting them. You can look for 3rd party software which is available. Or you can do it yourselfe like defining an alias for rm which backs up the files before deleting them.

Do a search on this forum, you will find several threads about "undelete".

Hope this helps. Stefan
No Mouse found. System halted. Press Mousebutton to continue.
R. Allan Hicks
Trusted Contributor

Re: accidentially delete files!

As the other respondents have said, the best way is not to delete them. Having been bitten before, I've created a command alias for rm that is 'rm -i'. So I have at least one chance before they are deleted. Since it is an alias, I don't have to remeber to use the interactive form.

Sorry, I know that this isn't much help after the fact, but UNIX has never been known as a user friendly system. It is however, becoming more user tolerant.

-Allan
"Only he who attempts the absurd is capable of achieving the impossible
Mark Vollmers
Esteemed Contributor

Re: accidentially delete files!

Hi-

Like the others said, once it's gone, it's gone. Unless if you were really lucky and deleted it using the trash can on the CDE. This puts the file away somewhere where it has to be removed (shreaded). For the future, you can either run a backup (highly recommended!) or change the rm command to move the file to a temp folder for later deletion. there was a thread on how to do this a while ago. It's a good idea to do something. It's really easy to delete a file by accident.

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

Re: accidentially delete files!

In HPUX, if you delete a file, it thinks that you really meant to do that, it is just following your directions.

If it was a system file, it may be possible to reinstall the package.

You did not specify what files were deleted.

I always do a ls on the files I want to delete, this way you see what it will delete before you do it.

And, yes, I have had to restore files from backup. Only once from a mistake I made (I had to learn the hard way myself), several times from mistakes by others.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com