一:正则表达式grep -a 不要忽略二进制数据。 -A <显示列数> 除了显示符合范本样式的那一行之外,并显示该行之后的内容。 -b 在显示符合范本样式的那一行之外,并显示该行之前的内容。 -c 计算符合范本样式的列数。 -C <显示列数>或-<显示列数> 除了显示符合范本样式的那一列之外,并显示 ...
分类:
系统相关 时间:
2020-06-17 12:42:49
阅读次数:
70
一:账号安全控制 1.1:基本安全设置 [root@localhost ~]# cat /etc/passwd ##查看用户账号 [root@localhost ~]# grep "/sbin/nologin$" /etc/passwd [root@localhost ~]# useradd zha ...
分类:
系统相关 时间:
2020-06-16 23:10:57
阅读次数:
105
001.this_is_flag flag就在题目描述中 002.pdf 附件1为pdf文件,打开如图 1:用linux自带的工具pdftotext将pdf 装换为txt格式,打开即可看到flag ,或者用命令行搜索flag : cat flag.txt |grep flag 2:用chrome(最 ...
分类:
其他好文 时间:
2020-06-16 20:24:28
阅读次数:
49
查看硬件是否支持raid,浪潮的服务器可以通过序列号查询 lspci | grep -i RAID 查看系统是否支持raid dmesg |grep -i raid 查看raid的详情 cat /proc/scsi/scsi ...
分类:
其他好文 时间:
2020-06-16 18:23:57
阅读次数:
175
测试文件regex.txt如下[root@192 Zhengze]# cat -n regex.txta aaaa aabbbbbc cc cccdddd d dd dddab abc abccef eef eeef搜索2个a[root@192 Zhengze]# grep --color -n "... ...
分类:
其他好文 时间:
2020-06-16 18:07:07
阅读次数:
85
#!/bin/bashecho $USERworkhome=/lvnktest/dygaelasticsearch-service/workjar=${workhome}dygaelasticsearch-service.jarpid=`ps -ef|grep dygaelasticsearch-s ...
分类:
其他好文 时间:
2020-06-16 16:50:44
阅读次数:
73
安装docker: 用yum源安装-查看是否已安装docker列表: yum list installed | grep docker 安装docker: yum -y install docker 启动docker systemctl start docker 查看docker服务状态 syste ...
分类:
其他好文 时间:
2020-06-16 13:03:44
阅读次数:
74
dmesg 命令可显示系统开机信息,一般用于故障排查和设备/驱动的加载的查询。 在日常工作中,dmesg 命令曾被用于查看硬盘加载状况: root@ubuntu:~/Desktop# dmesg | grep sda [ 3.791441] sd 32:0:0:0: [sda] 83886080 5 ...
分类:
系统相关 时间:
2020-06-16 12:49:41
阅读次数:
83
有效电话号码 shell 编程题目 考察了很多方面的内容 shell 命令 grep | sed | awk 正则表达式 shell 的转义处理 1. 地址 https://leetcode-cn.com/problems/valid-phone-numbers/ 2. 解法 你可以假设一个有效的电 ...
分类:
其他好文 时间:
2020-06-16 00:34:28
阅读次数:
121
1.使用os.system()去调用,但是只能返回执行状态,不能获取shell cmd执行结果 #!/usr/bin/python # -*- coding: utf-8 import os status = os.system("ps aux |grep Xcode |grep -v grep") ...
分类:
编程语言 时间:
2020-06-15 16:12:20
阅读次数:
73