有时候执行一个脚本或者运行一个可执行文件时,如执行脚本./foo.sh,会报错-bash: ./foo.sh: Permission denied,你会再试sudo ./foo.sh,发现继续报错sudo: foo.sh: command not found,这时候可能是因为该文件没有执行权限,可以通过ls -l foo.sh查看文件信息,如果确实没有,可以为文件增加执行权限 chmod +x foo.sh 这个时候就可以运行了. 参考Command not found when using s
今天不想写前言,直接写解决办法 输入命令设置root密码 sudo passwd 得到的答复是 We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With grea
因为跟博主碰到了一样的问题,所以记录一下分析原理 原文链接:https://www.jianshu.com/p/b0364074288a 首先,先介绍下背景环境,第一,是Android7.0,其次,要屏蔽home键,先上下出问题的代码 private void testWindow() { AlertDialog d = new AlertDialog.Builder(this) .setPositiveButton("ok", new DialogInterface.OnClickL
问题来源:在删除var目录下的log文件时,将redis文件夹删除了.然后在重启时:/etc/init.d/redis-server start,提示: Starting redis-server: *** FATAL CONFIG FILE ERROR *** Reading the configuration file, at line 94 >>> 'logfile /var/log/redis/redis-server.log' Can't open the log file: