1. Find the file named "elm.cc" in a certain directory
find /home/lijiajia/ -name elm.cc
2. Find the file name containing a certain character (such as "elm") File
find /home/lijiajia/ -name '*elm*'
find /home/lijiajia/ -name 'elm*'
find /home/lijiajia/ -name '*elm'
3. Query based on file characteristics
find /home/lijiajia/ -amin -10 #Find files accessed in the last 10 minutes in the system
find /home/lijiajia/ -atime -2 #Find files accessed in the last 48 hours in the system Files
find /home/lijiajia/ -empty #Find files or folders that are empty in the system
find /home/lijiajia/ -group cat #Find files belonging to groupcat in the system (tried, the command is wrong . )
find /home/lijiajia/ -mmin -5 #Find files modified in the last 5 minutes in the system
find /home/lijiajia/ -mtime -1 #Find files modified in the last 24 hours in the system Files that have passed
find /home/lijiajia/ -nouser #Find files belonging to invalid users in the system (don’t understand what it means)
find /home/lijiajia/ -amin 10 #Find files accessed in the system in the last 10 minutes Files
find /home/ftp/pub -user lijiajia #Find files belonging to the user lijiajia in the system
(PS: The above operations are all performed under the /home/lijiajia/ folder)
4. Use the hybrid search method to find files
find /tmp -size +10000000c -and -mtime +2 #Find a file in the /tmp directory that is larger than 10000000 bytes and modified within 48 hours
find /tmp -user TOM -OR -User George#Find/TMP directory belongs to the files of Tom or George. Display files
find /home/lijiajia/ -name 'elm.cc' -ls #Find files named "elm.cc" in the directory and display the information of these files