当前位置:网站首页>0716RHCSA
0716RHCSA
2022-07-25 13:18:00 【Psc_ February2】
One 、 File content browsing
1)cat see /etc/passwd The contents of the document , And output with line number :
2) Use more/less see /etc/passwd Content , And each page displays 10 That's ok :
3) Use head/tail Before viewing the files separately 5 Line content and after 5 Row content :
4) Use grep see /etc/passwd neutralization root Related content :
Two 、cut command :
Given the file cut_data.txt And the content is :
No Name Score
1 zhang 20
2 li 80
3 wang 90
4 sun 60
Text when cutting according to the specified delimiter :
No|Name|Score
1|zhang|20
2|li|80
3|wang|90
4|sun|60- Use the default delimiter to cut the contents of the file , And output the first field after cutting
- Cut file content , And output the first field and the third field after cutting
- Cut by byte : Output the first byte to the second byte of the cut 10 Bytes of content
- Cut by character : Output the first character and the second character after cutting 5 The content of a character
- Cut according to the specified delimiter , Output the contents of the first field and the third field




3、 ... and 、uniq command :
New file uniq_data.txt, The content of the document is
Welcome to Linux
Windows
Windows
Mac
Mac
Linux Use uniq The command outputs the result after de duplication 
Use uniq The command outputs only duplicate lines 
Use uniq The command outputs non repeating lines 
send uniq The command counts the number of repetitions
Four 、sort command :
New file num.txt, args.txt
The contents of the document :num.txt
( There are two spaces )1
3
5
2
4
The contents of the document :args.txt
test
args1
args2
args4
args4
args3
Given the file info_txt: Press the second column as key Sort
No Name Score
1 zhang 20
2 li 80
3 wang 90
4 sun 60
Yes num.txt Sort , And output the results to sorted_num.txt in
Yes args.txt Sort , And output the results to sorted_args.txt in
Yes num.txt and args.txt Sort , And output the results to sorted_merge.txt in 
Yes args.txt After sorting, de re output
Merge sorted_args.txt and sorted_num.txt And output
Given the file info_txt: Press the second column as key Sort
5、 ... and 、tr command :
take 26 After a lowercase letter 13 Replace the first letter with a capital letter

take hello 123 world 456 Replace the numbers in with empty characters ( Prompt to use wildcards )

take hello 123 world 456 Replace letters and spaces in , Just keep the numbers ( Prompt to use wildcards )

边栏推荐
- 央行数研所穆长春:数字人民币可控匿名是维护公众利益和金融安全的客观需要
- 备战2022 CSP-J1 2022 CSP-S1 初赛 视频集
- Blindly expanding the scale of the meta universe has deviated from the development logic of the meta universe
- Substance Designer 2021软件安装包下载及安装教程
- Mlx90640 infrared thermal imager temperature sensor module development notes (V)
- [CSDN year-end summary] end and start, always on the way - "2021 summary of" 1+1= Wang "
- Shell常用脚本:检测某域名、IP地址是否通
- 如何用因果推断和实验驱动用户增长? | 7月28日TF67
- 我的创作纪念日
- [Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
猜你喜欢

Convolutional neural network model -- alexnet network structure and code implementation

Esp32-c3 is based on blinker lighting control 10 way switch or relay group under Arduino framework

领域驱动模型设计与微服务架构落地-模型设计
![[review SSM framework series] 15 - Summary of SSM series blog posts [SSM kill]](/img/fb/6ca8e0eb57c76c515e2aae68e9e549.png)
[review SSM framework series] 15 - Summary of SSM series blog posts [SSM kill]

Seven lines of code made station B crash for three hours, but "a scheming 0"

6W+字记录实验全过程 | 探索Alluxio经济化数据存储策略
![[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing](/img/6e/9e0abf8db5ec93080033bd89605ac2.jpg)
[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing

Docker learning - redis cluster -3 master and 3 slave - capacity expansion - capacity reduction building

Mlx90640 infrared thermal imager temperature sensor module development notes (V)

OAuth, JWT, oidc, you mess me up
随机推荐
Atcoder beginer contest 261 f / / tree array
程序的内存布局
web安全入门-UDP测试与防御
OAuth, JWT, oidc, you mess me up
The migration of arm architecture to alsa lib and alsa utils is smooth
The larger the convolution kernel, the stronger the performance? An interpretation of replknet model
MLX90640 红外热成像仪测温传感器模块开发笔记(五)
[machine learning] experimental notes - emotion recognition
ThreadLocal&Fork/Join
Business visualization - make your flowchart'run'(3. Branch selection & cross language distributed operation node)
G027-OP-INS-RHEL-04 RedHat OpenStack 创建自定义的QCOW2格式镜像
Zero basic learning canoe panel (14) -- led control and LCD control
0715RHCSA
TCP的拥塞控制
Concurrent programming - memory model JMM
深度学习的训练、预测过程详解【以LeNet模型和CIFAR10数据集为例】
基于百问网IMX6ULL_PRO开发板驱动AP3216实验
Substance Designer 2021软件安装包下载及安装教程
若依如何实现用户免密登录配置方法?
全球都热炸了,谷歌服务器已经崩掉了