Damaged root directory ..


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Damaged root directory ..
# 1  
Old 05-15-2010
Damaged root directory ..

With the cpio command of a Unix File System for error I have replaced the directory “.. “
(when you give the command “ls -la” under root you see at the beginning the hidden directory “. “ followed by a hidden file who is called “..” )
I have the copy on a cartridge of the whole file system, but now when I try to launch the command line “cpio”, the message is “cannot determine working directory”. What can I do?
# 2  
Old 05-15-2010
I think you broke the filesystem. Have you tried fsck? ...but you might not be able to get to it.
# 3  
Old 05-15-2010
You may have a filename or directory name containing bad characters such as screen control characters which are distorting your directory listing. It could be that you have renamed your current working directory to a rubbish name (hence the error message).
If the root filesystem was destroyed I would not expect "ls" to work.

Try the -b switch to "ls" and look for funny characters in filenames or directory names.
Code:
ls -lab /


Also check for the presence of the two dot directories in isolation.
Code:
ls -ladb /.
ls -ladb /..





As usual it would help to know whether you were logged in as "root", which directory you were in, what you typed and what messages you saw (if any).

Last edited by methyl; 05-15-2010 at 09:21 PM..
# 4  
Old 05-18-2010
I am in root directory and also with the command "cpio -ladb /.." I have a row with a file called /.. and not a directory. It's possible to recostruct the directory "/.." ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

SunOS confusing root directory and user home directory

Hello, I've just started using a Solaris machine with SunOS 5.10. After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init). ... (2 Replies)
Discussion started by: egyassun
2 Replies

2. UNIX for Dummies Questions & Answers

Removing directory with leading hyphen from root directory

I know that this basic question has been asked many times and solutions all over the internet, but none of the are working for me. I have a directory in the root directory, named "-p". # ls -l / total 198 <snip> drwxr-xr-x 4 root root 4096 Dec 3 14:18 opt drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: edstevens
2 Replies

3. Linux

Linux Library symbolic link damaged

Hi, firstly I am not so familiar with linux and i think i have done some damage to the red hat server. It seems that now in command line I am unable to use any basic command whatsoever (ls, move, cp, bash, etc). I was trying to deploy an application and have changed the symbolic link (soft... (1 Reply)
Discussion started by: zaxx
1 Replies

4. Web Development

What is a root directory

Hey guys. I am learning PHP and I just started a few minutes ago and it said after you maked your first hello world php file to upload it to your root directory in your webserver. What is your root directory? Is it where like all the appearance of the website is held (like what we see when we enter... (6 Replies)
Discussion started by: orszhak
6 Replies

5. Ubuntu

Root directory not available!

I am using Ubuntu 10.10. I want to access root home directory (~) through GUI and want access to its content. I login from administrator who is the only login user and have all rights for it. I can access the content through terminal but can't do it through GUI. Remedy my problem (5 Replies)
Discussion started by: nixhead
5 Replies

6. UNIX for Dummies Questions & Answers

How to display only Owner and directory/sub directory names under particular root

hai, I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc". (here "oasitqtc" is the owner of the directory or sub directory.) i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies

7. UNIX for Dummies Questions & Answers

root directory

root directory is going out of space. how can i free up memory by deleting unwanted file. which files are safe to remove.i checked tmp dir. also. but no files. thanks (1 Reply)
Discussion started by: ajantha
1 Replies

8. Solaris

System damaged need help please

Hi there, i have sun solaris 10 running on X86 system P4 box with ATA harddisk, anyway suddenly its started to try to login to the maintenance mode asking for the root password when i give it its mount the partitions as read only but when i try to run fsck on them i got this error: can't stat... (3 Replies)
Discussion started by: XP_2600
3 Replies

9. UNIX for Dummies Questions & Answers

HDD damaged, help me to recover data

I can't mount root partition. I can boot GRUB but when root partition mounting step the screen show me message: init not found. I don't want to recover linux OS, I only want to recover /root/*.* files In windows OS I use Easy Recovery but I don't know software which recover data in linux OS.... (1 Reply)
Discussion started by: littleghost
1 Replies

10. UNIX for Dummies Questions & Answers

File system damaged

Dear All One partition with HTFS File system on SCO UNix 5.0.5 has got damaged and its not getting mounted. While running FSCK, getting "phase 0 error on reply.log" . Is there any other way to repair a damaged file system and to mount the same. Please help... (1 Reply)
Discussion started by: rajesh_v_u
1 Replies
Login or Register to Ask a Question