• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

Directory names appear in duplicates

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
Victor_S1
Asked:
Victor_S1
2 Solutions
 
OtetelisanuCommented:
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
 
Victor_S1Author Commented:
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
 
OtetelisanuCommented:
I dont now , maby you make
a mistake write , big finger or ...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
OtetelisanuCommented:
if is a link
you have first byte l

Example:
 
lrwxrwxrwx   1 root     other          4 Mar 13 09:48 test -> ../c
0
 
OtetelisanuCommented:
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
 
elfieCommented:
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
 
soupdragonCommented:
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
 
ahoffmannCommented:
> 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
 
liddlerCommented:
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
 
ahoffmannCommented:
modulo, you have big fingers?
*grin*
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now