Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
linux-trra:/usr/local> $CATALINA_HOME
bash: /home/anisha/openGTS17Nov/apache-tomcat-7.0.32/: is a directory

linux-trra:/usr/local # ln -s $CATALINA_HOME tomcat

linux-trra:/usr/local # file tomcat 
tomcat: symbolic link in a loop

linux-trra:/usr/local> ls
apr  bin  games  gts  include  jdk  lib  lib64  man  OpenGTS_2.4.5  sbin   share  src  tomcat

Why is that tomcat considered a symbolic link in this particular case, and what's the way to solve the issue?

anisha@linux-trra:~/openGTS17Nov/apache-tomcat-7.0.32> ls
bin  conf  lib  LICENSE  logs  NOTICE  RELEASE-NOTES  RUNNING.txt  temp  webapps  work

anisha@linux-trra:~/openGTS17Nov/apache-tomcat-7.0.32> file *
bin:           directory
conf:          directory
lib:           directory
LICENSE:       ASCII English text, with CRLF line terminators
logs:          directory
NOTICE:        ASCII English text, with CRLF line terminators
RELEASE-NOTES: ASCII English text, with CRLF line terminators
RUNNING.txt:   ASCII English text, with CRLF line terminators
temp:          directory
webapps:       directory
work:          directory
anisha@linux-trra:~/openGTS17Nov/apache-tomcat-7.0.32> 
share|improve this question
    
Are any of the components in /home/anisha/openGTS17Nov/apache-tomcat-7.0.32 symlinks themselves? –  Mat Nov 22 '12 at 8:40
    
@Mat added info. –  TheIndependentAquarius Nov 22 '12 at 8:54
1  
Sorry that's not what I meant. Are /home, /home/anisha, ... and/or /usr/local symlinks. –  Mat Nov 22 '12 at 8:58
    
@Mat you want me to present the output of: file /home? –  TheIndependentAquarius Nov 22 '12 at 9:17
    
Anisha, you have a cyclic link. You can't fix it you don't know where it's cycling. To know where it's cycling, you need to check all the path components your dealing with. Present that information however you want, but you need to know the nature of each of the path components. –  Mat Nov 22 '12 at 9:33

1 Answer 1

It seems you are facing some symbolic link loop... Captain obvious inside. It's time to diagnose the problem with more accuracy, now. Go in

$CATALINA_HOME

and find all the symbolic links that are hiding there :

find . -type l

find will be more powerful than file here : it provides you recursion, and the output only shows what you're interested in. If this does not work, go to an upper level and iterate find again.

Note that you may have to follow many links to find the complete loop - be patient !

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.