Linux 备忘录
Contents
## 关于URL redirect和URL frame的区别 这是两种不同的URL转发模式,第一种:URL redirect是直接转发,也就是你访问域名后转向后显示的是转向后的域名,也就是你从AURL转到B之后,显示的是B的域名。 第二种URL frame 就是隐藏转发,转发后显示的域名还是A域名!客户可以根据自己的需要使用相应的功能!
ssh
ssh [email protected] -p xxxx
-p 端口号
免密
本机 公钥 复制到 远端 .ssh/authorized_keys
连接警告
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:IFK0mTIm1WiUEtfU8RdmEvpfRGMVmsx54oU3Vyfmk/k.
Please contact your system administrator.
Add correct host key in /Users/nick/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/nick/.ssh/known_hosts:4
RSA host key for 192.168.1.1 has changed and you have requested strict checking.
Host key verification failed.
防火墙与端口
ssr-go 版脚本开启了防火墙,手动打开ssh xxxx口、ng 80口、hexo 4000口,并重启防火墙生效。
Linux Dropbox 注意事项:
- 需要不启用xll的ssh连接(MobaXterm等ssh工具默认启用)
Couldn.t start Dropbox.
This is usually because of a permissions error. Storing your home folder on a network share can also cause an error.
开机启动
vim /etc/rc.local
包
bc
名称
bc - 任意精度计算器语言
句法
bc [ -hlwsqv ] [长选项] [ 文件 ... ]
内存占用
mem()
{
ps -eo rss,pid,euser,args:100 --sort %mem | grep -v grep | grep -i $@ | awk '{printf $1/1024 "MB"; $1=""; print }'
}
mem mysql
后台
screen
#保存
screen -S name
#恢复
screen -r name
nohup
nohup shell &
文件监测
/usr/bin/inotifywait -mrq --timefmt '%d/%m/%y-%H:%M' --format '%T%w%f' -e modify,delete,create,attrib,move "/root/Dropbox/blog" \
| while read file
do
cd /home/wwwroot/nick/
hexo g
done
Author NickHoo
LastMod 2017-08-17