The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,482 other followers

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: