How to find files excluding symbolic links?
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
command for that.
How shall I do ?
Solution 1:
Check the man page again ;) It's:
find /path/to/files -type f
type f
searches for regular files only - excluding symbolic links.
Solution 2:
! -type l
For example, if you want to search all regular files in /usr/bin, excluding symlink:
find /usr/bin/ \! -type l