write a find command in a unix shell command that will locat

write a \"find\" command in a unix shell command that will locate ALL files with their setuid (suid) bit set on your linux OS installation. How many such files are there

Solution

There are two ways to find the suid bit set files.

1. find / -perm /u=s [Find the files within the root directory / , with permission bit suid = s]

2. find / -perm +4000 [Numerical identifier for suid is 4]

To find how many such files exist, pipe the output of find command to word count command.

e.g. find / -perm /u=s | wc -l

wc -l returns the number of lines in the input, which is the number of files returned by find command

write a \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site