var fs = require('fs'); //获取当前目录下的全部文件 fs.readdir('./',function(err,files){ if(!err){ console.log(files); } }) //获取某个文件的属性信息 //引入第三方的时间格式化模块,安装方式命令行执行 ...
分类:
Web程序 时间:
2021-03-08 13:08:51
阅读次数:
0
/* 【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程) 实验七十六:TTL转RS-485模块 MAX485 RS485模块 将Arduino上的数字引脚10、11设置为软串口RX和TX与MAX485模块上的RO和DI连接 MAX485模块上的RE和DE连接在一起用一个引脚 ...
分类:
其他好文 时间:
2021-03-08 13:03:25
阅读次数:
0
#!/bin/bash #for.sh for i in `cat ./ip.txt`; do ip=`echo $i|awk -F: '{print $1}'` num=`echo $i|awk -F: '{print $2}'` echo $ip sleep 1 echo $num sleep ...
分类:
其他好文 时间:
2021-03-06 14:46:46
阅读次数:
0
在允许nginx服务器中,输入命令: netstat -ano | grep "TIME_WAIT" 可以看到出现很多TIME_WAIT的端口, 输入命令: netstat -an|awk '/tcp/ {print $6}'|sort|uniq -c 可以看到结果: 76 CLOSE_WAIT 3 ...
分类:
其他好文 时间:
2021-03-04 13:10:09
阅读次数:
0
shell #! /bin/bash #外层循环 for ((i=1;i<=9;i++)) do #内层循环 for ((j=1;j<=i;j++)) do #计算2个数的乘积 let "product=i*j" #输出乘积 printf "i*i?j=$product" #输出空格分隔符 if [ ...
分类:
编程语言 时间:
2021-03-03 11:55:14
阅读次数:
0
cd,pwd,ls,cp,mv,history,ps,top,netstat,grep,tar-cvf/xvf,这些是基本的 touch,cat,head,tail,跟文件相关 vim命令 vi,进入文件页, i,插入 esc,切换插入模式和命令模式,然后:wq,保存后退出 最近重点学习了awk命令 ...
分类:
系统相关 时间:
2021-03-02 11:57:34
阅读次数:
0
var str = 'node.js'; var fs = require('fs'); fs.writeFile('./a.txt',str,function(err){ if(err==null){ console.log('恭喜你,写入成功') }else{ console.log(err); ...
分类:
Web程序 时间:
2021-03-02 11:49:45
阅读次数:
0
######cut -d 指定分隔符 -f 指定列数 1,2,3 [root@rongbiz002 26]# awk '{print $1}' /www/wwwlogs/c2p.rongbiz.com-access_log|head -n5 |cut -d '.' -f 1,2,3 112.64.5 ...
分类:
系统相关 时间:
2021-02-27 13:40:48
阅读次数:
0
题目要求 提示用户输入网卡的名字,然后我们用脚本输出网卡的ip,需要考虑下面问题: 1. 输入的字符不符合网卡名字规范,怎么应对。 2. 名字符合规范,但是根本就没有这个网卡又怎么应对。 参考答案 #!/bin/bash ip add |awk -F ': ' '$1 ~ "^[1-9]" {pri ...
分类:
其他好文 时间:
2021-02-26 13:34:50
阅读次数:
0
For 语法:for (initialisation; condition; increment/decrement) action #for 语句首先执行初始化动作( initialisation ),然后再检查条件( condition )。如果条件为真,则执行动作( action ),然后执行 ...
分类:
其他好文 时间:
2021-02-23 14:17:54
阅读次数:
0