LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 04-25-2015, 02:10 PM   #1
dmae
LQ Newbie
 
Registered: Apr 2015
Posts: 4

Rep: Reputation: Disabled
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

Last edited by dmae; 04-25-2015 at 02:47 PM. Reason: adding information
 
Old 04-25-2015, 03:44 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
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!
 
Old 04-25-2015, 04:12 PM   #3
dmae
LQ Newbie
 
Registered: Apr 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
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...
 
Old 04-25-2015, 04:46 PM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

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

Especially:
https://wiki.archlinux.org/index.php...ry#Extundelete
 
1 members found this post helpful.
Old 04-25-2015, 05:05 PM   #5
dmae
LQ Newbie
 
Registered: Apr 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you for this link, i'll try tomorrow and after that, maybe mark this post as solved
 
Old 04-25-2015, 05:47 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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 "
 
Old 04-25-2015, 10:22 PM   #7
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You may not be able to do perfect recovery.
 
Old 04-26-2015, 05:40 AM   #8
dmae
LQ Newbie
 
Registered: Apr 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by John VV View Post
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
 
Old 04-26-2015, 06:02 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
you can try live cd, but I think (obviously) you need to reinstall that system
 
Old 04-26-2015, 05:15 PM   #10
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
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)
 
Old 04-27-2015, 06:56 AM   #11
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering Deleted files brew1brew Mandriva 6 12-24-2005 01:21 PM
Recovering deleted files?? DaFrEQ Linux - General 8 09-17-2005 12:28 PM
recovering deleted files saipraveen Linux - Newbie 1 06-16-2005 11:00 AM
recovering deleted files hamish Linux - Newbie 2 10-04-2004 05:51 PM
Recovering Deleted Files Brian of Gep Linux - Newbie 1 03-02-2004 02:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration