Find command: Search for files in specified directory
commonly used option:
-name: Specify the filename, or use "*.py" to specify the suffix name of the file, such as searching all the py files under the/home directory
Find/home-name ' *.py '
-type: Specifies the type of file to search for, common file types include: B for block devices, C-character devices, D file directories, f Common files, etc., such as searching for block device files in/dev directory:
sudo find/dev-type b
-readable: File readable
-writable: Files can be written
-executable: File Executable
-ls: Displays the file details in the search results
Find/home-name "*py"-ls
-empty: Normal file or folder is empty
Find recently modified files: -ctime: Permissions for files in the specified time have been modified, change
-atime: Files are accessed (read) within a specified time, access
-mtime: The specified time (in days) the file has been modified, modify
-mmin: Specified time (in minutes) the file has been modified, modify
Find the. c file that was modified within 30 minutes of the/home path:
Find/home-mmin-30-name "*.C"
Find the block normal files that have been modified in the last 1 days in the/home path:
Find/home-mtime 0-type F
Find the normal files that have been modified in the current directory for the last 24-48 hours, and display more information
Find. -mtime 1-type F-ls