Find-typeFile type: Common f common file, D directory file,-nameThe most commonly used option is either to use this option alone or to use it with other options. You can use a file name pattern to match files, remembering to enclose the filename
1. Directories and Paths
A more specific directory under Linux:
. Represents this layer directory : Represents the previous directory-represents the previous working directory -the home directory where the
Basic syntax: Find Path-option [-print] [-exec-ok command] {} \;The parameters of the Find command;The directory path that the Pathname:find command looks for. For example, use. To represent the current directory, and/to represent the system root
Examples of common usages of Find in Linux find Path-option [-print] [-exec-ok command] {} \;The parameters of the Find command;The directory path that the Pathname:find command looks for. For example, use. To represent the current directory, and/to
Whereis locate in the database to find, updatedb Update database, need rootFind in hard drive (slower)Locate
-I.
Ignore Case differences
-R
Can be followed by the display of regular notation
Basic Linux Training tutorial usingFind is a very powerful search command for Linux, and with man find, you can find the description of Find in one screen, and it will take some time to read it. Brother even the Linux training to summarize the
Search for Linux files: Whereis, locate, findFind lookup is relatively slow, because Whereis and locate use the database to find data, so it is relatively fast and does not actually query the hard disk, saving time.
Whereis (looking for a
Linux terminals, there is no Windows search as easy to use the graphical interface tool, but find command is very powerful.
For example, by name to find a file, you can use found/-name targetfilename. Alas, if you only know the name, do not know
Problem descriptionMany companies need to regularly back up the database on the same day, the creation of the date of the day directory and directory storage day backup data, with the online script appears to the entire database backup to delete,
Debugging Methods for Shell scripts
-N: Read the command in the script but not execute it to check for syntax errors in the script
-V: Executes scripts while printing executed script commands to standard error output
-X: Provides
We often use the Find command to bulk operations, such as: bulk delete old files, batch modification, time-based file statistics, file size based file statistics, etc., in these operations, because the RM delete operation will cause the directory
Here is a summary of some of the recent Learning files and directory management knowledge pointsBlog Park-Bang Bang sauce Good **************************************related operations for directories**********************************1. Special
Here are the usual commands to remind yourself lest you always forget a fewcd pwd mkdir rmdir LS MV CP RM Cat TAC NL More less head tail ODLs-l file LS--time={ctime|atime] File LS--full-time Mtime (modification time), CTime (status Tim), Atime
How to use the Linux Find command under a Linux system, as in the following example.I. Common usage examples of Find in Linuxfind Path-option [-print] [-exec-ok command] {} \;#-print output of the found file to standard output#-exec command {} \;
This article mainly describes the Python implementation of the file full backup and differential backup details of the relevant information, the need for friends can refer to the following
Python implements full backup and differential backup of
Today, we will use some search commands in windows to help you find what you want. In linux and I have been writing centos, the search command is equally powerful. The commonly used whichwhereislocatefind4 methods focus on finding. it is best to use
This article mainly introduces node. fs. futimes method usage instructions. This article introduces fs. futimes method description, syntax, receive parameters, use instances, and implement Source Code. For more information, see
Method
Often used in the work, are collected from the Internet, record a convenient search
Sentence notation:
Find corresponding directory-mtime + days-name "file name"-exec rm-rf {} \;
Example 1:
Find/usr/local/backups-mtime +10-name "* *"-exec RM-RF {} \;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.