Chinaunix
标题:
过滤日志
[打印本页]
作者:
651260546
时间:
2018-07-21 17:27
标题:
过滤日志
[root@cfds-test-app-3rd-154 logs]# ll crm/*
crm/error:
total 244804
-rw-r--r--. 1 root root 248 Jul 15 09:30 crm.2018-07-15.log
-rw-r--r--. 1 root root 7493393 Jul 17 03:26 crm.2018-07-16.log
-rw-r--r--. 1 root root 53563713 Jul 17 15:59 crm.2018-07-17.log
-rw-r--r--. 1 root root 71820420 Jul 19 06:37 crm.2018-07-18.log
-rw-r--r--. 1 root root 117738006 Jul 19 10:25 crm.2018-07-19.log
-rw-r--r--. 1 root root 27426 Jul 21 08:31 crm.log
crm/info:
total 238176
-rw-r--r--. 1 root root 60155 Jul 15 09:30 crm.2018-07-15.log
-rw-r--r--. 1 root root 7601084 Jul 17 03:26 crm.2018-07-16.log
-rw-r--r--. 1 root root 117581736 Jul 18 15:59 crm.2018-07-17.log
-rw-r--r--. 1 root root 71686964 Jul 19 06:37 crm.2018-07-18.log
-rw-r--r--. 1 root root 46511788 Jul 19 13:59 crm.2018-07-19.log
-rw-r--r--. 1 root root 107902 Jul 20 13:56 crm.2018-07-20.log
-rw-r--r--. 1 root root 302934 Jul 21 09:22 crm.log
如图要ll 显示时排除带日期的日志 ,谢谢大家~~~~~~
作者:
1cpuer
时间:
2018-07-21 23:41
# [ /home/soio/1bs/awks ] {2018-07-21 23:38:29}
: 1532187509:0;➜ ls -l ../../back | grep -v '[2018]\-[0-1][0-9]\-[0-3][0-9]'
总用量 36
#--#
# [ /home/soio/1bs/awks ] {2018-07-21 23:38:48}
: 1532187528:0;➜ ls -l ../../back | grep '[^2018]\-[0-1][0-9]\-[0-3][0-9]'
作者:
xiaodylan
时间:
2018-07-24 00:01
ls | egrep "[a-zA-Z]+\.log"
作者:
本友会机友会摄友会
时间:
2018-07-24 17:22
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2