Linux的四个命令
1、echo命令(类似python的print("hello world"))
例子:echo "hello world"
2、``,反引号符(这个符号位于键盘的Tab键上边)
例子:echo `pwd` 可使 pwd 指令的结果输出
3、tail命令
作用:查看文件末尾行内容
tail [-f -num] 参数
选项:-f 表示跟踪(follow)
参数:文件路径
例子:tail -5f test.txt 表示跟踪test.txt文件的后五行
4、“>”和“>>”命令
名称:重定向符
作用:将符号左侧内容写入右侧文件,“>”覆盖写入(原本内容会被覆盖),“>>”追加写入
例子:(1)echo "hello world" > test.txt
(2)echo "Today is a good day" >> test.txt
(3) ls -l >> test.txt (将当前目录下的文件写入test.txt)