Linux 使用echo向文件末尾追加命令

//echo后边用单引号包围要添加的内容
echo 'add content'>>/home/data/test.sh

注意>>表示在原来的文件末尾上进行追加,如果使用的是>则表示删除原来的内容之后再添加:

echo 'add content'>/home/data/test.sh
posted @ 2019-01-19 14:50  youngliu91  阅读(6987)  评论(0编辑  收藏  举报