Linux append command to the end of the file (reproduced)

Linux append command to end of file

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

Note: >> is an append

echo 'add content'>/home/data/test.sh
  • 1

Note: > is to delete the original content, add

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325985158&siteId=291194637