find . -user mike #owned by mike
find . -type d #All directories -type f for all files
find . -size +1024M #More than 1 GB
find . -name *.jpg ! -name bb* #All jpgs except those that start with bb
find /etc -mtime -1 #All files in /etc that have been modified within the last day (24 hour increment from -1 ie yesterday)
find /etc -user root -amin -2 #all files in /etc that have been accessed within the last two minutes
* -atime: when the file was last accessed
* -ctime: when the file’s permissions were last changed
* -mtime: when the file’s data was last modified
* -amin: when (in minutes) the file was last accessed
* -cmin: when (in minutes) the file’s permissions were last changed
* -mmin: when (in minutes) the file’s data was last modified
* -nouser: shows output that’s not associated with an existing userid
* -nogroup: shows output not associated with an existing groupid
* -links n: file has n links
* -newer file: file was modified more recently than file.
* -perm 777: file has mode permissions. 777
Leave a reply
You must be logged in to post a comment.