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

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

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

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -