当前位置:网站首页>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
边栏推荐
- If the uniapp is less than 1000, it will be displayed according to the original number. If the number exceeds 1000, it will be converted into 10w+ 1.3k+ display
- Velodyne configuration command
- Hands on deep learning (37) -- cyclic neural network
- 按键精灵打怪学习-识别所在地图、跑图、进入帮派识别NPC
- 技术管理进阶——如何设计并跟进不同层级同学的绩效
- Golang defer
- Vs201 solution to failure to open source file HPP (or link library file)
- Does any teacher know how to inherit richsourcefunction custom reading Mysql to do increment?
- Custom type: structure, enumeration, union
- Baidu R & D suffered Waterloo on three sides: I was stunned by the interviewer's set of combination punches on the spot
猜你喜欢
Latex error: missing delimiter (. Inserted) {\xi \left( {p,{p_q}} \right)} \right|}}
Summary of reasons for web side automation test failure
libmysqlclient. so. 20: cannot open shared object file: No such file or directory
Hands on deep learning (39) -- gating cycle unit Gru
How can Huawei online match improve the success rate of player matching
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 2
品牌连锁店5G/4G无线组网方案
leetcode1-3
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 1
Reasons and solutions for the 8-hour difference in mongodb data date display
随机推荐
什么是 DevSecOps?2022 年的定义、流程、框架和最佳实践
PHP code audit 3 - system reload vulnerability
Hands on deep learning (37) -- cyclic neural network
用数据告诉你高考最难的省份是哪里!
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
Kotlin 集合操作汇总
技术管理进阶——如何设计并跟进不同层级同学的绩效
Hands on deep learning (32) -- fully connected convolutional neural network FCN
Exercise 9-1 time conversion (15 points)
Exercise 9-3 plane vector addition (15 points)
直方图均衡化
Reprint: summation formula of proportional series and its derivation process
[200 opencv routines] 218 Multi line italic text watermark
六月份阶段性大总结之Doris/Clickhouse/Hudi一网打尽
Use the data to tell you where is the most difficult province for the college entrance examination!
Batch distribution of SSH keys and batch execution of ansible
Button wizard business running learning - commodity quantity, price reminder, judgment Backpack
Exercise 8-7 string sorting (20 points)
Development guidance document of CMDB
Realsense of d435i, d435, d415, t265_ Matching and installation of viewer environment