tail /mnt/mysqld_log/mysql_error_log.err | grep -e `date +'%y%m%d' --date='4 hour ago'` | more
120824 11:25:06 [ERROR] /usr/libexec/mysqld: Table '.zone_assoc' is marked as crashed and should be repaired
120824 18:03:23 [ERROR] /usr/libexec/mysqld: Incorrect key file for table '.ad_zone_assoc.MYI'; try to repair it
120824 18:08:38 [ERROR] /usr/libexec/mysqld: Incorrect key file for table '.ad_zone_assoc.MYI'; try to repair it
以上按预期工作,并显示了今天的结果。但以下不起作用。
tail /mnt/mysqld_log/mysql_error_log.err | grep -e `date +'%y%m%d %k' --date='4 hour ago'` | more
grep: 18: No such file or directory
我试图逃离这个空间,但效果不佳。
tail /mnt/mysqld_log/mysql_error_log.err | grep -e `date +'%y%m%d\ %k' --date='4 hour ago'` | more
grep: Trailing backslash