#!/bin/bash for X in `find dir`;do if test -L $X && test -e $X; then echo $X fi done