logoalt Hacker News

What is the purpose of the lost+found folder in Linux and Unix? (2014)

62 pointsby toshlast Friday at 8:08 AM28 commentsview on HN

Comments

pmontratoday at 6:10 PM

I had a lost+found folder in all Unix file systems I used since the 80s. It's where fsck places files that it found during a scan and can't figure out to which directory they belong. Sometimes I found stuff in there.

From what I googled XFS, Btrfs and ZFS don't use lost+found. It's a thing of the old not journaled filesystems and of the ext family.

show 2 replies
JdeBPtoday at 6:52 PM

I have a book on my bookshelf, Eric Foxley's Unix for Super-Users. It was published in 1985, and it answers this question on page 52, the first page listed for the entry 'lost+found' in its index.

This is surely not the earliest book mention, is it? (It'll be in earlier man pages, of course.) Google Books does not give me an earlier one, although it does yield another 1985 book.

Fun fact: Foxley cautioned that lost+found must be pre-sized ahead of time, because the fsck of the time did not grow the directory to fit found files.

FerretFredtoday at 6:13 PM

In a couple of decades running Linux installations of all flavours, I have never seen anything in lost+found!

show 7 replies
deadbabetoday at 7:55 PM

How do questions like this make it to the top? It is an obvious thing if you search for it or ask AI, but people seem to just ignore those in favor of generating new human responses.

Thing is, any time I try to replicate something like that, I basically get a flippant response saying to go look elsewhere.

anonutoday at 7:05 PM

glad to see that Stack Overflow (or stackexchange.com) is still a thing.

show 2 replies
robraintoday at 6:33 PM

(2012), maybe?

show 1 reply
shevy-javatoday at 6:49 PM

I keep everything hidden there.

In reallife I would rename this to "trash".

jmclnxtoday at 7:21 PM

lost+found is still used on OpenBSD, seems it is created when needed. Only /home has that directory on my system. IIRC, it was created when a kernel panic happened a few releases ago. Plus some files were placed in it when fsck executed on /home

undebuggabletoday at 6:27 PM

lost+found is the Thumbs.db and .DS_Store of Linux

show 2 replies