linux查看最近文本修改的内容,【转】Linux查找最近修改过的文件命令(CentOS 5.5)...

查找当前目录下.phtml文件中,最近30分钟内修改过的文件。

view sourceprint?

1 find . -name '*.phtml' -type f -mmin -30

查找当前目录下.phtml文件中,最近30分钟内修改过的文件,的详细情况。

view sourceprint?

1 find . -name '*.phtml' -type f -mmin -30 -ls

查找当前目录下,最近1天内修改过的常规文件。

view sourceprint?

1 find . -type f -mtime -1

查找当前目录下,最近1天前(2天内)修改过的常规文件。

view sourceprint?

1 find . -type f -mtime 1

查找当前目录下,最近1天前修改过的常规文件。

view sourceprint?

1 find . -type f -mtime +1

注意这里的:-1, 1, +1的区别

和时间有关的find参数:

view sourceprint?01 -mmin n

02        Files data was last modified n minutes ago.

03

04 -mtime n

05        Files data was last modified n*24 hours ago.  See the comments for -atime to understand how rounding affects the interpretation of

06        file modification times.

07

08 -newer file

09        File was modified more recently than file.  If file is a symbolic link and the -H option or the -L option is in effect, the modifi-

10        cation time of the file it points to is always used.

和文件类型有关的find参数:

view sourceprint?

1 -type c  File is of type c:

2 b      block (buffered) special

3 c      character (unbuffered) special

4 d      directory

5 p      named pipe (FIFO)

6 f      regular file

7 l      symbolic  link;  this is never true if the -L option or the -follow option is in effect, unless the symbolic link is broken.

8        If you want to search for symbolic links when -L is in effect, use -xtype.

9 s      socket

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值