Display only files and folders that are symbolic links in tcsh or bash

后端 未结 11 962
灰色年华
灰色年华 2021-01-30 13:20

Basically I want do the following:

ls -l[+someflags]

(or by some other means) that will only display files that are symbolic links

so t

11条回答
  •  不要未来只要你来
    2021-01-30 14:10

    echo > linklist.found && $(for i in `find /path/to/dir/ -type l`; do echo `ls -d --color=always  $i` `echo " -> "`  $(ls -d --color=always `readlink -f $i`) >> linklist.found; echo >> linklist.found;  done;) && cat linklist.found | more
    

    This works good for me however if you will be searching / the filesystem root you will need to omit the proc directory

提交回复
热议问题