- 论坛徽章:
- 0
|
find - search for files in a directory hierarchy
SYNOPSIS
find [-H] [-L] [-P] [path...] [expression]
for example:
-anewer file
File was last accessed more recently than file was modified. If file is a symbolic link and the -H option or the -L option is
in effect, the access time of the file it points to is always used.
-atime n
File was last accessed n*24 hours ago. When find figures out how many 24-hour periods ago the file was last accessed, any
fractional part is ignored, so to match -atime +1, a file has to have been accessed at least two days ago.
-cmin n
File status was last changed n minutes ago.
-cnewer file
File status was last changed more recently than file was modified. If file is a symbolic link and the -H option or the -L
option is in effect, the status-change time of the file it points to is always used.
-ctime n
File status was last changed n*24 hours ago. See the comments for -atime to understand how rounding affects the interpreta-
tion of file status change times.
例子:
find . -mtime 1 -exec ls -l '{}' \; #我这样好像只是把今天内的所有文件都列出来了
|
|