当前位置:网站首页>Rhcsa day 3 operation
Rhcsa day 3 operation
2022-04-23 02:36:00 【Enron tears】
1、 Create directory test
In two ways test Create a text file in the directory text1.txt,text.txt
[root@localhost ~]# mkdir test [root@localhost ~]# cd test [root@localhost test]# touch text1.txt [root@localhost test]# vim text.txt [root@localhost test]# ls text1.txt text.txt
Use vim In the file text.txt writes
Welcome to my Linux. You are the best. This is my first file to create on linux.
[root@localhost test]# vim text.txt # Get into vim After editor , Press a Key to enter edit mode , When the input is complete, press Esc Key to exit edit mode , Press again :wq Save and exit vim Welcome to my Linux. You are the best. This is my first file to create on linux.
set nu , And put it in the text my Replace with your, Save the file as new_test1.txt
# Get into vim Post press : key , Enter last line mode , Input set nu set nu # Enter... In last line mode %s/my/your/g, You can put the in the full text my Replace with your # Enter... In last line mode w new_test1.txt, You can save the file as
take test Copy the files in to test2 Catalog
[root@localhost ~]# cp -a test test2
take test2 In the directory text1.txt Rename it to text111.txt
[root@localhost ~]# cd test2 [root@localhost test2]# mv text1.txt text111.txt
stay test2 Create a new text111.txt Soft link file for test111Symb.txt
[root@localhost test2]# ln -s text111.txt test111symb.txt
stay test2 Create a new test111.tbxt Hard link file for test111hard.txt
[root@localhost test2]# ln text111.txt test111hard.txt
Delete test Directory test1.txt
[root@localhost test]# rm -rf test1.txt
Delete test Catalog
[root@localhost ~]# rm -rf test
2、 take echo"This is my first time to use pipe" Output content to the screen , And save it to pipe_data.txt in
[root@localhost ~]# echo "This is my first time to use pipe" | tee pipe_data.txt This is my first time to use pipe [root@localhost ~]# more pipe_data.txt This is my first time to use pipe
3、 File content browsing
a.cat see /etc/passwd The contents of the document , And output with line number
[root@localhost ~]# cat -n /etc/passwd
b. Use more/less see /etc/passwd Content , And each page displays 10 That's ok
more command : [root@localhost ~]# more -10 /etc/passwd less command : [root@localhost ~]# less -10 /etc/passwd
c. Use head/tail Before viewing the files separately 5 Line content and after 5 Row content
head Command before viewing the file 5 Row content : [root@localhost ~]# head -5 /etc/passwd root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin tail Command to view the file 5 Row content : [root@localhost ~]# tail -5 /etc/passwd gdm:x:42:42::/var/lib/gdm:/sbin/nologin gnome-initial-setup:x:975:975::/run/gnome-initial-setup/:/sbin/nologin tcpdump:x:72:72::/:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin redhat:x:1000:1000:redhat:/home/redhat:/bin/bash
版权声明
本文为[Enron tears]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220815166644.html
边栏推荐
- arduino esp8266 网络升级 OTA
- [xjtu Computer Network Security and Management] session 2 Cryptographic Technology
- 谷雨
- 001_ Redis set survival time
- The importance of ERP integration to the improvement of the company's system
- Efficient music format conversion tool Music Converter Pro
- leetcode 烹饪料理
- SQL server2019 cannot download the required files, which may indicate that the version of the installer is no longer supported. What should I do
- The usage and difference of * and & in C language and the meaning of keywords static and volatile
- C standard library - < time h>
猜你喜欢
![[XJTU计算机网络安全与管理]第二讲 密码技术](/img/b0/263e8dcbfeb2ce9f504a9c8eb76b07.png)
[XJTU计算机网络安全与管理]第二讲 密码技术

JVM运行时数据区(一)

The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game

How to prevent leakage of operation and maintenance data

1、 Sequence model

Arduino esp8266 network upgrade OTA

每日一题冲刺大厂第十六天 NOIP普及组 三国游戏

A domestic image segmentation project is heavy and open source!

Target narak

Yes, from today on, our fans can participate in Netease data analysis training camp for free!
随机推荐
JVM类加载器
New book recommendation - IPv6 technology and application (Ruijie version)
012_ Access denied for user ‘root‘@‘localhost‘ (using password: YES)
The importance of ERP integration to the improvement of the company's system
Jupyter for local and remote access to ECS
[NK] Niuke monthly race 48 D
C # import details
Efficient music format conversion tool Music Converter Pro
JVM运行时数据区(一)
本地远程访问云服务器的jupyter
Push data from onenet cloud platform to database
JVM class loader
IAR嵌入式開發STM32f103c8t6之點亮LED燈
C standard library - < time h>
MySQL JDBC programming
认识进程(多线程_初阶)
【2019-CVPR-3D人体姿态估计】Fast and Robust Multi-Person 3D Pose Estimation from Multiple Views
【ValueError: math domain error】
解决 注册谷歌邮箱 gmail 手机号无法用于验证
1、 Sequence model