Find files in Linux

Find files in Linux

Postby support » Thu Oct 02, 2008 8:10 am

Find is a very useful and powerful utility. It is often used by system administration and in shell scripts. Here
are 2 commands that might be useful:
find / -perm -4000 -print
This command will find every file on the system that is suid. This means that when you run it you will be
running it as an other user. For example, traceroute is a utility that needs to be run as root. To allow users to
run it, systems administrators will set it suid root so it will be run as root even if a user starts it. This can be
useful, but can also be a big security risk if the utility has a security hole in it.
Here is another interesting command:
find / -atime +10 -print
This command will find all the files accessed more than 10 days ago. Commands like this one can be useful
to find old files that need to be backuped or erased.
support
 
Posts: 125
Joined: Mon Jul 28, 2008 6:24 pm

Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 1 guest

cron