How to find files excluding symbolic links?

前端 未结 6 1335
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-02 05:14

I want to find files in Linux that follow a certain pattern but I am not interested in symbolic links.

There doesn\'t seem to be an option to the find comm

6条回答
  •  有刺的猬
    2021-02-02 05:50

    ! -type l
    

    For example, if you want to search all regular files in /usr/bin, excluding symlink:

    find /usr/bin/ \! -type l
    

提交回复
热议问题