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

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -