07 2021 档案

ip
摘要:来自于iproute包,可用于代替ifconfig ip命令说明 OBJECT := { link | addr | route } ip link - network device configuration set dev IFACE,可设置属性:up and down:激活或禁用指定接口,相当 阅读全文

posted @ 2021-07-19 11:00 jun_li123 阅读(524) 评论(0) 推荐(0)

netstat
摘要:来自net-tools包,建议可以使用ss代替 常用选项 -t: tcp协议相关 -u: udp协议相关 -w: raw socket相关 -l: 处于监听状态 -a: 所有状态 -n: 以数字显示IP和端口 -e:扩展格式 -p: 显示相关进程及PID 常用组合 -tan, -uan, -tnl, 阅读全文

posted @ 2021-07-19 10:24 jun_li123 阅读(168) 评论(0) 推荐(0)

bc
摘要:[root@centos7 ~]#echo 'obase=2;200'|bc11001000[root@centos7 ~]#echo '2^19-2'|bc524286[root@centos7 ~]# 阅读全文

posted @ 2021-07-17 12:35 jun_li123 阅读(672) 评论(0) 推荐(0)

网络位判断是否在同一网段的方法
该文被密码保护。

posted @ 2021-07-17 11:57 jun_li123

在vim打开的文件中粘贴代码保留原来格式
摘要:用vim 打开文件时可以使用:set noai然后按I即可进行粘贴代码并可以保留原格式 阅读全文

posted @ 2021-07-12 00:00 jun_li123 阅读(248) 评论(0) 推荐(0)

变量$-
摘要:h:hashall,打开选项后,Shell 会将命令所在的路径hash下来,避免每次都要查询。通过set +h将h选项关闭 i:interactive-comments,包含这个选项说明当前的 shell 是一个交互式的 shell。所谓的交互式shell,在脚本中,i选项是关闭的 m:monito 阅读全文

posted @ 2021-07-10 17:12 jun_li123 阅读(112) 评论(0) 推荐(0)

提示符格式与颜色设置
摘要:[root@centos7 ~]#echo $PS1 \[\e[1;1;40;34m\][\u@\h \W]\$\[\e[0m\] PS1的常用参数以及含义: \d :代表日期,格式为weekday month date,例如:"Mon Aug 1" \H :完整的主机名称 \h :仅取主机名中的第 阅读全文

posted @ 2021-07-07 17:04 jun_li123 阅读(257) 评论(0) 推荐(0)

导航