惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
K
Kaspersky official blog
Cisco Talos Blog
Cisco Talos Blog
P
Privacy International News Feed
T
Tenable Blog
T
Threat Research - Cisco Blogs
Spread Privacy
Spread Privacy
V
Vulnerabilities – Threatpost
L
LINUX DO - 热门话题
T
The Blog of Author Tim Ferriss
WordPress大学
WordPress大学
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
月光博客
月光博客
美团技术团队
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
NISL@THU
NISL@THU
G
Google Developers Blog
P
Privacy & Cybersecurity Law Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
MyScale Blog
MyScale Blog
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Project Zero
Project Zero
Latest news
Latest news
博客园_首页
C
Cisco Blogs
The Register - Security
The Register - Security
阮一峰的网络日志
阮一峰的网络日志
Simon Willison's Weblog
Simon Willison's Weblog
H
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Docker
Vercel News
Vercel News
Know Your Adversary
Know Your Adversary
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG

博客园 - lswweb

Drone概念与答疑 Drone基于K8S的Secrets管理 Centos8通过X11使用GUI应用 K8S Master节点灾备与恢复 - ETCD K8S Master节点灾备与恢复 - Host文件Copy Rook Ceph出现daemons have recently crashed异常 Ceph rbd删除image遭遇watchers异常处理 Ceph OSD更换硬盘后遭遇PG Inconsistent异常与处理 Rook Ceph OSD异常,格式化osd硬盘重新挂载 进入K8S Pod执行操作,遭遇Operation not permitted错误 K8S Pod挂载rook ceph pv报not found in the list of registered CSI drivers异常处理 Vs中调试MVC源代码步骤 手动创建vsct文件 快速查找找VS菜单信息(Guid、GuidId、CmdId等) 在多排序条件下SQL获文章上一条、下一条记录 Knockout中ViewModel与Model的互转 Asp.Net MVC 表单验证 AjaxOptions.OnSuccess回调方法返回的参数信息 一次自定义Configuration的悲惨经历。
Linux自己常用命令记录(待续)
lswweb · 2020-12-16 · via 博客园 - lswweb

系统查询

1、查询开机错误提示信息

2、保留最新10个文件,删除其它

ls -t | tail -n +11 | xargs rm -rf

3、查询文件最后修改时间

ls -l file --full-time | awk '{print $6,$7;}'

4、

5、

文本操作

1、增加#注释掉一行配置

关闭fstab中swap配置
sed -i.bak '/swap/s/^/#/' /etc/fstab;

2、删除#打开一行配置

开启fstab中的swap配置
sed -i.bak 's/^#swap/swap/' /etc/fstab;

3、使用sed输出正则表达式匹配字符串

#输出字符串“5.0”

echo “<TargetFramework>net5.0</TargetFramework>” | sed -n 's/.*net\(.[^<]*\).*/\1/p'

4、根据分割符切分字符串,并返回最后一组

echo "1_3_5" | sed 's/.*_\([^_]*\)$/\1/'

文件操作

1、查询并返回第一个文件

find ./ -name *.csproj | head -n 1

2、判断文件是否存在

if [ -f "Remark.md" ]; then echo "true" fi

3、根据文件路径获取文件名

#返回“server”,如需要带扩展名则把最后的扩展名参数.csproj去掉
basename ./src/server.csproj .csproj

4、