Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
obviously i want to recover deleted files on my linux distro, but in an other way than all the tutorials and suggestions i found,
reversing the action of the rm command keeping file types filenames and directory structure
i did:
sudo rm -rf /*
not what i really would to be done but happened this way
so in the right order i deleted
/boot
/bin
/etc
and started to delete /dev but here i stopped the process by pressing Ctrl+C (saw somme errors on screen)
i don't remember anymore if there were other files between those directories...
the filesystem partition tables are okay
i'd appreciate a little help ! Thank's
PS : Tried testdisk, outtrack easyrecovery, photorec and others, some just restore photos, txt, pdf, others could not restore directories but see them
Last edited by dmae; 04-25-2015 at 02:47 PM.
Reason: adding information
You can restore by using the backup you created. You did backup your system, right?
May I suggest that you learn to read the 'man command' to insure that you understand what will be going on when you press 'Return/Enter'. You could always do a re-install of your Gnu/Linux if you made no backups. You really should consider this mode since it would be easier to restore the system files that were deleted.
Quote:
Just a few links to aid you to gaining some understanding;
every and i do mean EVERYTHING stats
DO NOT !!! do this
Code:
sudo rm -rf /*
it is a normal RUNNING JOKE that is played on new people DO NOT EVER !!! DO THAT !!!
use photorec and a few other tools in the links above in post 2
do not expect a too much
running that command basically put you
" UP bleeped( censored) creek without a paddle "
i did that not because someone told me. I meant to delete a directory in /, after a day of fight against my site on localhost and ssl still not working (i generated my own certs) i was tired...
tried photorec and some others as i mentionned on my first post, they don't do what i want
i don't expect to much,
the only useful tool i might use is extundelete from arch linux wiki,
actually i'm thinking how i would use it because i can use this tool only from another linux installed already which i don't have, but i have some space on the hdd and i can make a fresh install and then hard copy from the old broken system with recovered files and directories to the new...
in all cases i save my home directory and all config files i might find useful
thanks
Last edited by dmae; 04-26-2015 at 05:55 AM.
Reason: not a joke edit
For the future: if you're using a SSD you could start using nilfs2 as filesystem! (btw., you didn't mention the filesystem you're using, right?)
nilfs2 does one full snapshot (called "checkpoint" until you don't make it as unmovable-"snapshot") of your full filesystem at least once every ~minute => you can restore any file you delete/modify/overwrite.
(inofficial-nilfs-promoter)
Just a heads up, things like photorec will do an excellent job recovering files, including partial files; however also it will not name them their original file name, because this may not be possible, it instead creates a best guess and says "this is a JPEG photo ..." and gives it a generic name.
Like others have said you'll need to re-install. But any data you lost, you can try to recover using the various file recovery techniques. That's about the best you can expect here and really you'll need to re-install to get back to a working system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.