Linux instructions: file directory management - Find

xiaoxiao2021-03-06  104

Linux instructions: file directory management --Findhttp://linuxfab.cx/ (2001-04-30 14:03:28) Name: Find usage: Find instructions: List of files that match Expression in the archive system. You can refer to a combination of different information such as the name, category, time, size, permissions, etc., only fully matched. Find determines the Path and Expression on the following rules, first on the command - (), the previous part is PATH, after which is Expression. If PATH is a null string, use the current path, if Expression is the empty string, use -print as the preset expression. There are more than two or thirty options that can be used in Expression, which only introduces the most commonly used part. -mount, -XDEV: Only check and specify files under the same archive system, avoid listing files in other file systems - Amin N: Reads in the past N - Annewer File: More than file file Night-read file -Atime N: Files read in the past N: CMIN N: Changed in the past N: -cnewer file: file updated than file file - CTIME N: in the past N Sky-modified file -empty: empty file-gid n or -group name: gid is n or group name is name -ipath p, -path p: path name complies with P's file, IPath ignores case-write- Name name, -iname name: The file name is compliant with the file. INAME ignores uppercase-size N: The file size is n unit, b represents the block of 512-bit yuan group, c represents the number of words, and K means kilo bytes, W is two bit groups. -type C: The file type is C file. D: Directory C: Dictionary Device Archive B: Block Device Archive P: Total Case F: General Archive L: Symbol Connection S: Socket-Pid N: Process ID This file You can use () to separate the arithmetic separation And use the following operations. Exp1 -and Exp2! EXPR-NOT Exprexp1 -or Exp2exp1, Exp2 Example: List of all extended files in the current directory and its subdirectory is C. # Find. -name "* .c" lists all the general files in its underlying directory, lists the current directory and its subdirectory all the files updated in the current directory and its subdirectory. # Find . -ctime -20 find. -name "*" -exec grep xxx {} /; -print | morexxx to enter the string you want to find (http://www.fanqiang.com) into the [UNIX Forum]

转载请注明原文地址:https://www.9cbs.com/read-104099.html

New Post(0)