What's that folder named <lost+found> all about?

Filemanagers, partitioning tools, etc.
Post Reply
Message
Author
User avatar
benny7440
Posts: 440
Joined: Mon 20 Apr 2009, 04:23

What's that folder named <lost+found> all about?

#1 Post by benny7440 »

...think I was trying to install/upgrade a flash plugin & install a more recent version of FF when something that I cannot remember what it was. The result was that many files got unrecognized (the icons 'changed' & some ended up as a triangular yellow shape that even refused to be moved, accessed or deleted).

I'm right now using PL431 from a live cd & looking at that folder within a CFCard. My regular OS is PL511 frugally installed. but soon might change for PL525.

I've been seeing this folder (lost+found) for quite a long time now but never got interested in looking at it or even think of it. Today I stumbled upon it again & checked its properties & found it's quite big: 45 MB, has another folder inside it & 31 files.

My formal question is, what's the purpose of this folder?

Thinking of it more slowly, can I recover valuable info/files from there? How?

Thanks in advanced!
Attachments
lost+found_doubt.png
(60.43 KiB) Downloaded 784 times

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#2 Post by 2byte »

http://www.tldp.org/LDP/Linux-Filesyste ... found.html
Linux should always go through a proper shutdown. Sometimes your system might crash or a power failure might take the machine down. Either way, at the next boot, a lengthy filesystem check (the speed of this check is dependent on the type of filesystem that you actually use. ie. ext3 is faster than ext2 because it is a journalled filesystem) using fsck will be done. Fsck will go through the system and try to recover any corrupt files that it finds. The result of this recovery operation will be placed in this directory. The files recovered are not likely to be complete or make much sense but there always is a chance that something worthwhile is recovered. Each partition has its own lost+found directory. If you find files in there, try to move them back to their original location.


User avatar
`f00
Posts: 807
Joined: Thu 06 Nov 2008, 19:13
Location: the Western Reserve

#3 Post by `f00 »

Happens most often on 2fs savefiles and/or cranky non-standard reboot/poweroff setups (or power-cuts during storms). Once I had the contents of /usr/share and a few other bits end up in the Lost+found.

A recent full backup is your best friend (or the pretty much incorruptable livedisc multisession which has no Lost+found), journaled 3fs is less likely to suffer I hear.

You can while away some time trying to figure it out and may even have some success (empty depathed dirs are typical but sometimes things look familiar, date-times and other props can be helpful). Some of it may be transitory and those can just be scrubbed outright (sockets that may have been in use, etc).

Personally I simply clean it all out when the pup is working relatively well (or put it in cold storage), that way I notice when things are 'off'.

45Mb? That'd be a big hit on a 48Mb or even 64Mb savefile (small usually works nicely for me).

User avatar
benny7440
Posts: 440
Joined: Mon 20 Apr 2009, 04:23

#4 Post by benny7440 »

Thanks, 'foo, for responding!

At the moment those files were put there I was running completely in RAM, so no pupsave files were around. Now, my pupsave files are 768 MB in PL511 & 512 MB in PL431.

I was about to try now that fsck command/program pointing to the partition where it's located & wait for it to stop/finish for posting the results but found out that I'm testing the latest Seamonkey downloaded version (2.1, I think) & it's located right there. Since this's a new command to be tried by me & have read that's safest to run it on an unmounted partition, I'll post this last sentence now &, later (hopefully), I'll post the outcome of it.

Post Reply