What is the purpose of the lost+found folder in Linux and Unix? (2014)
- Infrastructure
- Open Source
- Storage
- Linux
The linked post answered a very old Unix question that still confuses people because the directory mostly sits there empty. `lost+found` is a recovery bucket used by filesystem check tools like `fsck` when they find files or directory entries after corruption but cannot reconstruct the original parent directory. On classic Unix and ext-family filesystems, that directory was often created in advance and even pre-sized so repair could work without needing to allocate fresh metadata on a damaged or nearly full disk.
If you run ext-family filesystems, `lost+found` is still part of your disaster path, not clutter. Do not delete it casually, and if you operate XFS or other newer filesystems, check how their repair tools handle orphaned files before you need them in production.
- unix.stackexchange.com
- Discuss on HN