?
Solved

Directory names appear in duplicates

Posted on 2003-03-12
12
Medium Priority
?
248 Views
Last Modified: 2013-12-27
Hi,

I was wondering if someone can help with this one:

I am using Solaris 2.8 on Sun 280R with the latest patches AND some of the directory names appear really weird:

like:

drwxr-xr-x   2 oracle   oinstall     512 Mar 11 11:12 2add_ts
drwxr-xr-x   2 oracle   oinstall     512 Mar 11 11:12 1create_db
drwxr-xr-x   2 oracle   oinstall     512 Mar 11 11:12 test
drwxr-xr-x   1 oracle   oinstall     512 Mar 11 11:12 test
-rw-r--r--   1 oracle   oinstall    2842 Mar 11 11:12 setup4sites.sh
-rw-r--r--   1 oracle   oinstall    1409 Mar 11 11:12 set_add_primary_keys.sql
drwxr-xr-x   2 oracle   oinstall     512 Mar 11 11:12 lib

as you can see, test appears twice.
What is even more scarry - node # is different 1 and 2 for it.
Also, it seems like even though both of them are TEST, I can only access one using 'cd test'.
If I rm -r test and then try to 'cd test' to access the other one, I get an invalid directory error. BUT if I try to do 7cd test*' I can enter into it...

Also, if I do ls and not ls -ltr then not all the directories appear.
I know that the disk is alright. We did some work with ln -s and had some directories deleted, so I was wondering if it was related in some way. Please please help.
Thanks,
Vic
0
Comment
Question by:Victor_S1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 8125966
Maby after one from test is
a space or other ascii number

make

ls |od -cx and
see what ascii number is after test.


you can remove with rm -ri t*

0
 

Author Comment

by:Victor_S1
ID: 8125979
But the problem remains WHY was directory duplicated? I mean there are several of them all over the place, and it seems like it is all related to ln -s operations we did before...
0
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 8126003
I dont now , maby you make
a mistake write , big finger or ...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Expert Comment

by:Otetelisanu
ID: 8126205
if is a link
you have first byte l

Example:
 
lrwxrwxrwx   1 root     other          4 Mar 13 09:48 test -> ../c
0
 
LVL 4

Accepted Solution

by:
Otetelisanu earned 92 total points
ID: 8126242
make
ls -i
and write the idnode
and you can find this node
from all files with

cd /

ls -iR|grep idnode

if you have a link you must
2 file with the same node

try



0
 
LVL 3

Expert Comment

by:elfie
ID: 8126342
do the following to see the full name:

ls -1 > list_of_files  (ls -'ONE', not ls -l)
vi list_of_files

Then hit the $ sign to view if there aren't any space at the end. You can also hit :p or :l on each of these lines,this should give you an idea about the non-printable in the file name.


The reason why you have them? most likely some went wrong. Normally the hard link count (the number after the file permissions) should be at least 2 for directories, and one 'test' dir has only a count of one.
0
 
LVL 2

Assisted Solution

by:soupdragon
soupdragon earned 88 total points
ID: 8127282
ls -lib

will print inode and any non-printable characters in octal

to remove directory with unprintable chars and inode 1234

find . -inum 1234 -exec rm -rf{} \;
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 8131198
> WHY was directory duplicated?
it is not duplicated! there're 2 different filenames
check with
      ls -b
it will show the non-printable characters as octal values
to remove, use previous suggestion (check carefully)
0
 
LVL 18

Expert Comment

by:liddler
ID: 10475228
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Points split  Otetelisanu & soupdragon

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 10517362
modulo, you have big fingers?
*grin*
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question