find命令下的问题

来源:4-3 Linux中 find命令

慕粉3400820

2016-05-25 21:51

为什么查找1k到10k的文件,结果25k的也查出来了??,后面查找5k到10k的就没事呢???
[root@localhost ~]# find /root -size +1k -a -size -10k -exec ls -lh {} \;
总用量 48K
-rw-r--r--. 1 root root    5 5月  26 00:17 abc
-rw-------. 1 root root 1.2K 5月  25 23:52 anaconda-ks.cfg
-rw-r--r--. 1 root root  25K 5月  24 17:51 install.log
-rw-r--r--. 1 root root 7.6K 5月  24 17:49 install.log.syslog
-rw-r--r--. 1 root root 7.6K 5月  24 17:49 /root/install.log.syslog
-rw-------. 1 root root 1.8K 5月  26 01:53 /root/.bash_history
-rw-------. 1 root root 1.2K 5月  25 23:52 /root/anaconda-ks.cfg
总用量 0
-rw-------. 1 root root 0 5月  26 00:44 bookmarks
[root@localhost ~]# find /root -size +5k -a -size -10k -exec ls -lh {} \;
-rw-r--r--. 1 root root 7.6K 5月  24 17:49 /root/install.log.syslog

写回答 关注

1回答

  • LOVEason翔
    2016-05-26 11:17:21

    bug.

Linux达人养成计划 I

Linux入门视频教程,以通俗易懂的语言带你感受linux之美

398684 学习 · 3791 问题

查看课程

相似问题