当前位置:网站首页>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
边栏推荐
- 按键精灵跑商学习-商品数量、价格提醒、判断背包
- Nuxt reports an error: render function or template not defined in component: anonymous
- 查看CSDN个人资源下载明细
- 智慧路灯杆水库区安全监测应用
- For programmers, if it hurts the most...
- xxl-job惊艳的设计,怎能叫人不爱
- Exercise 7-2 finding the maximum value and its subscript (20 points)
- 有老师知道 继承RichSourceFunction自定义读mysql怎么做增量吗?
- Exercise 9-3 plane vector addition (15 points)
- Safety reinforcement learning based on linear function approximation safe RL with linear function approximation translation 2
猜你喜欢

Mmclassification annotation file generation

C语言指针经典面试题——第一弹

5g/4g wireless networking scheme for brand chain stores

Baidu R & D suffered Waterloo on three sides: I was stunned by the interviewer's set of combination punches on the spot

【FAQ】华为帐号服务报错 907135701的常见原因总结和解决方法

Hands on deep learning (34) -- sequence model

Matlab tips (25) competitive neural network and SOM neural network

Doris / Clickhouse / Hudi, a phased summary in June

MySQL develops small mall management system

Three schemes of ZK double machine room
随机推荐
Dynamic address book
Hands on deep learning (39) -- gating cycle unit Gru
智能网关助力提高工业数据采集和利用
【FAQ】华为帐号服务报错 907135701的常见原因总结和解决方法
libmysqlclient. so. 20: cannot open shared object file: No such file or directory
Doris / Clickhouse / Hudi, a phased summary in June
Hands on deep learning (37) -- cyclic neural network
【OpenCV 例程200篇】218. 多行倾斜文字水印
Matlab tips (25) competitive neural network and SOM neural network
Work order management system OTRs
[200 opencv routines] 218 Multi line italic text watermark
How web pages interact with applets
【Day2】 convolutional-neural-networks
Hands on deep learning (34) -- sequence model
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
MongoDB数据日期显示相差8小时 原因和解决方案
基于线性函数近似的安全强化学习 Safe RL with Linear Function Approximation 翻译 2
Devop basic command
Tables in the thesis of latex learning
MySQL case