当前位置:网站首页>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 )

边栏推荐
- Substance designer 2021 software installation package download and installation tutorial
- Programmer growth chapter 27: how to evaluate requirements priorities?
- OAuth,JWT ,OIDC你们搞得我好乱啊
- 好友让我看这段代码
- 【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
- Mu Changchun, data Research Institute of the central bank: controllable anonymity of digital RMB is an objective need to safeguard public interests and financial security
- Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
- Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘
- Redis visualizer RDM installation package sharing
- Introduction to web security UDP testing and defense
猜你喜欢

如何用因果推断和实验驱动用户增长? | 7月28日TF67

【GCN-RS】Towards Representation Alignment and Uniformity in Collaborative Filtering (KDD‘22)

Basic knowledge of binary tree

B tree and b+ tree

7行代码让B站崩溃3小时,竟因“一个诡计多端的0”

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

How to use causal inference and experiments to drive user growth| July 28 tf67

OAuth, JWT, oidc, you mess me up

Shell常用脚本:获取网卡IP地址

程序的内存布局
随机推荐
[Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing
Summary of Niuke forum project deployment
详解浮点数的精度问题
Excel import and export source code analysis
基于百问网IMX6ULL_PRO开发板移植LCD多点触摸驱动(GT911)
Mlx90640 infrared thermal imager temperature sensor module development notes (V)
IM系统-消息流化一些常见问题
Excel录制宏
Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘
【服务器数据恢复】HP EVA服务器存储RAID信息断电丢失的数据恢复
The larger the convolution kernel, the stronger the performance? An interpretation of replknet model
如何用因果推断和实验驱动用户增长? | 7月28日TF67
基于百问网IMX6ULL_PRO开发板驱动AP3216实验
Oran special series-21: major players (equipment manufacturers) and their respective attitudes and areas of expertise
Chapter5 : Deep Learning and Computational Chemistry
Excel添加按键运行宏
G027-OP-INS-RHEL-04 RedHat OpenStack 创建自定义的QCOW2格式镜像
Shell common script: get the IP address of the network card
ThreadLocal&Fork/Join
业务可视化-让你的流程图'Run'起来(3.分支选择&跨语言分布式运行节点)