Operating System - HP-UX
1752795 Members
6136 Online
108789 Solutions
New Discussion юеВ

Re: two directory with the same name

 
CAS_2
Valued Contributor

Re: two directory with the same name

About the "find" command line suggested by
Robert-Jan Goosens.
I think -xdev option is very important to be used:

# cd /
# find . -xdev -inum 2365 -exec mv {} /tmp/vikas \;
Raj D.
Honored Contributor

Re: two directory with the same name

Hi Vikas ,

You can try ,

1.# ls -i | grep pam
[ not down the inode nos. of both.]
# ls -b | grep pam [ You may find any diff ]

If no difference , then proceed to 2.

2. Check both the dir , as per inode :

# find . -type d -xdev -inum xxx -print
# find . -type d -xdev -inum yyy -print

[ xxx and yyy are the indoe number of the two dir. ]

[ Any difference ! ]

3. You can compare the size also , to make sure they are really exists and you can move or delete :

#find . -type d -xdev -inum xxx -exec du -sk {} \;
#find . -type d -xdev -inum yyy -exec du -sk {} \;

And then you can move using mv with find.

Hope this will help ,

Cheers,
Raj.D.
" If u think u can , If u think u cannot , - You are always Right . "
VIKAS AGRAWAL
Frequent Advisor

Re: two directory with the same name

Hi All,

Thanks for replying , Today i am going to customer place & from there i will send u output of all the commands u ppls are asking.

When customer has reported this problem to me that time i also suggested him all these things & once i reached at customer site, i found this is just a secound dummy name u can noy move , delete or copy this directory , But when u give ls u will find it.

Any how will get back to all u ppls with output of these commands .
VIKAS AGRAWAL
Frequent Advisor

Re: two directory with the same name

Hi All ,

Find command with inum works fine & i deleted that directory successfully ,

Thanks all for your replies ,
VIKAS AGRAWAL
Frequent Advisor

Re: two directory with the same name

find command worked fine with inum & i was able to delete the directory
Raj D.
Honored Contributor

Re: two directory with the same name

Hi Vikas ,

Nice to know that with find and inum you can able to delete it . Cheers.

Also found that you have given 1 points to each , initially I thought it is 10 , but found 0 is vanished.

Giving 1 point each , it seems that you have not got any help from this thread , and may be not happy.

Cheers,
Raj.D.

" If u think u can , If u think u cannot , - You are always Right . "
VIKAS AGRAWAL
Frequent Advisor

Re: two directory with the same name

Hi Raj & All others who replied

I am sorry for that, this was my first chance to give points, I have given one point to each one who replied & i was planning to add points to those ppls who's solution works for me, but after that site has not allowed me to change the already assigned points. Hope u understand.
Vibhor Kumar Agarwal
Esteemed Contributor

Re: two directory with the same name

No problem.

You are most welcome.
Vibhor Kumar Agarwal
Raj D.
Honored Contributor

Re: two directory with the same name

No Problem,

Keep your queries posted ,
Enjoy and Have fun.

HTH.
Raj.D
" If u think u can , If u think u cannot , - You are always Right . "