touch、echo的使用
原创...小于 1 分钟
touch
touch 命令在 Linux 操作系统中用于创建文件或修改文件的时间戳
如果指定的文件不存在,则会创建一个新的空白文件
file.txt
的新文件
创建名为 touch file.txt # 不存在则会新建
file.txt文件
的时间戳
更改 touch file.txt ## file.txt 已经存在
创建三个名为 file1.txt、file2.txt 和 file3.txt 的文件
touch file1.txt file2.txt file3.txt
echo
echo 用于在终端上输出一些文本信息
在终端上输出字符串
echo "Hello,Linux!"
输出到文件
echo "Hello, Linux!" > ./myfile.txt
Powered by Waline v2.15.7