linux find

简介: -perm 权限-prune 忽略-user 属主-groupname-gid-mtime -n +n 按照文件的更改时间来查找文件, -n表示文件更改时间距现在n天以内,+n表示文件更改时间距现在n天以前。

-perm 权限
-prune 忽略
-user 属主
-groupname
-gid
-mtime -n +n 按照文件的更改时间来查找文件, -n表示文件更改时间距现在n天以内,+n表示文件更改时间距现在n天以前。
-newer file1 ! file2 比file1新,比file2旧
-type 查找某一类型的文件,诸如:b - 块设备文件。d - 目录。c - 字符设备文件。p - 管道文件。l - 符号链接文件。f - 普通文件。
-size n [c] 查找文件长度为n块的文件,带有c时表示文件长度以字节计。
-empty 空的文件

  1. 查找2天内被读取过的文件
    命令:

find -atime -2
输出:

[root@localhost home]# find -atime -2
.
./test
./1.log
./2.log
find /home/ -perm 777
find -size +5c
find -size 6c

目录
相关文章
|
10月前
|
Linux
在 Linux 系统中,`find` 命令
在 Linux 系统中,`find` 命令
214 56
|
Linux
16. 【Linux教程】find 查找文件和目录
16. 【Linux教程】find 查找文件和目录
211 3
|
9月前
|
Linux
linux查看目录下的文件夹命令,find查找某个目录,但是不包括这个目录本身?
通过本文的介绍,您应该对如何在 Linux 系统中查看目录下的文件夹以及使用 `find` 命令查找特定目录内容并排除该目录本身有了清晰的理解。掌握这些命令和技巧,可以大大提高日常文件管理和查找操作的效率。 在实际应用中,灵活使用这些命令和参数,可以帮助您快速定位和管理文件和目录,满足各种复杂的文件系统操作需求。
850 8
|
10月前
|
Linux
在 Linux 系统中,`find` 命令是一个强大的文件查找工具
在 Linux 系统中,`find` 命令是一个强大的文件查找工具。本文详细介绍了 `find` 命令的基本语法、常用选项和具体应用示例,帮助用户快速掌握如何根据文件名、类型、大小、修改时间等条件查找文件,并展示了如何结合逻辑运算符、正则表达式和排除特定目录等高级用法。
1769 6
|
12月前
|
Linux 应用服务中间件 nginx
|
12月前
|
存储 Linux Shell
linux查找技巧: find grep xargs
linux查找技巧: find grep xargs
148 13
|
12月前
|
机器学习/深度学习 存储 Linux
linux中强大且常用命令:find、xargs、grep
linux中强大且常用命令:find、xargs、grep
735 9
|
12月前
|
SQL 移动开发 Linux
linux下find、grep命令详解
linux下find、grep命令详解
338 8
|
12月前
|
Docker 容器
14 response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file speci
14 response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file speci
249 1
|
存储 Linux 数据库