Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-19-2011, 04:04 PM   #1
LQ Newbie
Registered: Dec 2010
Posts: 3

Rep: Reputation: 0
File/folder recovery


I have just accidentally deleted some files and a folder.Is there anyway I can recover them.

Kind regards
Old 02-19-2011, 05:35 PM   #2
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Recovery depends on a few factors:
0. Filesystem type. Journalling filesystems do not just unlink like VFAT and Ext2 did, they're way more efficient making recovery harder.
1. Time of incident. The longer the space a deleted file has occupied is left that way the less chance for recovery there will be.
2. Disk activity. The amount of writing to a partition varies. Some see relatively few (/boot, /usr), some more (temp dirs) and some are written to continuously (like /var). The more a partition gets written to the higher the chance unallocated space gets reallocated.
These three together should give an indication.

Procedure-wise the first thing to do is make sure the partition is mounted read-only. Then allocate space to write to. This can be another partition, another harddisk or external media. Never write to the partition to recover from. Making a copy of the partition the deleted file is on using 'dd' makes it easy to transport it to others who may be able to help you and makes it easier to use other tools on other platforms if you so decide.

The most-used tool still is Photorec. Here's a link to how to use Photorec: Note there is no guarantee the files can be recovered at all, in full or be usable.

Whatever you do you must guard against further deterioration. So before doing anything else remount partitions read-only. If unsure just shut down the system now, then ask questions, then work on it.


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
[SOLVED] How to make a recovery partition windows like of my root folder[ubuntu] silvyus_06 Linux - Newbie 14 01-04-2011 03:53 PM
Folder gone missing on HD with all files in it! Recovery possible? kayasaman Linux - General 5 05-04-2010 10:16 AM
save web page results in a file and a folder. Whats the folder for? geeyathink General 2 01-30-2008 07:57 AM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 03:26 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:47 AM.

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