Isso aconteceria se /var/lib/tomcat7/conf
fosse um link simbólico para /etc/tomcat7
.
Por padrão, find
(a versão do coreutils) não seguirá links simbólicos. Experimente com o sinalizador -L
:
find -L / -name "server.xml" -print
Quais condições explicam essa saída:
root@ip:/# find / -name "server.xml" -print
/etc/tomcat7/server.xml
root@ip:/# ls /var/lib/tomcat7/conf/server.xml
/var/lib/tomcat7/conf/server.xml
Estou executando isso como root e iniciando o find a partir do diretório raiz. Eu não entendo porque o arquivo que eu mostro com o comando "ls" não está aparecendo nos resultados.
saída de mount
:
/dev/xvda1 on / type ext4 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
E:
root@ip:/# ls -la /var/lib/tomcat7/conf/
total 196
drwxr-xr-x 4 root root 4096 Apr 29 03:22 .
drwxr-xr-x 95 root root 4096 Apr 29 04:23 ..
drwxrwxr-x 3 root tomcat7 4096 Apr 29 03:22 Catalina
-rw-r--r-- 1 root tomcat7 5586 Apr 1 20:32 catalina.properties
-rw-r--r-- 1 root tomcat7 1394 Feb 25 2012 context.xml
-rw-r--r-- 1 root tomcat7 2370 Jul 12 2012 logging.properties
drwxr-xr-x 2 root tomcat7 4096 Apr 29 03:22 policy.d
-rw-r--r-- 1 root tomcat7 6500 Apr 1 20:32 server.xml
-rw-r----- 1 root tomcat7 1530 Feb 25 2012 tomcat-users.xml
-rw-r--r-- 1 root tomcat7 152716 Feb 25 2012 web.xml
E:
root@ip-:/# ls -la /var/lib/tomcat7
total 24
drwxr-xr-x 6 root root 4096 Apr 29 03:22 .
drwxr-xr-x 40 root root 4096 Apr 29 01:26 ..
drwxr-xr-x 3 tomcat7 tomcat7 4096 Apr 29 03:22 common
lrwxrwxrwx 1 root root 12 Apr 1 20:32 conf -> /etc/tomcat7
lrwxrwxrwx 1 root root 17 Apr 1 20:32 logs -> ../../log/tomcat7
drwxr-xr-x 3 tomcat7 tomcat7 4096 Apr 29 03:22 server
drwxr-xr-x 3 tomcat7 tomcat7 4096 Apr 29 03:22 shared
drwxrwxr-x 4 tomcat7 tomcat7 4096 Apr 29 04:20 webapps
lrwxrwxrwx 1 root root 19 Apr 1 20:32 work -> ../../cache/tomcat7