1.创建目录:
[root@rhcsa ~]# mkdir test
[root@rhcsa ~]# cd test
[root@rhcsa test]# touch text1.txt text2.txt
[root@rhcsa test]# vim text1.txt
编辑模式:
1 Welcome to my Linux.
2 You are the best.
3 This is my first file to create on linux
末行模式:
:set nu
:% s/my/your/g
:w new_test1.txt
建立连接:
[root@rhcsa test]# cp ./* /root/test2
[root@rhcsa test]# mv test1.txt test111.txt
[root@rhcsa test]# ln -s test111.txt test111_symb.txt
[root@rhcsa test]# ln test111.txt test111_hard.txt
[root@rhcsa test]# rm text1.txt
[root@rhcsa test]# cd ..
2.输出内容并保存:
[root@rhcsa ~]# echo "This is my first time to use pipe" | tee pipe_data.txt
3.文件内容浏览:
[root@rhcsa ~]# cat -n/etc/password
[root@rhcsa ~]# more -10/etc/password
[root@rhcsa ~]# less -10/etc/password
[root@rhcsa ~]# head -5 /etc/password
[root@rhcsa ~]# tail -5 /etc/password