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

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -