What is lost + found folder on Linux and macOS?

On Linux, users use the fsck (file system check) command to check for corrupted system files. Fsck can find corrupted files on the file system. If any files are found to be corrupted, fsck will remove the corrupted data from the file system and move to the lost + found directory.

On Linux, users use the fsck (file system check) command to check for corrupted system files. Fsck can find corrupted files on the file system. If any files are found to be corrupted, fsck will remove the corrupted data from the file system and move to the lost + found directory.

What is lost + found folder on Linux and macOS? Picture 1What is lost + found folder on Linux and macOS? Picture 1

The lost + found folder is part of the Linux, macOS and UNIX operating system . Each system file, each partition has its own lost + found directory. You can find the recovery data of the corrupted files here.

1. What is the lost + found folder?

On Linux, users use the fsck (file system check) command to check for fsck file system errors that can find corrupted files on the file system. If any files are found to be corrupted, fsck will remove the corrupted data from the file system and move to the lost + found directory.

For example, if you turn off your computer suddenly when the computer is running and the files are being written to the hard drive, the fsck tool will automatically check your system files the next time you start your computer. If any data fails, it will enter the lost + found directory.

Same on macOS. If you run Disk Utility and check the file system error on the drive, Disk Utility will probably find the corrupted data and store the corrupted data in the lost + found directory.

Most UNIX file systems have a lost + found directory, including ext2, ext3, and ext4 on Linux as well as HFS + file system on macOS. However, some file systems do not use the lost + found directory.

2. Where is the lost + found folder located?

Each file system has its own lost + found directory, so you can find the lost + found folder on each hard drive or partition. This means that you will find a lost + found folder in the root directory at / lost + found .

If any other partitions are mounted, you will also find the lost + found folder on each of those partitions. For example, if you have a separate partition for the Home folder installed at / home, then you will find the lost + found folder at / home / lost + found.

The data that has been corrupted from the Home partition will be put in / home / lost + found instead of put in / lost + found.

If you have a USB drive or an external hard drive formatted with the Linux file system, you will also find the lost + found folder on it.

Note that this folder is often hidden, so you must enable the option to display hidden folders and files on the system.

Readers can refer to how to hide, show hidden files, folders and file extensions on Windows 7/8/10 here.

3. How to view content in lost + found folder?

This directory is often restricted to root users, preventing users from accessing recovered data. In some cases the lost + found directory may be empty, which is normal so don't think the folder is corrupted or corrupted.

To view the contents of the directory, open the Terminal window and run the following command:

sudo su

cd / lost + found

ls

If the first command doesn't work, try running su instead of running sudo su .

The above Terminal command will list any files in the lost + found directory. If not display any files synonymous with empty directories.

4. Restore data

If you see files or something in the lost + found folder, that's not the whole file. Instead you will only see small portions of the file or bit of the corrupted data.

If you accidentally lose some important data, you don't need to worry because you can find that data in the lost + found directory. If you lose data, you can check in the lost + found directory and restore that data. If you find the entire file here, you can move the file to its original location and use the file.

Also, you cannot delete the lost + found directory , because it is a fixed part of the file system. However, if you use the fragment file inside the lost + found directory, you can delete them using the Terminal command to free up space.

Refer to some posts below:

  1. How to enable / disable the Security tab of files and folders on Windows?
  1. Use CMD to create an 'undeleted' folder on Windows
  1. What is the 'System Volume Information' folder, and can this folder be deleted?

Wish you have moments of fun!

4 ★ | 11 Vote