有个地方不懂,那位可以帮解释一下,谢谢! 运行如下: [root@ftp test]# ls 1.sh 4.sh secure secure.1 secure.2 secure.3 secure.4 [root@ftp test]# find ./ -name "*.sh" -exec ls -l {} \; -rw-r--r-- 1 root root 7 Dec 26 08:21 ./4.sh -rw-r--r-- 1 root root 7 Dec 26 08:37 ./1.sh [root@ftp test]# find ./ -name "*.sh" -exec ls -l * {} \; 这里加一个* -rw-r--r-- 1 root root 7 Dec 26 08:21 ....
by wangshixian - Shell - 2007-12-30 02:09:44 阅读(3436) 回复(5)
find ~ -name "*.log" -a -false -exec ls {} \ ; 关于find的false 是指-name的返回值吗? 这条命令的结果是什么?
1、请问:+20000000 代表多大的文件? -size n[c] True if the file is n blocks long (512 bytes per block). If n is followed by a c, the size is in bytes. 根据上面的规定,大于2G的文件是:+20000000吗?我怎么算着不对呢? 2、 -xdev Same as the -mount primary. -mount Always true; restricts the search to the file system containing the directory specified. Does n...
1、请问:+20000000 代表多大的文件? \r\n\r\n-size n[c]\r\n True if the file is n blocks long (512 bytes per\r\n block). If n is followed by a c, the size is in bytes.\r\n\r\n根据上面的规定,大于2G的文件是:+20000000吗?我怎么算着不对呢?\r\n\r\n2、\r\n -xdev Same as the -mount primary.\r\n -mount\r\n Always true; restricts the search to the file system\r\n containing ...
find . -size +10000 -exec ls -l {} \; 我在faq里知道了这句话是什么意思,但是具体为什么就不知道了。 我看到有很多命令用到了{} \ -exec 还有些别的,请问这是什么意思呢? 那位dx能给解答一下,谢谢!!!
find . -size +10000 -exec ls -l {} \\;\r\n我在faq里知道了这句话是什么意思,但是具体为什么就不知道了。\r\n我看到有很多命令用到了{} \\ -exec 还有些别的,请问这是什么意思呢?\r\n那位dx能给解答一下,谢谢!!!
查找7天前的文件是正常的。 [quote]# find . -mtime +7 -exec ls -l {} \; -rw-r--r-- 1 appltest dba 95258 Jun 18 17:03 ./access_log.1276819200 -rw-r--r-- 1 appltest dba 761481 Jun 20 08:59 ./access_log.1276905600 -rw-r--r-- 1 appltest dba 2378441 Jun 21 08:59 ./access_log.1276992000 -rw-r--r-- 1 appltest dba 1796697 Jun 22 08:59 ./access_log.1277078400 -r...
需求: 当前文件夹下有好几个文件夹,每个文件夹下面可能还有文件夹或者文件,我想按修改时间输出当前文件夹及其子文件夹中最新被更新的10个文件,但我在使用如下命令时,发现并不能得到我预期的效果: [code]find ./ -name "*text*" -exec ls -lt {} \; [/code] 大家帮忙看一下,谢谢!
本帖最后由 jueljust 于 2012-04-12 14:00 编辑 我想在find出来的结果上执行[code]ls -l --color {}; file {}[/code]或者[code]ls -l --color {} && file {}[/code]应该怎么写 如果exec上不支持 ; && || 之類的,麻煩大家告知一下