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

目录
相关文章
|
5月前
|
Linux
认识Linux指令之 “find grep” 命令
认识Linux指令之 “find grep” 命令
118 1
认识Linux指令之 “find grep” 命令
|
5月前
|
Shell Linux
【Shell 命令集合 文件管理】Linux find命令使用教程
【Shell 命令集合 文件管理】Linux find命令使用教程
75 0
|
4月前
|
Linux
16. 【Linux教程】find 查找文件和目录
16. 【Linux教程】find 查找文件和目录
84 3
|
18天前
|
存储 Linux Shell
linux查找技巧: find grep xargs
linux查找技巧: find grep xargs
26 13
|
1月前
|
Linux 应用服务中间件 nginx
|
11天前
|
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
11 1
|
18天前
|
机器学习/深度学习 存储 Linux
linux中强大且常用命令:find、xargs、grep
linux中强大且常用命令:find、xargs、grep
34 9
|
18天前
|
SQL 移动开发 Linux
linux下find、grep命令详解
linux下find、grep命令详解
124 8
|
1月前
|
存储 Ubuntu Linux
linux中的find 命令详细用法
本文介绍了如何将 `find` 命令与 `exec` 结合使用,通过具体示例展示了多种应用场景,如显示文件属性、重命名文件、收集文件大小、删除特定文件、执行工具、更改文件所有权和权限、收集 MD5 值等。文章还探讨了 `{} \;` 和 `{} +` 的区别,并演示了如何结合 `grep` 命令进行内容搜索。最后,介绍了如何在一个 `find` 命令中使用多个 `exec` 命令。这为 Linux 用户提供了强大的文件管理和自动化工具。
|
2月前
|
Linux 数据库
在Linux中,如何在Linux中使用find命令搜索文件?
在Linux中,如何在Linux中使用find命令搜索文件?
下一篇
无影云桌面