07 2024 档案
摘要:awk -F: -vuser=root ' 1 == name'
阅读全文
摘要:yum -y install npm npm install -g tldr(有可能报错,报错则再执行一次) 安装成功后,第一次执行会比较慢
阅读全文
摘要:1、取出/etc/passwd中的第1行的第1列,第3列和最后一列 awk -F: 'NRՎҧ1{print 3,$NF}' /etc/passwd 2、取出/etc/passwd的第1行 awk 'NR==1' /etc/passwd 3、取出第2行到第5行的内容 awk 'NR>=2 &
阅读全文
摘要:增删改查 1、取出/etc/passwd文件的第3行 sed -n '3p' /etc/passwd 2、取出/etc/passwd文件的第2行到第5行 sed -n '2,5p' /etc/passwd 3、过滤出/etc/passwd中包含root的行 sed -n '/root/p' /etc
阅读全文
摘要:1、找出/etc/下以.conf结尾的文件 find /etc/ -type f -name '*.conf' 2、在/etc/和/tmp/目录下找出大于100kb的文件 find /etc/ /tmp/ -type f -size +100k 3、找出/etc/目录下以.conf结尾的,7天之前的
阅读全文
摘要:!/usr/bin/env python3 coding:utf-8 import requests,json,sys,os,datetime webhook="https://oapi.dingtalk.com/robot/send?access_token=88bddd19055305c4fba
阅读全文
摘要:mysql -uroot -p1223456 show databases; create database people; use people; create or replace table people(id int auto_increment primary key,firstname
阅读全文