当前位置:网站首页>Rhcsa note 4
Rhcsa note 4
2022-07-23 18:23:00 【zyfpkp】
1. File content browsing
a.cat see /etc/passwd The contents of the document , And output with line number

b. Use more/less see /etc/passwd Content , And each page displays 10 That's ok

c. Use head/tail Before viewing the files separately 5 Line content and after 5 Row content

d. Use grep see /etc/passwd neutralization root Related content
2.cut Command to use
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
Use the default delimiter to cut the contents of the file , And output the contents of the cut file in the first field after cutting

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 : The contents are as follows , Output the contents of the first field and the third field

3.uniq Command to use
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

Use uniq The command counts the number of repetitions

4.sort command
Given the file num.txt, args.txt
The contents of the document :num.txt
1
3
5
2
4
The contents of the document :args.txt
test
args1
args2
args4
args4
args3
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
No Name Score
1 zhang 20
2 li 80
3 wang 90
4 sun 60

5.
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

take hello 123 world 456 Replace letters and spaces in , Just keep the numbers

边栏推荐
- Mutual certification of product compatibility between tapdata and Youxuan database
- SQLZOO——BBC QUIZ
- 世界上最大的开源基金会 Apache 是如何运作的?
- Machine learning (9) - Feature Engineering (3) (supplementary)
- 信息论 (Information Theory): Introduction and information measures
- Behind the recovery of the B-END Market: who stands in front of the stage?
- 如何抓取新浪财经数据中心分析师评级数据?
- String length function strlen().. String function header file string.h "suggestions collection"
- rhcsa笔记三
- DDD:如何领用领域驱动设计来避免写流水账代码
猜你喜欢

吉时利静电计在新能源电池测试方案的应用

UAV circulating an unknown target under a GPS deniedenvironment with range only measurements translation

从业务开发中学习和理解架构设计

悲观锁和乐观锁

Rhcsa notes 5

MySQL transactions, starting with redo log, bin log, undo log

go中高并发下的锁是如何工作的(结合源码)

Time frequency domain analysis of 20220721 integral link

kubectl 创建 Pod 背后到底发生了什么?

Keras II classification problem
随机推荐
Pessimistic lock and optimistic lock
Alliance DAO创始人:100+Web3基础设施及Dapp创业清单
On Monday, I asked | what constraints will take effect in the comprehensive stage of vivado?
大佬在线复盘:我在训练 DALL·E 时犯过的错
Mutual certification of product compatibility between tapdata and Youxuan database
网分测花岗岩介电常数测试方案
rhcsa笔记三
Machine learning (9) - Feature Engineering (3) (supplementary)
如何理解:普通代码块、构造块、静态块?有什么关系?
What is the use of tampermonkey?
rhcsa笔记六
Use of computed in projects
Distributed transaction solution
Major optimization of openim - Message loading on demand, consistent cache, uniapp Publishing
Debug: the formal parameter has const modifier, which should be paid attention to
Simply understand why the first EVM equivalent zkevm polygon is fully betting
如何评估券商分析师预测股票涨跌的准确性?
从业务开发中学习和理解架构设计
MySQL uses commands to export and import in Windows
Three barriers in the workplace: annual salary of 300000, 500000 and 1million
