cancel
Showing results for 
Search instead for 
Did you mean: 
Trevor
Commander Commander
Commander
  • 96 Views

find Command

For the RHCSA-level audience only:

 

What does the following command do:

find   /   -type f   -a \( -perm -u+s -o -perm -g+s \)   -exec ls -l {} \;   2> /dev/null

 

Simple answer is best!!!

Trevor "Red Hat Evangelist" Chandler
Labels (3)
2 Replies
Chetan_Tiwary_
Community Manager
Community Manager
  • 42 Views

@Trevor Let me give a reverse engineering hint or something that learners can relate this answer to :

"On a Linux system, how can you generate a comprehensive list of all regular files in the filesystem that have the SUID or SGID (set-user-ID or set-group-ID) bit set, along with their detailed file-permission, owner/group and path information - while suppressing error messages such as “permission denied”?"

0 Kudos
Sunnykumar1
Mission Specialist
Mission Specialist
  • 33 Views

Hello @Trevor 

It shows all SUID/SGID files on the system with detailed listing.

Any error messages (like "permission denied") are hidden (2> /dev/null).

You may refer to the below screenshot:

Sunnykumar1_1-1765225976468.png

 

 

0 Kudos
Join the discussion
You must log in to join this conversation.