当前位置:网站首页>Find command – find and search for files
Find command – find and search for files
2022-06-25 05:59:00 【ProYuan28】
find The command can find a file or directory based on a given path and expression .find There are many parameter options , And support regular , Powerful . In combination with pipes, complex functions can be realized , It is a command that system managers and ordinary users must master .
find Without any parameters , Means to find all files and directories in the current path , If the server load is high, try not to use it during peak hours find command ,find Command fuzzy search still consumes system resources .
Grammar format :find [ Parameters ] [ route ] [ Search and search scope ]
Common parameters :
| -name | Search by name |
| -size | Search by size |
| -user | Search by attributes |
| -type | Search by type |
| -iname | Ignore case |
Reference examples
Use -name Parameter view /etc All the .conf Profile at the end :
[[email protected] ~]# find /etc -name "*.conf
Use -size Parameter view /etc Under the directory is greater than 1M The file of :
[[email protected] ~]# find /etc -size +1M
Find all the files in the current user's home directory :
[[email protected] ~]# find $HOME -print
List all files and folders in the current directory and subdirectories :
[[email protected] ~]# find .
stay /home Look in the directory to .txt The ending filename :
[[email protected] ~]# find /home -name "*.txt"
stay /var/log Ignore case in the directory to find .log The ending filename :
[[email protected]xcool ~]# find /var/log -iname "*.log"
Search all files accessed in more than seven days :
[[email protected] ~]# find . -type f -atime +7
Search access time exceeds 10 Minutes of all documents :
[[email protected] ~]# find . -type f -amin +10
find /home Next is not to .txt Final document :
[[email protected] ~]# find /home ! -name "*.txt"
边栏推荐
- Introduction to sap ui5 tools
- Introduction to the main features of kyma when the cloud native application runs
- Interview experience - list of questions
- Folding mobile phones are expected to explode, or help Samsung compete with apple and Chinese mobile phones
- Day17 (set)
- How do product managers get started? How do they learn when no one takes them?
- C simple operation mongodb
- Go language map sorting (key/value sorting)
- SAP ui5 application development tutorial XXIX - Introduction to routing and navigation functions of SAP ui5 trial version
- ERDAS 9.2 installation tutorial
猜你喜欢

MySQL tuning -- 02 -- slow query log
Configuration file ui5 local in SAP ui5 tools Configuration points of yaml

Multithreading and thread pool
Do you know what a three-tier architecture is?

ERDAS 9.2 installation tutorial

2.20 learning content

Understanding the dynamic mode of mongodb document

ArcGIS Engine + Visual Studio installation tutorial
How the sap ui5 framework performs single step debugging of batch requests

JMeter stress testing and agent recording
随机推荐
RT thread i/o device model and layering
Which securities company is good for opening a mobile account? Is it safe to open a mobile account?
What is SAP sup - Sybase unwired platform
Websocket in the promotion of vegetable farmers
Mongodb basic concept learning - Documentation
JMeter stress testing and agent recording
Cnpm installation
MySQL operation JSON
MySQL uses the where condition to find strange results: solve
Guava immutable set
Array introduction plus example 01
cacacahe
Go microservice development toolkit
Introduction to MySQL test run test framework
Technology inventory: Technology Evolution and Future Trend Outlook of cloud native Middleware
Distributed solar photovoltaic inverter monitoring
Volatile and JMM memory models
Semantic segmentation cvpr2019-advance: advantageous enterprise minimization for domain adaptation in semantic segmentation
CSDN cerebral palsy bug has wasted nearly two hours of hard work
Guava new collection type