分类: skill

59 篇文章

MongoDB更新数据
MongoDB更新数据的命令是什么样的呢例如,我将configs表中 key等于uploadAvatarSize的数据的ValueStr字段的值更新为10,就是下面的命令后面的multi:true就表示将所有符合条件的数据都更新,即批量更新。默认multi是false,即只更新第一条数据> db.configs.update({&q…
thumbnail
配置Nginx端口转发
如何将Nginx的某个端口配置到某个域名上例如我要将9000端口配置到 leanote.hupc.site这个域名上upstream leanote.hupc.site{     server localhost:9000; } server{   listen&nbs…
thumbnail
修改Nginx请求日志格式
修改nginx.conflog_format main '$http_x_forwarded_for $remote_addr - $remote_user [$time_local] "$request" ' '$statu…
thumbnail
用curl分析URL请求时间
如何用curl分析URL请求时间: curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download}"\n" "https://hupc.site/?p=284" -o:把curl …
thumbnail
【Linux】查找符合条件的文件并删除
查找符合条件的文件并删除 找到test开头的文件并删除 find -name 'test*' | xargs rm -rf 如果指定递归深度 需要-maxdepth参数 find -maxdepth 3 -name 'test*' | xargs rm -rf
thumbnail
rsync返回值
rsync常用的错误代码: 0      Success 1      Syntax or usage error 2      Protocol incompatibility 3      Errors selecting input/output files, dirs 4      Requested action not supporte…
【转】php配置没有生效怎么办?
本文操作环境:linux5.9.8系统、PHP7.2版、DELL G3电脑 php配置没有生效怎么办? php重启后,配置不生效,一定要重新加载php.ini文件 停止PHP: [root@jiang host]# pkill php-fpm 查看9000端口: [root@jiang host]# netstat -lnt | grep 9000…
【转】Linux常用命令
基本操作 Linux关机,重启 # 关机 shutdown -h now # 重启 shutdown -r now 查看系统,CPU信息 # 查看系统内核信息 uname -a # 查看系统内核版本 cat /proc/version # 查看当前用户环境变量 env cat /proc/cpuinfo # 查看有几个逻辑cpu, 包括cpu型号 …