is there any method which can restore data after removing from rm -rf cmd.
like
rm -rf a
how can we restore a
is there any method which can restore data after removing from rm -rf cmd.
like
rm -rf a
how can we restore a
Not a programming question, so I moved it.
And you can restore any file from your last backup, which I hope you've made & checked.
can you please tell the cmd to restore
Depends on what you do backups with, so best check with your (backup) administrator. If you don't have one, it's going to be nigh impossible to restore a file.
say a is just a text file i have deleted it using rm -rf
Now i have to restore it how to do that. I dont have backup admin
If it's not backed up, it's gone. With a huge load of luck one might get it back by searching the disk itself, but this is very time consuming (especially given todays disk sizes), and if there's been enough disk activity since the removal you won't get anything.
where to search in the disk
is there any cmd
There is:
strings /dev/<disk device>
However, this will not look for a file, but you'll have to check the output if there's some part of your file. And you'll see just about every other string currently saved on that disk. And some strings that really aren't.
One thing you'll have to learn: in UNIX, there is no undelete command, and no Recycle Bin/Trash. If you remove a file, it has consequences, and if you don't have a backup it has sometimes dire consequences.
no you cannot.
generally there are 2 things you can do...
Please consider using a command line tool called debugfs.
A deleted file is retriveable untill its not shreaded or zeroized (shread cmd :). its just the allocation table has unlinked the reference to the datablock on the disk.
Now , if you are lucky enough (if newer files have not acquired that data block) ; you might be able to retrive them.
Log into your system as a super user before you start the retrieval process. Look at its man pages too. Its simple enough to use. simple commands like ls, cp are supported and it gives you a prompt, you may use the help from there too.
Good Luck!!!!!!!!!!!!
