目的
这篇主要讲解一些基础的指令,大致上预计要讲的是
12. cat 指令
13. grep 指令
开头依样是在 c槽的 Linux_test 资料夹里面测试
输入指令: cd /mnt/c/Linux_test
cd /mnt/c/Linux_test
Linux_test 资料夹内有两个东西 test1 、 test2
cat 指令
在测试 cat 前
用记事本将 test1 写上 "Try the cat order"
用记事本将 test2 写上 "new information"
cat 的功能用 Help 来看
输入指令: cat --help
cat --help
Usage: cat [OPTION]... [FILE]...Concatenate FILE(s) to standard output.With no FILE, or when FILE is -, read standard input.
功能
简单来讲就是显示文件内容
用法
用法有一种
测试指令
看看 test1 的内容
/mnt/c/Linux_test$ cat test1Try the cat order
看看 test1 test2 的内容
输入指令: cat test1 test2/mnt/c/Linux_test$ cat test1 test2Try the cat ordernew information
grep 指令
在测试 grep 前
用记事本将 test1 写上 "Try the cat order"
用记事本将 test2 写上 "new information"
grep 的功能用 Help 来看
输入指令: grep --help
grep --help
Usage: grep [OPTION]... PATTERN [FILE]...Search for PATTERN in each FILE.
功能
简单来讲就探索文件内容 是否有指定的字串
用法
用法有一种
grep 探索字串 文件1 文件2 ..........
测试指令
test1 内容为 "Try the cat order"
test2 内容为 "new information"
输入指令: grep or test1 test2
grep or test1 test2
在 test1 和 test2 内探索字串 "Try"
输入指令: grep Try test1 test2
grep Try test1 test2
大致上 入门指令就到这里 谢谢看到这里。
Vim 的东西待补