随笔分类 -  Instrument

摘要:sshd: ~/.ssh/environment client连接进来时, 会有此环境变量, sshd必须设置PermitUserEnvironment yes, 默认no client发送本地session的环境变量至sshd /etc/ssh/sshd_config /etc/ssh/ssh_c 阅读全文
posted @ 2022-09-28 11:56 ascertain 阅读(106) 评论(0) 推荐(0) 编辑
摘要:+ 号可省略 date +'%F %T' --date='+8 seconds' # 8秒后 date +'%F %T' --date='-8 seconds' # 8秒前 date +'%F %T' --date='+5 minutes' # 5分后 date +'%F %T' --date='- 阅读全文
posted @ 2022-05-14 18:54 ascertain 阅读(19) 评论(0) 推荐(0) 编辑
摘要:将query string编码后发送 curl 'ram.canto.com/rt/tt' --data-urlencode 'name=啊&age=55' --get --data-urlencode <data> HTTP POST data url encoded --get Put the 阅读全文
posted @ 2022-05-13 13:40 ascertain 阅读(28) 评论(0) 推荐(0) 编辑
摘要:env and printenv is not shell builtin, so they can only print environment variables. env: run a program in a modified environment --ignore-environment 阅读全文
posted @ 2021-12-09 17:59 ascertain 阅读(36) 评论(0) 推荐(0) 编辑
摘要:compgen is a shell builtin compgen -u : display users -a means Names of alias -b means Names of shell builtins -c means Names of all commands -d means 阅读全文
posted @ 2021-11-18 13:45 ascertain 阅读(129) 评论(0) 推荐(0) 编辑
摘要:BIND 9 Documentation (isc.org) Downloads - ISC https://downloads.isc.org/isc/bind9/9.16.28/BIND9.16.28.x64.zip named: 查看构建信息 named -V named.conf acl i 阅读全文
posted @ 2021-05-05 11:41 ascertain 阅读(138) 评论(0) 推荐(0) 编辑
摘要:whatruns 阅读全文
posted @ 2021-04-30 07:51 ascertain 阅读(28) 评论(0) 推荐(0) 编辑
摘要:echo "background-image: url(/media/images/index/im2.jpg);"|grep -oP '(?<=url\()[^)]+' 采用负向断言 echo "background-image: url(/media/images/index/im2.jpg); 阅读全文
posted @ 2020-11-24 15:32 ascertain 阅读(74) 评论(0) 推荐(0) 编辑
摘要:awk默认从STDIN接受数据,打印文本到STDOUT awk默认输出输入分割符: FS => Input field separater,字段分隔符, 默认空格类字符 RS => Input record separater,行分隔符,默认\n OFS => Output field separa 阅读全文
posted @ 2020-09-27 18:44 ascertain 阅读(688) 评论(0) 推荐(0) 编辑
摘要:awk默认从STDIN接受数据,打印文本到STDOUT。 awk的默认输入和输出分隔符: FS : 输入字段分隔符,默认空格。 RS : 输入行分隔符,默认\n。 OFS : 输出字段分隔符,默认空格。 ORS : 输出行分隔符,默认\n。 实例:通过改变默认的内置变量使多行变成一行 file.tx 阅读全文
posted @ 2020-09-27 14:32 ascertain 阅读(545) 评论(0) 推荐(0) 编辑
摘要:全词替换 echo bar embarassment | sed 's/\bbar\b/BAR/g' echo bar embarassment | sed 's/\<bar\>/BAR/g' -i.bak 替换的同时备份原文件 1 Unix unix unix 23 2 linux Linux 3 阅读全文
posted @ 2020-09-27 14:06 ascertain 阅读(122) 评论(0) 推荐(0) 编辑
摘要:Linux find运行机制详解 - 骏马金龙 - 博客园 (cnblogs.com) find与sed结合 find . -type f -exec sed -i "s/std=c++11/std=c++14/g" {} \; 删除特殊文件 ll -i # 查找inode find . -inum 阅读全文
posted @ 2020-09-27 11:42 ascertain 阅读(147) 评论(0) 推荐(0) 编辑
摘要:NAME ln - make links between filesSYNOPSIS ln [OPTION]... [-T] TARGET LINK_NAME (1st form) ln [OPTION]... TARGET (2nd form) ln [OPTION]... TARGET... D 阅读全文
posted @ 2020-08-18 11:29 ascertain 阅读(1267) 评论(0) 推荐(0) 编辑
摘要:vimrc的配置: colorscheme default filetype on filetype plugin on filetype indent on syntax enable syntax on set ai set autochdir set autoread set cindent 阅读全文
posted @ 2020-07-08 01:39 ascertain 阅读(115) 评论(0) 推荐(0) 编辑
摘要:--list-interfaces 列出可用接口 -e 包含链路层mac tcpdump -i interface -nc 10 ether dst MAC 使用MAC地址进行抓包,加入ether修饰 win表示发送方窗口大小,ack213表示对序列号213的包进行响应 Flags表示tcp的标志位 阅读全文
posted @ 2020-07-04 15:57 ascertain 阅读(269) 评论(0) 推荐(0) 编辑
摘要:curl --noproxy '*' jd.com 所有要访问的url不使用代理,curl后可跟多个url, * 必须单引号或双引号包围,作为一个字符串传递给curl,否则shell会将其解析为当前目录下的所有文件名第一个作为noproxy的参数了. curl --location --head - 阅读全文
posted @ 2020-06-25 13:46 ascertain 阅读(176) 评论(0) 推荐(0) 编辑
摘要:-p preserver permissions保持权限,只需在打包时使用 -P absolute-names don't strip leading '/'s from file names 需在打包和解包时都使用此选项,并且打包时需以绝对路径打包 当然肯定要不同机器才能测试出此选项的效果 阅读全文
posted @ 2020-06-12 20:50 ascertain 阅读(120) 评论(0) 推荐(0) 编辑
摘要:wget -P /path/to/dir --no-check-certificate https://www.openssl.org/source/openssl-1.1.1a.tar.gz -P --directory-prefix=PREFIX以server端文件名保存文件于指定目录下 wge 阅读全文
posted @ 2020-06-12 19:52 ascertain 阅读(184) 评论(0) 推荐(0) 编辑
摘要:curl --request HEAD --include jd.com 用HEAD方法请求,必须加--include,否则无响应 --include Include protocol headers in the output curl会打印header信息 --interface Specify 阅读全文
posted @ 2020-05-26 11:53 ascertain 阅读(180) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示