Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Lost+found
# 1  
Old 02-16-2002

Hi all,

after a crash of our SUN Server 220R on file system was corrupt
and I had run fsck getting a lost of files/dir's in the lost+found
of the file system loking like

drwxrwxr-x 2 lmxadmin DOS---- 512 Oct 31 21:04 #0007680
drwxrwxr-x 2 lammer DOS---- 512 Jan 29 09:29 #0035347
drwxrwxr-x 2 wohlfart DOS---- 512 Nov 2 15:59 #0045338
drwxrwxr-x 2 kaptur DOS---- 512 Jan 24 12:48 #0046080
drwxrwxr-x 2 hariskos DOS---- 512 Nov 15 09:23 #0046853
drwxrwxr-x 2 mantel DOS---- 1024 Jan 23 17:21 #0072324
drwxrwxr-x 2 kaptur DOS---- 29184 Jan 29 10:21 #0103786
drwxrwxr-x 2 mantel DOS---- 1024 Jan 23 16:55 #0103791
drwxrwxr-x 2 kaptur DOS---- 1024 Jan 24 14:09 #0167459

Is it possible to get the contents of the files. I tried to
read it in some way but as as they are directories, I wasn't

Any hints on getting the files back will be of great help.

# 2  
Old 02-16-2002
On Suns the size field of a directory is a multiple of 512 bytes. And the minimum number of links on a directory is 2. These directories fufill these requirements and I think that they are really directories. But, on unix, directories are files and you can read them if you have read permission. One program that reads directories is called "ls". But you can use other programs too. I suggest "od -c".

Have you looked inside these directories to see if your files are there?

When fsck finds a problem, I always rerun it to see if I get a clean result. Every now and then, a second fsck run finds additional errors. You might try that.

Also see this thread: Retrieval of deleted files.
# 3  
Old 02-17-2002
The thing is , I go to the lost+found directory and whenever i give the command
ls #---<>----
It comes back to the home directory .... and shows the home directory too

I am confused ... How

# 4  
Old 02-18-2002
Computer rename it

Files in the lost+found folders are usually files that has no inode for some valid reasons Smilie . Issue "file" command to determine if that file is a text file or something. And if you are sure that the file is part of what you need. Rename the file using the "mv" command outside the lost+found directory with respect to the type of file (e.g., mv <file> ~/<new filename>).

# 5  
Old 02-18-2002
inquirer, there is no such thing as a file without an inode. Files (which have inodes) that are not listed in any directory are what gets reattached to lost+found and the name used is the inode number with a # in front of it.

DPAI, to most shells a # starts a comment. Try "ls \#0007680" or "ls ?0007680" or "ls *0007680".

Last edited by Perderabo; 02-18-2002 at 03:06 PM..
# 6  
Old 02-19-2002
It isn't going back to the home directory - some of the files that were lost WERE home directories. Just cd down to discover which ones were lost (do pwd to double check were you are).

When you ran fsck was it with the -y option?
If not, did you answer yes to all the questions?

Do you have a good backup? I don't know of a faster way to get the directories and files back then that unless you cd down to each home directory and move it back where it belongs. First you want to double check your hardware to insure you are not going to put them back on a bad disk.
# 7  
Old 02-20-2002
"ls \#0007680" works . Thats great Per....

Yes hoghunter, i answered yes to all the questions . I mean thats the only way to get the partitions to load .

Or is there another way ..

Humor me Smilie

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat


Hi, What is lost+found in linux ? Cheers, snj (2 Replies)
Discussion started by: snjksh
2 Replies

2. Red Hat

How to recover data from lost+found

Hi All, I am facing a problem of filesystem corruption,where i am trying to recover data with fsck -f <device name> ,now it restore the corrupted data in lost+found directory.Please let me know how to recover the data from lost+found directory. Thanks, Shailesh (1 Reply)
Discussion started by: sbapotikar
1 Replies

3. Shell Programming and Scripting


I need to try and sort 125gb of lost+found files and directories that look like from testing the files are good in some areas. Does anyone know of a script using strings, file, find, etc. to help sort something like this........can't find it on google. thks:confused: (1 Reply)
Discussion started by: morrish
1 Replies

4. UNIX for Advanced & Expert Users


Does anyone have or know of a script to help sort and display a large lost+found directory? i've googled this but not much help solaris 9 thanks (3 Replies)
Discussion started by: morrish
3 Replies

5. UNIX for Dummies Questions & Answers

Files in Lost+Found

Hi, upon reboot of our test solaris 9 box, I was prompted to run fsck on one of the filesystems (/var). This resulted in placing all the files in the lost+found directory. I have no backup. What are my options to place the files back to /var (from lost+found, is it possible?). Appreciate any... (1 Reply)
Discussion started by: spricks
1 Replies

6. Solaris

Deleted Lost+Found directory

If you delete your lost & found directory, how do you get it back, just do a mkdir? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

7. AIX

Lost+Found is not available

Hi, I have a AIX 4.3.3 running on IBM pseries server. I have some jfs filesystems running on it. I dont see Lost+Found directory in them. Can anybody guide me why it is not available. Cheers, Vinod.. (4 Replies)
Discussion started by: vinod2all
4 Replies

8. UNIX for Advanced & Expert Users

what is lost+found dir?

hi all, just wanted to know what is lost+found dir for? tnx (1 Reply)
Discussion started by: bok
1 Replies

9. UNIX for Dummies Questions & Answers

lost+found directory

what is the directory "lost+found" and how is it used? (2 Replies)
Discussion started by: Ben070371
2 Replies

10. UNIX for Advanced & Expert Users


Hi all I am using SOLARIS 8 on Sun enterpris3000 server. Last night i got a file system corrupted adn some inconsistancy in the file system were shown when i run fsck -o p option. Then i tried to fix it with fsck -F ufs -y /dev/md/rdsk/d1 option as i have given all yes response i cd not able to... (4 Replies)
Discussion started by: Prafulla
4 Replies
Login or Register to Ask a Question