回答:
これは/path/to/folderディレクトリを再帰的に走査し、シンボリックリンクのみをリストします:
ls -lR /path/to/folder | grep ^lシンボリックリンクもたどる場合は、findコマンドを使用する必要があり-Lますが、オプションを含める必要があります。実際、findmanページには次のように書かれています:
   -L     Follow symbolic links.  When find examines or prints information
          about files, the information used shall be taken from the  prop‐
          erties  of  the file to which the link points, not from the link
          itself (unless it is a broken symbolic link or find is unable to
          examine  the file to which the link points).  Use of this option
          implies -noleaf.  If you later use the -P option,  -noleaf  will
          still  be  in  effect.   If -L is in effect and find discovers a
          symbolic link to a subdirectory during its search, the subdirec‐
          tory pointed to by the symbolic link will be searched.
          When the -L option is in effect, the -type predicate will always
          match against the type of the file that a symbolic  link  points
          to rather than the link itself (unless the symbolic link is bro‐
          ken).  Using -L causes the -lname and -ilname predicates  always
          to return false.次にこれを試してください:
find -L /var/www/ -type lこれはおそらく機能します:私はfindこのダイヤモンドをmanページで見つけました:-typeオプションを使用している場合は、オプションに変更する必要があり-xtypeます:
          l      symbolic link; this is never true if the -L option or the
                 -follow option is in effect, unless the symbolic link  is
                 broken.  If you want to search for symbolic links when -L
                 is in effect, use -xtype.次に:
find -L /var/www/ -xtype lfind -L /var/www/ -xtype l)。の-xtype代わりにを使用すると-type、検索でトリックが実行されます。幸運を!
                    ls -laR /path/to/folder | grep ^l「非表示」のドットフォルダーも処理する場合は、これを作成します...
                    -xtype使用できません。find . -type l再帰的にチェックしているようです。
                    find . -type l -ls説明: find現在のディレクトリ.から、-type lインクのすべての参照と-ls詳細をリストします。簡潔でシンプル...
この答えを拡張して、シンボリックリンクに関連するfindコマンドをいくつか示します。
find . -lname link_targetlink_targetはワイルドカード文字を含む可能性のあるパターンであることに注意してください。
find -L . -type l -lsこの-Lオプションfindは、壊れていない限り、シンボリックリンクをたどるように指示します。
find -L . -type l -delete -exec ln -s new_target {} \;その他のfind例は、https://hamwaves.com/find/にあります。
findがあり-lsます。したがってfind . -type l -ls、上記と同等である必要があります。
                    find -lname '*/dir/*' -printf '%P -> %l\n'。link_targetはパターンであることに言及する価値があります。
                    find デフォルトですでに再帰的に見えます: 
[15:21:53 ~]$ mkdir foo
[15:22:28 ~]$ cd foo
[15:22:31 ~/foo]$ mkdir bar
[15:22:35 ~/foo]$ cd bar
[15:22:36 ~/foo/bar]$ ln -s ../foo abc
[15:22:40 ~/foo/bar]$ cd ..
[15:22:47 ~/foo]$ ln -s foo abc
[15:22:52 ~/foo]$ find ./ -type l
.//abc
.//bar/abc
[15:22:57 ~/foo]$ findデフォルトでは、これらを再帰的に?私はそうは思いません;)
                    -Lフラグを使用して、運がなくても検索できるように更新しました-推測ですか?
                    シンボリックリンク自体だけを表示するには、次を使用できます
find -L /path/to/dir/ -xtype l ターゲットとするファイルも確認したい場合は、lsを追加します
find -L /path/to/dir/ -xtype l -exec ls -al {} \;これは私がこれまでに見つけた中で最高のものです。現在のディレクトリにあるシンボリックリンクを再帰的に表示しますが、それらをたどることなく、フルパスやその他の情報とともに表示します。
find ./ -type l -print0 | xargs -0 ls -plah出力は次のようになります。
lrwxrwxrwx 1 apache develop 99 Dec  5 12:49 ./dir/dir2/symlink1 -> /dir3/symlinkTarget
lrwxrwxrwx 1 apache develop 81 Jan 10 14:02 ./dir1/dir2/dir4/symlink2 -> /dir5/whatever/symlink2Target
etc...