Deleted Lost+Found directory


 
Thread Tools Search this Thread
Operating Systems Solaris Deleted Lost+Found directory
# 1  
Old 11-02-2006
Deleted Lost+Found directory

If you delete your lost & found directory, how do you get it back, just do a mkdir?
# 2  
Old 11-06-2006
From Sunsolve:

Quote:
This is a shell script utility that recreates a lost+found directory file
with 8192 bytes of allocated space to a file system in the event that this
directory inadvertently gets removed on a running system.

This is a modification of a shell script from SRDB 3169, written for SunOS[TM]
4.x.
This script is intended for use with Solaris 2.x

1) su root
2) Run the following script in the root directory of the file system in which
a lost+found directory needs to be created:

#!/bin/sh
# mklost+found - shell script for recreating lost+found directory file.

echo "Making lost+found directory..."
/bin/mkdir ./lost+found
/usr/bin/chown root ./lost+found
/bin/chgrp root ./lost+found
/bin/chmod 700 ./lost+found

echo "Moving into lost+found directory..."
cd ./lost+found

echo "Creating temporary files in lost+found directory..."

nofiles=0
while [ "$nofiles" -le 650 ]
do
/usr/ucb/touch $nofiles
nofiles=`expr $nofiles + 1`
done

echo "Deleting temporary files in lost+found directory..."
/bin/rm ./*
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

lost+found

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

2. Shell Programming and Scripting

Lost+found

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

3. Solaris

Deletion of Data from Lost+Found Directory

Hie I am running a sun solaris server of about 300 gigabytes disk capacity. The problem is that the machine has been having problems over the past year and at times the machine would just freeze or hang and had to be re-booted. Consequently there are too many entries in the lost+found... (1 Reply)
Discussion started by: Ranganai
1 Replies

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

5. UNIX for Dummies Questions & Answers

lost or deleted data in Unix?

Quote: "Until the space is used for another file, it is not deleted and the data can be recovered (although it may require jumping through hoops)." Unquote I know this is true in the Windows world, but I didn't think it was true of Unix. I had always been told once it was deleted in Unix, it... (1 Reply)
Discussion started by: wmosley2
1 Replies

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

7. Filesystems, Disks and Memory

Restoring back files from "lost+found" directory

Hi Friends, How can I Restore the Files present under "lost+found" Directory of a FileSystem (in Solaris & Tru64 OS) to their original Locations. Now-a-days I am loosing lots of files in 2 of my Machines, One running Solaris8 and other Tru64(Digital) Unix. Thanx in... (1 Reply)
Discussion started by: dhasarath
1 Replies

8. UNIX for Dummies Questions & Answers

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... (6 Replies)
Discussion started by: DPAI
6 Replies
Login or Register to Ask a Question