linux - Replace all content of file with the content of another file -


is there way replace content of file content of file without destroying first file?

if have file in current directory called myfile.txt, if following:

cp updatedfiles/myfile.txt myfile.txt

then old file deleted , replaced new file (with same name). not want delete existing file, want change content of file. how this?

cat updatedfiles/myfile.txt > myfile.txt 

Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -