mac 下终端访问文件出现“Permission Denied”解决方案

mac 下终端访问文件出现“Permission Denied”解决方案:

一个文件有3种权限,读、写、可执行,你这个文件没有可执行权限,需要加上可执行权限。

  1. 终端下先 cd到该文件的目录下

  2. 执行命令 chmod a+x ./文件名

这样就可以打开该文件了

mysql replace函数备忘

UPDATE  wp_posts  SET post_content =  REPLACE (post_content, 'http://', 'https://' ) where post_content like "%http://%"

Linux Killed 已杀死 查看原因

终端显示 "Killed" 或 "已杀死".

查看方式如下

dmesg | egrep -i -B100 'killed process'

或:
egrep -i 'killed process' /var/log/messages
egrep -i -r 'killed process' /var/log

或:
journalctl -xb | egrep -i 'killed process'

svn: Can't convert string from 'UTF-8' to native encoding:(临时解决方案)

更新SVN的时候遇到错误:svn: Can't convert string from 'UTF-8' to native encoding:

查看locale :

[root@103 test]# locale             
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

[root@103 test]#

[root@103 test]# export LC_ALL=zh_CN.UTF-8
[root@103 test]# locale

LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8

[root@103 test]# svn up .