Action
Search for files
Format
find pathoption [-print] [-exec -ok command] {} \\
The default search path is the current path
The default is -print, output to standard output
Execute the command command for the found file
option is the search condition
>
Main Parameters
-name filename
Restricted File Name
-user username
By File Owner Search
-group groupname
Find by group
-mtime -n +n
Find by file change time, -n means n days Within, +n means n days ago
-atime -n +n
Check by file access time
-ctime -n +n
Find by file creation time
-nogroup
-nouser
-type
Search by file type
-size n< Br>
-depth
Search for the directory before finding the subdirectory
-follow
If you encounter a symbolic link file, trace the file pointed to by the link< Br>
-prune
Ignore a file
-o
Logic Or
-a
logic
!
Logic No
\\( \\)
Escape, can include search criteria
Example
Find all common files in the current directory
find .-type f -exec ls -l {} \\;
Find the change time in the home directory at 5 Files from the day before and delete them
find /home-mtime +5 -exec -ok rm {} \\;
Query the files modified today
find /- Mtime -1 -exec ls -l {} \\;
Query the file modified today and prompt whether to display
find /-mtime -1 -ok ls -l {} \\;< Br>
Find files smaller than 100k and display
find /home-size -100k -exec ls -l {} \\;
Find all files with suffix .txt
>
find ~-name "*.txt" -ok ls -l {} \\;
1. Man I started with the man option because it is the most basic one in many ways. This command is
In different Linux distributions, there are different GUI programs that can display various system i
The introduction of the information age has brought great convenience and benefits to our l
This article describes the implementation of malloc and its malloc in the heap expansion operation,
Modify the Linux default startup level or mode
Detailed use of rz and sz commands in Linux
Computer technology: linux remote desktop connection
Linux scripts automatically enter passwords
Understanding the Linux Process
Linux.Shell Programming Notes - Getting Started Concept
Linux System Management Technical Manual - Chapter 6 Adding New Users
Pptv has no sound, no picture how to do
Win XP Tips: Show Weeks Without Software
The strongest Win10 beautification tool Start10: seconds change Win7
Microsoft is really selling: "small gadgets" for Windows 7 desktops.
How to play Yan text How to quickly search for text in Sogou input method
Win10 Mobile users can't download fantastic list Microsoft is solving bug
Windows file protection, so that others can not view, edit, delete methods
Summary of Windows 8 Common Settings Functions
Ten Windows FAQs for Windows XP SP2
iTudou download video pop-up can not display webpage solution