首页 > 系统服务 > 详细

Linux -find

时间:2018-09-18 23:24:22      阅读:194      评论:0      收藏:0      [点我收藏+]
ctrl + l 清屏
ctrl +d 退出 类似 quit
ctrl +c 终止
ctrl +u 删除光标之前的
ctrl +e 移动光标到最后

find /etc -name "sshd_config" #搜索etc目录下名字叫 "sshd_config"的文件
find /etc -name "sshd*" #搜索etc目录下名字大概叫 "sshd"的所有文件

find /etc/ -type d -name "sshd" #搜索etc下目录叫sshd的目录 d 目录参数
find /etc/ -type f -name "sshd" #搜索etc下文件叫sshd的文件 f 文件参数
find /etc/ -type l -name "sshd" #搜索etc下软链接叫sshd的软链接文件 l 为软链接

stat 查看文件具体信息
stat 1.txt
技术分享图片
最近访问 atime
创建时间(最近更改时间) mitme
更改时间 ctime

更改文件内容ctime变化,

LANG=en 显示为英文

find / -type -mtime -1 搜索更改文件内容为1天以内的
find / -type -mtime +1 搜索更改文件内容大于1天的

find /etc/ -type f -mtime -1 -name “*.conf” 搜索文件类型并且更能内容为1天以内的名字叫.conf所有文件

搜索文件的硬链接:
find / -inum
技术分享图片
find /root/ type f -mmin -120 -exec ls -l{} \; 搜索root下,修改时间最少为120分钟的文件,搜索完,并ls -l 出来。
技术分享图片

find /root/ -size +10k 搜索目录下文件大于10k的
find /root/ -size -10k 搜索目录下文件小于10k的
技术分享图片
find /root -type f -size -10k -exec ls -lh {} \; 搜索root下,大小大于10k的文件,并展示出来(k的单位也可以换M)
技术分享图片

Linux -find

原文:http://blog.51cto.com/13451715/2176884

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!