Can we append instead of overwrite?

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!