当前位置:网站首页>Rhcsa operation
Rhcsa operation
2022-07-04 10:17:00 【Attiude】
Pipe exercise : take echo "This is my first time to use pipe" Output content to the screen , And save it to pipe_data.txt in
[[email protected] ~]# echo "This is my first time to use pipe" | tee pipe_data.txt This is my first time to use pipe [[email protected] ~]# more pipe_data.txt This is my first time to use pipe
Redirect : a. Create a new file redirect.txt, And write in it 20210804RHCSA, Save and exit b. take cat redirect.txt The output of is redirected to redirect1.txt in c. take cat redirect.txt noexist.txt Standard output of redirected to redirect2.txt, The standard error output is redirected to error1.txt d. take cat redirect.txt noexist.txt Both standard output and error output are directed from redirect3.txt in e. Input redirection : Will enter... From the keyboard Welcome to my zone. Line break YYDS Then input EOF End keyboard input , And redirect to my_input.txt in
vim redirect.txt 20210804RHCSA [[email protected] ~]# more redirect.txt 20210804RHCSA [[email protected] ~]# cat redirect.txt 1> redirect3.txt [[email protected] ~]# cat redirect.txt 2>> redirect3.txt d. take cat redirect.txt noexist.txt Both standard output and error output are directed from redirect3.txt in [[email protected] ~]# cat redirect.txt noexist.txt &> redirect3.txt [[email protected] ~]# more redirect3.txt 20210804RHCSA cat: noexist.txt: There is no file or directory e. Input redirection : Will enter... From the keyboard Welcome to my zone. Line break YYDS Then input EOF End keyboard input , And redirect to my_input.txt in [[email protected] ~]# cat >> my_input.txt << EOF > Welcome to my zone > YYDS' > EOF [[email protected] ~]# more my_input.txt Welcome to my zone YYDS'
3. File content browsing a.cat see /etc/passwd The contents of the document , And output with line number
cat -n /etc/passwd
Use more/less see /etc/passwd Content , And each page displays 10 That's ok
more -10 /etc/passwd/ less -10 /etc/passwd/
c. Use head/tail Before viewing the files separately 5 Line content and after 5 Row content
[[email protected] ~]# head -5 /etc/passwd [[email protected] ~]# tail -5 /etc/passwd
d. Use grep see /etc/passwd neutralization root Related content
[[email protected] ~]# grep root /etc/passwd root:x:0:0:root:/root:/bin/bash operator:x:11:0:operator:/root:/sbin/nologin
边栏推荐
- Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}
- Es entry series - 6 document relevance and sorting
- Hands on deep learning (39) -- gating cycle unit Gru
- Safety reinforcement learning based on linear function approximation safe RL with linear function approximation translation 2
- Hands on deep learning (34) -- sequence model
- 入职中国平安三周年的一些总结
- PHP代码审计3—系统重装漏洞
- SQL replying to comments
- The time difference between the past time and the present time of uniapp processing, such as just, a few minutes ago, a few hours ago, a few months ago
- How can people not love the amazing design of XXL job
猜你喜欢
Dynamic memory management
Hands on deep learning (35) -- text preprocessing (NLP)
Hands on deep learning (33) -- style transfer
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 2
Work order management system OTRs
Summary of small program performance optimization practice
How web pages interact with applets
Dynamic address book
Machine learning -- neural network (IV): BP neural network
Use the data to tell you where is the most difficult province for the college entrance examination!
随机推荐
Laravel文档阅读笔记-How to use @auth and @guest directives in Laravel
Development guidance document of CMDB
Golang Modules
Golang 类型比较
uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 1
Hands on deep learning (45) -- bundle search
How web pages interact with applets
Exercise 9-5 address book sorting (20 points)
【Day1】 deep-learning-basics
Qtreeview+ custom model implementation example
Es entry series - 6 document relevance and sorting
A little feeling
Three schemes of ZK double machine room
Talk about scalability
转载:等比数列的求和公式,及其推导过程
有老师知道 继承RichSourceFunction自定义读mysql怎么做增量吗?
Container cloud notes
Golang type comparison
智慧路灯杆水库区安全监测应用