how to copy a file without remove the contents of the target file?

Hello every body,
Kindly support me to "copy a file without remove the contents of the target file"

Thanks in advance. :slight_smile:

Ahmed Amer
Cairo,Egypt

cat source >> target

Your question is somewhat vague. Please elaborate.

1 Like

I have a file in the path /Desktop/file.txt
then when i run
#cat /Desktop/file.text
Hello
welcome to unix

and i have another file /Desktop/file2.txt
when i run
#cat /Desktop/file2.txt
Welcome to Egypt

I want to copy the contents of /Desktop/file1.txt to /Desktop/file2.txt WITHOUT removing the contents of Desktop/file2.txt
i.e. to get the following results after i run the following command:
#cat /Desktop/file2.txt
welcome to unix
welcome to Egypt