Can we append instead of overwrite?

QuestionsQuestions4 SkillsProRedirect Input and OutputSep, 20 2025
0318

The cp command does not support appending to files directly. It can only overwrite existing files. If you want to append content to a file, you can use the >> operator in the shell. For example:

echo "New content" >> backup/apple.txt

This command will append "New content" to backup/apple.txt without overwriting the existing content.

0 Comments

no data
Be the first to share your comment!