![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
遇到的问题
andyliu4
这个作者很懒,什么都没留下…
展开
-
[Linux] 执行crontab -e报错:/tmp/crontab.hTTt2M: Permission denied
普通用户glog执行命令crontab -e出现如下报错:# crontab -eno crontab for glog - using an empty one/tmp/crontab.idLWOi: Permission denied当用户要编辑定时任务(执行crontab -e),系统会在/tmp目录下创建一个临时文件,例如上面的crontab.idLWOi,然后在保存后重写这个文件。所以一般问题就出在/tmp目录权限上。检查/tmp权限(默认drwxrwxrwt.):# ls -ld原创 2022-05-20 15:55:59 · 2801 阅读 · 0 评论 -
[Linux] 如何清理邮箱内容
以root邮箱为例:cat /dev/null > /var/spool/mail/root或> /var/spool/mail/root设置定时任务(每周日0点清理):crontab -e0 0 * * 0 cat /dev/null > /var/spool/mail/root或0 0 * * 0 /var/spool/mail/root原创 2022-05-20 15:07:27 · 1095 阅读 · 0 评论 -
前端如何向Excel模板导入数据
官方文档Demo详情可查看我的上传记录“Excel模板”原创 2022-05-12 14:46:28 · 226 阅读 · 0 评论 -
The server selected protocol version TLS10 is not accepted by client preferences [TLS12]
原创 2021-11-24 09:31:54 · 190 阅读 · 0 评论 -
You are not allowed to use this program (crontab)
Question: I’ve received a new server and logon, trying to use Crontab but getting this error message:You (your_logon) are not allowed to use this program (crontab)See crontab(1) for more informationAnswer: It looks like you are experiencing a situation原创 2021-09-03 10:58:15 · 7587 阅读 · 0 评论 -
[Linux]Cowardly refusing to create an empty archive
场景:shell脚本每小时备份一次日志(增量备份1小时内改动的文件)报错信息:Cowardly refusing to create an empty archive弱弱地拒绝生成空的归档文件解决:1.检查目录或文件是否存在(大部分情况)2.没有错,只是想屏蔽这个提示信息find . -type f -name "log*" -mmin -60 | xargs tar -czf >/dev/null 2>&1...原创 2021-05-17 21:06:41 · 2016 阅读 · 0 评论 -
[Linux]Integer expression expected
shell脚本中判断cpu是否超过80%CPU=`top -b -d0.5 -n2|grep Cpu|sed -n '2p'|awk '{print $2}'|awk -F'%' '{print $1}'`if [ $CPU -gt 80 ];then echo "warning"fi执行报错:Integer expression expected。因为结果为小数,无法和整型数字作比较。可以用bc命令转换:if [[ $(echo "$CPU > 80" | bc -l) -e原创 2021-05-17 20:49:22 · 3062 阅读 · 0 评论