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 ./*
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. Filesystems, Disks and Memory
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
3. UNIX for Dummies Questions & Answers
what is the directory "lost+found" and how is it used? (2 Replies)
Discussion started by: Ben070371
2 Replies
4. UNIX for Dummies Questions & Answers
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
5. AIX
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
6. Solaris
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
7. 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
8. Red Hat
Hi,
What is lost+found in linux ?
Cheers,
snj (2 Replies)
Discussion started by: snjksh
2 Replies
MKDIR(1) BSD General Commands Manual MKDIR(1)
NAME
mkdir -- make directories
SYNOPSIS
mkdir [-p] [-m mode] directory_name ...
DESCRIPTION
mkdir creates the directories named as operands, in the order specified, using mode rwxrwxrwx (0777) as modified by the current umask(2).
The options are as follows:
-m Set the file permission bits of the final created directory to the specified mode. The mode argument can be in any of the formats
specified to the chmod(1) utility. If a symbolic mode is specified, the operation characters ``+'' and ``-'' are interpreted rela-
tive to an initial mode of ``a=rwx''.
-p Create intermediate directories as required. If this option is not specified, the full path prefix of each operand must already
exist. Intermediate directories are created with permission bits of rwxrwxrwx (0777) as modified by the current umask, plus write
and search permission for the owner. Do not consider it an error if the argument directory already exists.
The user must have write permission in the parent directory.
EXIT STATUS
mkdir exits 0 if successful, and >0 if an error occurred.
SEE ALSO
chmod(1), rmdir(1), mkdir(2), umask(2)
STANDARDS
The mkdir utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
BSD
January 25, 1994 BSD