LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2009, 10:06 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Rep: Reputation: 32
How to restore a deleted directory?


Terrible, I just used rm -rf to delete a folder.

How can I restore it?
 
Old 09-16-2009, 10:11 AM   #2
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
There are recovery tools, but the first step is to turn off your computer!

Then boot from a live-cd and mount the drive READ ONLY.
 
Old 09-16-2009, 12:19 PM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
This solution seems quite complecate.

I haven't delete the original folder but mein own. I don't htink I have to mount the live-cd again.
 
Old 09-16-2009, 12:19 PM   #4
ddaemonunics
Member
 
Registered: May 2008
Location: Romania
Distribution: Debian
Posts: 242

Rep: Reputation: 41
restore from backup ...

try http://www.cgsecurity.org/wiki/PhotoRec
 
Old 09-16-2009, 12:44 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,073

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Quote:
Originally Posted by thomas2004ch View Post
I haven't delete the original folder but mein own.
I have no idea what does that mean.

But every second that you continue using your drive mounted with write permissions you risk the old info being overwritten, and when that happens, there's no chance for recovery at all.

Being that said, you could use debugfs with its internal ls -d instruction to find the deleted files, but debugfs is *dangerous* unless you know what you are doing.
 
Old 09-16-2009, 12:56 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,297

Rep: Reputation: 126Reputation: 126
Assuming that what you are trying to say is that you had a copy of another directory and you deleted that copy, then it's a simple issue of copying that original directory again.
 
Old 09-17-2009, 07:05 AM   #7
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
Sorry for misunderstanding. Here again:

I created a folder which contains sub-folders which contain files. Oversightly I deleted the folder. There is no copy or backup. Now I want to restore or recover it.
 
Old 09-17-2009, 07:22 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
As said before, shutdown the system and use Photorec or similar tools using the Live Cd. Photorec is available as tool built inside Trinity Rescue Kit.
Why you need to shutdown the system and not use it is already quite clearly explained.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restore deleted "/etc/init.d" directory. Pimmy Debian 17 06-04-2008 10:21 AM
Restore deleted files Winanjaya Linux - Newbie 5 01-09-2007 01:23 AM
How can I restore a deleted /etc directory from installation disks? mikecoates Linux - Software 4 03-28-2006 04:31 AM
How to restore a deleted file satimis Linux - Newbie 1 09-12-2003 04:18 AM
how to restore deleted files ? ilyes Linux - General 3 08-01-2003 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:13 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration