当前位置:网站首页>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
边栏推荐
- Baidu R & D suffered Waterloo on three sides: I was stunned by the interviewer's set of combination punches on the spot
- Deep learning 500 questions
- Exercise 7-4 find out the elements that are not common to two arrays (20 points)
- C language pointer interview question - the second bullet
- 百度研发三面惨遭滑铁卢:面试官一套组合拳让我当场懵逼
- 查看CSDN个人资源下载明细
- 技术管理进阶——如何设计并跟进不同层级同学的绩效
- Hands on deep learning (III) -- Torch Operation (sorting out documents in detail)
- leetcode1-3
- 智能网关助力提高工业数据采集和利用
猜你喜欢

El Table Radio select and hide the select all box

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

Hands on deep learning (44) -- seq2seq principle and Implementation

Hands on deep learning (38) -- realize RNN from scratch

华为联机对战如何提升玩家匹配成功几率

Advanced technology management - how to design and follow up the performance of students at different levels

Latex learning insertion number - list of filled dots, bars, numbers

C语言指针面试题——第二弹

leetcode1-3

Hands on deep learning (III) -- Torch Operation (sorting out documents in detail)
随机推荐
Batch distribution of SSH keys and batch execution of ansible
华为联机对战如何提升玩家匹配成功几率
Some summaries of the third anniversary of joining Ping An in China
Vanishing numbers
For programmers, if it hurts the most...
Exercise 7-2 finding the maximum value and its subscript (20 points)
Fabric of kubernetes CNI plug-in
Exercise 9-4 finding books (20 points)
Nuxt reports an error: render function or template not defined in component: anonymous
System. Currenttimemillis() and system Nanotime (), which is faster? Don't use it wrong!
AUTOSAR from getting started to mastering 100 lectures (106) - SOA in domain controllers
Kotlin:集合使用
Golang Modules
【Day2】 convolutional-neural-networks
Uniapp--- initial use of websocket (long link implementation)
入职中国平安三周年的一些总结
Custom type: structure, enumeration, union
Button wizard business running learning - commodity quantity, price reminder, judgment Backpack
Vs201 solution to failure to open source file HPP (or link library file)
【OpenCV 例程200篇】218. 多行倾斜文字水印