Operating System - HP-UX
1824881 Members
3842 Online
109675 Solutions
New Discussion юеВ

What is lost+found directory ?

 
SOLVED
Go to solution
Ezhilarasan
Occasional Advisor

What is lost+found directory ?

Hi,

I see the directory lost+found in some
directories alone. What is that ?
I understand it is being creaated by
system. When it is being created !

Thanks
R. Ezhil
5 REPLIES 5
Ricky B. Nino
Frequent Advisor

Re: What is lost+found directory ?

Hi Eizhil,

lost+found directory is created when the file system is made by newfs.

fsck copies problem ("lost") files here. fsck can't create it's own directories so newfs must do this first.

regards...
Opportunities expand for people willing to put time and effort into learning new skills.
RAC_1
Honored Contributor
Solution

Re: What is lost+found directory ?

It is created by newfs command. It is for fsck. If fsck gets errors it puts that data in lost+found.

you can create it witk mklost+fount command
There is no substitute to HARDWORK
Stanimir
Trusted Contributor

Re: What is lost+found directory ?

Hi!
lost+found has created on every file system and it purpose is to keep "bad" or corrupted files, created by fsck. Sometime is very important to recover useful, but lost information from there using methods like:

#file /lost+found/badfile - to find owner or
type of lost file
#strings /lost+found/badfile - to find text
passages there
...so on

Run fsck also try to recover files from this directory.

Regards, Stan
Frank Slootweg
Honored Contributor

Re: What is lost+found directory ?

Just a small tip/reminder:

"man -k keyword" and "man -f file" often help to find information.

In this case "man -k lost+found" would have pointed you to mklost+found(1M), which in turn points you to the mentioned fsck(1M) and mkfs(1M).
Bill Hassell
Honored Contributor

Re: What is lost+found directory ?

Frank's suggestion is great. man -k is the fastest way to recall quick information. However, it is only a simple scan of the 1-liner description of the command so it's not a substitute for a complete index such as www.docs.hp.com

Also, the whatis database (found at /usr/share/lib/whatis) must be manually created and then updated on a regular basis to capture any new man pages. To create the database the first time:

catman 11m23457

which will take several hours. The funny options are actually Unix 'bricks' or manuals. The term brick comes from the appearance of the the printed collection of man pages (each about the size of as brick). 11m23457 says: format all the pages for sections (bricks) 1 1m 2 3 4 5 7. Section 1 is for general Unix commands, section 1m is for root-only commands, section 2 is for system calls, and so on.

Without the -w option to catman, all the requested pages will be formatted as well as indexed, thus saving time ("Reformatting entry. Wait...") but using a few extra megs of space in /usr/share and other man page locations. catman follows the pathnames found in the variable $MANPATH and $MANPATH is automatically set in /etc/profile from the file /etc/MANPATH. Thius, to add a new location for man pages, just edit /etc/MANPATH and add the new location. Details are found in (you guessed it): man man. You'll see %L occasionally in the MANPATH and this is for language localization where additional pages are found using LOCALE settings.

A great way to keep man -k accurate and up to date is to run catman -m 11m23457 as a part of the reboot processes. -m merges new entries into the whatis database.


Bill Hassell, sysadmin