Answers:
在zsh中(N在括号内添加以名称开头的符号链接.):
echo *(@)
对于大多数find实现:
find -maxdepth 1 -type l
符合POSIX:
find . -type d \! -name . -prune -o -type l -print
或使用shell循环:
for x in * .*; do
  if [ -h "$x" ]; then echo "$x"; done
done
-prune选项,您需要使用find topdir ! -name topdir -prune; 否则,起始目录也将被忽略。
                    您应该使用-type而不是-xtype:
   -xtype c
          The same as -type unless the file is a symbolic link.  For  sym‐
          bolic  links:  if the -H or -P option was specified, true if the
          file is a link to a file of type c; if the -L  option  has  been
          given,  true  if  c is `l'.  In other words, for symbolic links,
          -xtype checks the type of the file that -type does not check.
缺省值为-P,因此-xtype选项将尝试确定结果文件,而不是symlink本身。实际上,我得到了一些积极的结果,这似乎是一个错误。-P -xtype l如果结果本身是符号链接,则应该返回true(在符号链接上)。
也可以使用:ls -FA | sed -ne 's/@//p'仅显示符号链接。
sed -ne 's/@//p'(甚至sed -ne 's/@$//p')不是安全的测试,因为第一个版本@在ls输出中的任何地方出现时都会给出假肯定,而第二个版本在文件名实际上以@
                    
man find显示,它-d是-depth(与FreeBSD,NetBSD,MacOS X和OpenBSD的兼容性)的同义词。它与-maxdepth。。。-depth在目录本身之前处理每个目录的内容