1、创建文件
touch myfile.txt
2、写入文件内容(会覆盖原有内容)
echo 'this is first writing'>myfile.txt
3、向已有文件内容中追加内容
echo 'this is second writing'>>myfile.txt
touch myfile.txt
echo 'this is first writing'>myfile.txt
echo 'this is second writing'>>myfile.txt
本文标题:Linux 向文件中写入内容
本文链接:https://www.haomeiwen.com/subject/nfmuohtx.html
网友评论