Q. One of our blog reader asked.. why lost+found directory is created after a fresh installation and what information it contains ? Please let me know about this directory?

This is an important directory which is useful for recovering files which are not properly closed due to many reason such as power failure. Lost+Found is created by system at the time of Linux OS installation for each partition we create. In other words we can say the mounted folder contains this lost+found folder. This folder contains the files with no links and files to be recovered. Any file to be recovered is kept in this folder. fsck command is used to recover these files.

This folder is not present in all the folders. Here is my HDD df command output.

surendra@linuxnix.com:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 37G 9.8G 26G 29%
/udev 3.9G 4.0K 3.9G 1%

/devtmpfs 1.6G 920K 1.6G 1% /runnone 5.0M 0 5.0M 0% /run/lock

none 3.9G 1.8M 3.9G 1% /run/shm

none 100M 44K 100M 1% /run/user

cgroup 3.9G 0 3.9G 0% /sys/fs/cgroup

/dev/sda5 37G 8.5G 27G 25% /home

/dev/sda7 499G 298G 177G 63% /opt

If I go in to / or /home or /opt folder I can see this folder.


surendra@linuxnix.com:~$ cd /homesurendra@linuxnix.com:/home$ pwd/home

surendra@linuxnix.com:/home$ ls

lost+found surendra

surendra@linuxnix.com:/home$

So in other words we can say for each partition this folder is present so that what ever files to be recovered with fsck can be kept in this folder. This folder is not accessible by normal user.

The following two tabs change content below.
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.