The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Lost+found morrish Shell Programming and Scripting 1 05-14-2008 08:01 PM
lost+found morrish UNIX for Advanced & Expert Users 3 04-23-2008 02:00 PM
Lost+Found is not available vinod2all AIX 4 07-04-2005 05:50 AM
what is lost+found dir? bok UNIX for Advanced & Expert Users 1 06-01-2005 12:09 PM
lost+found Prafulla UNIX for Advanced & Expert Users 4 03-31-2002 09:24 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-16-2002
DPAI's Avatar
Registered User
 

Join Date: Jul 2001
Posts: 112
Stumble this Post!
Lost+found

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
successful.

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

DP
Forum Sponsor
  #2 (permalink)  
Old 02-16-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,449
Stumble this Post!
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 (permalink)  
Old 02-17-2002
DPAI's Avatar
Registered User
 

Join Date: Jul 2001
Posts: 112
Stumble this Post!
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

DP
  #4 (permalink)  
Old 02-17-2002
inquirer
Guest
 

Posts: n/a
Stumble this Post!
Talking rename it

Files in the lost+found folders are usually files that has no inode for some valid reasons . 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>).

Thanks!
  #5 (permalink)  
Old 02-18-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,449
Stumble this Post!
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 10:06 AM.
  #6 (permalink)  
Old 02-19-2002
thehoghunter
Guest
 

Posts: n/a
Stumble this Post!
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 (permalink)  
Old 02-19-2002
DPAI's Avatar
Registered User
 

Join Date: Jul 2001
Posts: 112
Stumble this Post!
"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

DP
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0