当前位置:网站首页>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
边栏推荐
- JDBC and MySQL database
- Hands on deep learning (38) -- realize RNN from scratch
- Hands on deep learning (33) -- style transfer
- How can people not love the amazing design of XXL job
- Delayed message center design
- Hands on deep learning (III) -- Torch Operation (sorting out documents in detail)
- Advanced technology management - how to design and follow up the performance of students at different levels
- 基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 1
- Service developers publish services based on EDAs
- Batch distribution of SSH keys and batch execution of ansible
猜你喜欢

技术管理进阶——如何设计并跟进不同层级同学的绩效

Debug:==42==ERROR: AddressSanitizer: heap-buffer-overflow on address

Realsense of d435i, d435, d415, t265_ Matching and installation of viewer environment

PHP代码审计3—系统重装漏洞

Vs201 solution to failure to open source file HPP (or link library file)

【Day1】 deep-learning-basics

leetcode1-3

Hands on deep learning (37) -- cyclic neural network

Nuxt reports an error: render function or template not defined in component: anonymous

Write a mobile date selector component by yourself
随机推荐
Ruby时间格式转换strftime毫秒匹配格式
Press the button wizard to learn how to fight monsters - identify the map, run the map, enter the gang and identify NPC
[200 opencv routines] 218 Multi line italic text watermark
Delayed message center design
Whether a person is reliable or not, closed loop is very important
uniapp---初步使用websocket(长链接实现)
C language pointer interview question - the second bullet
Advanced technology management - how to design and follow up the performance of students at different levels
Golang defer
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 2
C language pointer classic interview question - the first bullet
libmysqlclient.so.20: cannot open shared object file: No such file or directory
2021-08-10 character pointer
Golang Modules
品牌连锁店5G/4G无线组网方案
Golang Modules
Es advanced series - 1 JVM memory allocation
Ruby time format conversion strftime MS matching format
MySQL develops small mall management system
Hands on deep learning (44) -- seq2seq principle and Implementation