bash – How do I find all of the symlinks in a directory tree? – Stack Overflow
Posted by jpluimers on 2016/06/01
I needed to find the symlinks in /etc pointing to directories and know both the name and place they point to.
revue:~ # ls -al `find -L /etc/ -xtype l -type d` find: ‘/etc/ssh/broken/ssh_host_dsa_key’: Too many levels of symbolic links find: ‘/etc/ssh/broken/ssh_host_ecdsa_key’: Too many levels of symbolic links find: ‘/etc/ssh/broken/ssh_host_key’: Too many levels of symbolic links find: ‘/etc/ssh/ssh_host_ecdsa_key’: Too many levels of symbolic links find: ‘/etc/ssh/ssh_host_dsa_key’: Too many levels of symbolic links find: ‘/etc/ssh/ssh_host_key’: Too many levels of symbolic links lrwxrwxrwx 1 root root 19 May 7 15:43 /etc/apparmor.d/cache -> /var/cache/apparmor lrwxrwxrwx 1 root root 6 Sep 28 2014 /etc/rc.d -> init.d lrwxrwxrwx 1 root root 26 May 23 13:50 /etc/squid/errors -> /usr/share/squid/errors/de lrwxrwxrwx 1 root root 28 Mar 25 22:07 /etc/ssl/certs -> /var/lib/ca-certificates/pem lrwxrwxrwx 1 root root 18 Apr 30 14:20 /etc/xdg/systemd/user -> ../../systemd/user
–jeroen
via: bash – How do I find all of the symlinks in a directory tree? – Stack Overflow.






Leave a comment