LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   another post about recovering deleted files yet (https://www.linuxquestions.org/questions/linux-general-1/another-post-about-recovering-deleted-files-yet-4175540732/)

dmae 04-25-2015 02:10 PM

another post about recovering deleted files yet
 
well hello dudes,

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

onebuck 04-25-2015 03:44 PM

Member response
 
Hi,

Welcome to LQ!

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;



1
Linux Documentation Project
2
Rute Tutorial & Exposition
3
Linux Command Guide
4
Bash Beginners Guide
5
Bash Reference Manual
6
Advanced Bash-Scripting Guide
7
Linux Newbie Admin Guide
8
LinuxSelfHelp
9
Ultimate Linux Newbie Guide
10
Linux Home Networking
11
Virtualization- Top 10

The above links and others can be found at '
Slackware-Links'. More than just SlackwareŽ links!


dmae 04-25-2015 04:12 PM

no i didn't backup my system,

just wondered if there were a easier way to restore my files by setting the right value in file headers on the hard drive recursively,

i already prepared a live-usb of my arch and ready to re-install...

Head_on_a_Stick 04-25-2015 04:46 PM

A few options here:
https://wiki.archlinux.org/index.php/File_recovery

Especially:
https://wiki.archlinux.org/index.php...ry#Extundelete

dmae 04-25-2015 05:05 PM

Thank you for this link, i'll try tomorrow and after that, maybe mark this post as solved

John VV 04-25-2015 05:47 PM

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 "

veerain 04-25-2015 10:22 PM

You may not be able to do perfect recovery.

dmae 04-26-2015 05:40 AM

Quote:

Originally Posted by John VV (Post 5353082)
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

pan64 04-26-2015 06:02 AM

you can try live cd, but I think (obviously) you need to reinstall that system

Pearlseattle 04-26-2015 05:15 PM

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)

rtmistler 04-27-2015 06:56 AM

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.


All times are GMT -5. The time now is 09:31 AM.