Backup is always necessary, on a regular base. IMO linux already is a lot safer for a user than other OS’s. But you hit a command with all permissions, no way back. I know where you are now, been there. So from now on, backup, as if your life depends on it.
The only solution I can think of, is that you boot from a Live-CD, then get back here, so that we can see if there’s anything left on the drive.
There is trash-cli in the lxde repo http://download.opensuse.org/repositories/X11:/lxde/ not sure but going on the site trash-cli - Project Hosting on Google Code it looks similar to libtrash libtrash - a trash can for GNU/Linux (Manuel Arriaga) but having never played with trash-cli I can’t conclusively say it is like for like.
> Is there any software which can recover the deleted directories or the
> whole deleted system?
sure…restore from backup can easily be a single command…
> We are human beings and each makes mistakes everyday. That’s normal.
yes, i understand being human and the possibility of making a
mistakes…i make many every day…
but, here we are not dealing with a mistake, but a LONG series of
mistakes which ended with the final mistake; a keystoke on the ‘Enter’
key–after the user:
-failed to learn the basics of operating the computer system correctly
-failed to establish a backup regime
-failed to test that backup regime can recover from accidents/mistakes
-failed to use the interactive switch when using remove
-failed to not use the force switch when inappropriate
-failed to not use the recursive when inappropriate
-failed to first use ls to see if the command rf is safe to use
-failed to verify the directions came from a reliable/trusted source
-failed to visually check the command typed was exactly as directed
and i guess some others i can’t think of this second…oh,
-elected to use a fully grown up, industrial strength operating system
without training wheels and then decided (instead of exercising the
needed caution and attention to detail) to treat it like a game system
and to experiment, mess with, play with and etc…
This may or may not help you.
Data Recovery and File Undelete freeware for Linux files
Data recover is a major art. You really need to understands how things work down at the hardware level.
Files are not stored in continuous strips but are store in chunks and one file may be spread over many areas of the disk. These chunks are linked together by pointers. Your erasure basically more or less removed the pointers. So it is very hard to piece together these chunks again. The data is still there just scrambled. Luckily you did not use an option that would have total shredded the data. But it is still a major project to recover the data. Like putting an egg back in it’s shell
So how much is the data worth to you. I mean if the data has your plans for solving the energy crisis it may have more worth then a bunch of mp3’s. There are commercial data recover people if you have the money to spend and the data is worth it.
In the mean time do not do anything with the disk until you have run the recovery software or hired a recovery specialist. Any changes you make will just make things worse.
-----BEGIN PGP SIGNED MESSAGE-----
WHAT??? please, for the next time, better read the man pages
before you type
No in elenath hîlar nan hâd gîn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
Well I didn’t delete anything in my disk. Actually I did experiment what I want to try or what I didn’t know but learned somewhere in virtual machines to lower the risk. I’m just wondering why we don’t have such a command to recover all deleted files, directories or a system.
Anyway, thanks for all your advices!
wow… common sense isn’t quite so common…
Next time try looking at the man page or --help before using a command.
didn’t they have a shell jail for this a while back? I think it was a global alias or something.
Ever hear of entropy? Erasing causes loss of information. The reason you have recovery in GUI’s is that generally they do not erase but copy the files to a holding area (trash). You can then recover by simply copying the files back from the holding area. But if you empty the trash the files are truly erased just like you did to the entire file system.The actual data is still there but it no longer has the pointers that are needed to define what piece of data goes with what. That information is lost, entropy increases. As much as you would like it is very hard to put the egg back into it’s shell.