You can do this with the answer to this question:
Linux: Find all symlinks of a given 'original' file? (reverse 'readlink')
The basic idea is that you are doing an ls -al
on every directory and grepping the contents to see if it contains the directory as a target of the link (instead of file as in previous answer). Just replace /usr/share/applications
with your directory, and the .*
matches all files or subfolders. The \->
ensures it matches link targets instead of normal filenames.
Example:
pax$ find / -exec ls -ald {} ';' 2>/dev/null | grep '\-> /usr/share/applications.*'
lrwxrwxrwx 1 pax pax 23 2010-06-12 14:56 /home/pax/applications_usr_share
-> /usr/share/applications