Is there something that allows me to move just the content of a file, and save it in another file? I know there is copytruncate, but I can't use logrotate in my setup. The file the content is moved from, has to stay as it is. Just the lines written would be transferred to another file. I need something that i can put in a bash script.
I am not sure if this is the best way but you can try
cat file > new_file truncate -s0 file
If the files are huge then you should keep looking for a better way.