You are not logged in.
Pages: 1
I had my lesson. Wrong command has destroyed enitre system. Shame to admit, I wanted to clean pkg folder from installation files after an update. I navigated into this folder, opened Terminal via Dolphin and typed "rm -rf /*". Needlessly to say... everything within couple of seconds disappeared. Lesson learned.
So I reinstalled arch. However, all files on other partitions became unavailable. I sorted fstab, I have physical access to these partitions, "properties" does show that several GBs is taken. However, files are not there! It is even a greater surprise, cause terminal on freshly reinstalled system somehow "remembers" the very last command that anihilated arch.
Here is my fstab:
# <file system> <dir> <type> <options> <dump> <pass>
# UUID=d9240d67-6aa9-43e5-85ab-e3474f488f1f
/dev/sda1 / ext4 rw,relatime,data=ordered 0 1
# UUID=34149f9c-4454-4bb0-bba1-0b627f882c37
/dev/sda2 /home ext4 defaults 0 0
# UUID=3968e6af-9bf0-4f86-8330-cf1097d4e3e5
/dev/sda4 /media ext4 defaults 0 0Any other "live" system does not "see" files too. I do not worry much about sda4, cause I have a backup on external hard drive. But sda2 is the one that matters.
Any advice highly appreciated. Thank you
Last edited by ad4ms3 (2018-05-06 07:33:59)
Offline
Did you interrupt the rm command or let it finish? If "terminal" remembers the command history, then that means that you shell history file is probably intact. Depending upon how you ran the rm command, it might be under /root or /home/<user>.
Have you tried using a terminal (instead of a GUI file manager) to see if the files are there in you $HOME or not? If the files are really deleted, you still might be able to recover some/most of them depending on how much data has been written to the /dev/sda2 partition after the incident. Give photorec a try for recovery.
Offline
Unbelievable! Photorec recovered documents, photos, pdfs and other things I forgot about their existence! They were years old. How was that possible if disk partitions were changed several times throughout laptops life? This 250GB partitions did not exist long time ago, but photos were recovered. How recovery tool managed to restore something that should not be restored (files were written to this partition many times, paritions were changing, etc)?
But it did not recover my daughters' leoCAD projects.....
Last edited by ad4ms3 (2018-05-06 22:49:48)
Offline
Unless you are doing a destructive, low-level format then most 'formatting' consists of overwritten file descriptors. Still, that is pretty incredible! Congrats on recovering your data. I could never be so lucky. ![]()
Last edited by c00ter (2018-05-06 18:39:04)
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn
Offline
It recovered almost 700 000 (yes, seven hundred thousands) files! Most of it was a usless junk (some txt, h and class files) but also it showed how much rubbish web browser saves without our knowledge. I dare to think what will happen when I touch 600GB partition. I let it run overnight ![]()
Offline
It isn't fixed until you remedy for future problems. Create an alias:
rm='rm -I --preserve-root'Offline
Better yet, use trash-cli and send your deleted files to the XDG standard Trash directory, from where it can be restored if you quickly decide it was a bad idea
or emptied later on.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Perfect, thank you all for your advices;) I will follow them. And will not not type anything insane in terminal:D
Arch is back waiting for my free time to set it up.
This time with xfce. Have already encountered Linux specific problems, but most of them solved thanks to wiki.
Offline
Pages: 1