The following commands will list all suid files on a linux system:
Method 1:
find / -perm +ugo=s
Method 2:
find / -perm +4000
Method 3:
/usr/bin/find / -type f \( -perm -004000 -o -perm -002000 \) -exec ls -lg {} \; 2>/dev/null >suidfiles.txt
– Suramya