当前位置:网站首页>Sed job
Sed job
2022-07-26 08:13:00 【Two in three】
1、 Delete /etc/grub2.conf All the white space characters at the beginning of the line that start with white space in the file
sed 's/^[[:space:]]//' /etc/grub2.conf
2、 Delete /etc/fstab All # start , The first line of a line followed by at least one white space character # And white space characters
sed 's/^#[[:space:]]*//g' /etc/fstab
3、 stay /root/install.log Add... At the beginning of each line # Number
sed 's/^.*$/#&/' /root/install.log
4、 stay /etc/fstab The document does not contain # The beginning of the first line increases # Number
sed 's/^[^#]/#&/' /root/install.log
5、 utilize sed Take out ifconfig In the command IPv4 Address
ifconfig | sed -n 2p | sed -r "s/.*inet[[:space:]]*//" | sed -r "s/[[:space:]]*netmask.*//"
6、 Turn off the machine SELinux The function of
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
7、 stay /etc/hosts Add content to the configuration file
sed -i '1 i hhhh' hosts
sed -i '$ a heihei ' hosts
边栏推荐
- Dev gridcontrol 捕获按键事件
- Recurrence of strtus2 historical vulnerability
- Why don't you tell me what long polling is?
- [xshell7 free download and installation]
- 2022 7/5 exam summary
- 2022-024ARTS:最长有效括号
- The difference between throw and throws?
- 2022/7/9 exam summary
- Function default parameters, arrow functions, and remaining parameters in ES6 - explanation
- Team members participate in 2022 China multimedia conference
猜你喜欢

How to determine the authenticity of the website you visit -- certificate system

Burp Suite-第六章 如何使用Burp Spider

JSP built-in object (implicit object) -- input / output object

要不你给我说说什么是长轮询吧?

宇宙第一 IDE 霸主,换人了。。。

Use js to count the number of occurrences of each string in the string array, and format it into an object array.

2W word detailed data Lake: concept, characteristics, architecture and cases
![[xshell7 free download and installation]](/img/1f/7ac3e2c40c1b3ef2e7ce7403541972.png)
[xshell7 free download and installation]

2022-07-08 group 5 Gu Xiangquan's learning notes day01

Basic introduction of JDBC
随机推荐
Use js to count the number of occurrences of each string in the string array, and format it into an object array.
Burp suite Chapter 3 how to use burp suite agent
Burp suite Chapter 8 how to use burp intruder
一点一点理解微服务
一键部署LAMP和LNMP架构
OSPF总结
Summary of common methods of string
2022-024ARTS:最长有效括号
Master slave database deployment
Stack simulation queue
Dev gridcontrol 捕获按键事件
2022/7/12 exam summary
小组成员参加2022中国多媒体大会
咱就是来聊聊并发编程的三大核心问题。
PHP environment deployment
Software engineering -- dental clinic -- demand analysis
The difference between overloading and rewriting
Pycharm code specification tool flake8
IDEA settings设置快捷键实现字符串中的英文字母转大小写
Burp suite Chapter 7 how to use burp scanner