Linux5-echo,>,tail

1.echo命令

echo是输出命令,类似printf

例如:echo "hello world",输出hello world

echo 'pwd',输出pwd的位置。''是键盘上~

2.重定向符> >>

>指把左边内容覆盖到右边

echo 'hello world'>test.txt

>>把左边内容追加到右边

3.tail命令

tail用于查看末尾内容,默认为末尾10行

例如:tail test.txt

选项-num,例如tail -5 test.txt,查看末尾5行

选项-f,例如tail -f test.txt,实时跟踪(如果添加数据,这里立即显示,如果要退出追踪,按Ctrl+c)

相关推荐
toradexsh37 分钟前
NXP iMX8MP ARM 平台多屏幕克隆显示测试
linux·arm·nxp·toradex·imx8mp
jjkkzzzz1 小时前
Linux下的c/c++开发之操作mysql数据库
linux·数据库·mysql·c/c++
Watink Cpper1 小时前
[Linux]多线程(二)原生线程库---pthread库的使用
android·linux·运维·原生线程库·pthread库
mljy.1 小时前
Linux《进程控制》
linux
chennalC#c.h.JA Ptho3 小时前
archlinux 详解系统层面
linux·经验分享·笔记·系统架构·系统安全
python算法(魔法师版)3 小时前
Docker容器启动失败?无法启动?
linux·运维·nginx·docker·容器
酷爱码3 小时前
Ubuntu日志文件清空的三种方式
linux·运维·ubuntu
狄加山6757 小时前
Linux Input子系统与驱动开发实战
linux·运维·驱动开发
小刘|7 小时前
对称加密以及非对称加密
linux·运维·网络
Levin__NLP_CV_AIGC9 小时前
更新 / 安装 Nvidia Driver 驱动 - Ubuntu - 2
linux·运维·ubuntu