← Retour au blog
tech 8 June 2026

What is the Purpose of the lost+found Folder in Linux and Unix?

The /lost+found directory is crucial for recovering orphaned files after a system crash. Learn how it works and why it's vital for ext2 to ext4 file systems.

Article inspired by the original source
What is the purpose of the lost+found folder in Linux and Unix? (2014) ↗ unix.stackexchange.com

Introduction

If you're a Linux or Unix user, you've likely noticed a mysterious directory named /lost+found at the root of your ext2, ext3, or ext4 file systems. But what exactly is its purpose? Why is it essential for system maintenance? Let's dive in.

The Role of lost+found

The /lost+found directory is used by Linux file systems based on ext2, ext3, and ext4 to temporarily store "orphaned" files recovered during a fsck (file system check) operation. In the event of a system crash, power failure, or abrupt disconnection, files may be left in an inconsistent state. fsck scans the file system and moves these corrupted or partially written files to /lost+found, allowing the administrator to decide their fate.

How fsck Works

When fsck detects corruption, it attempts to restore as much information as possible. The recovered files are renamed based on their inode number, which can make identification challenging. For example, a file might be named by a simple number (e.g., #12345). Thus, it's crucial for the administrator to manually check these files to determine their content and importance.

Interacting with lost+found

As an administrator, you may need to explore the contents of /lost+found after a crash. Use commands like file and less to identify the type and content of files. Once identified, you can decide to move them back to their original location or delete them if they are obsolete.

Use Case

Consider the example of a database being written during a crash. Log files might end up in /lost+found. Without proper recovery, this could result in the loss of critical data. Careful verification and a structured restoration process can minimize the impact.

Conclusion

The /lost+found directory is a vital element of Linux file systems, enabling you to recover otherwise lost data. Proactive management can significantly reduce the risk of data loss following a crash. So, are you ready to explore your /lost+found?

Let's discuss your project in 15 minutes.

Linux Unix lost+found fsck file recovery
Deepthix newsletter · 100% AI · every Monday 8am

An AI agent reads tech for you.

Our AI agent scans ~200 sources per week and ships the best articles to your inbox Monday 8am. Free. One click to unsubscribe.

Visit the newsletter page →

Want to automate your operations?

Let's talk about your project in 15 minutes.

Book a call