Skip to content
Advertisement

Tag: fflush

awk in non-interactive is leaving some data missing

I’m running an awk command in a shell script, and it’s breaking the datafile. All of the data doesn’t load, and there’s a newline character at the end of each line. If I run this as a command, it works perfectly. I’ve just found that i can use fflush() and it seems to have solved the issue. So now i

Force write of a file to disk

I’m currently implementing a ping/pong buffering scheme to safely write a file to disk. I’m using C++/Boost on a Linux/CentOS machine. Now I’m facing the problem to force the actual write of the file to disk. Is it possible to do so irrespective of all the caching policies of the filesystem (ext3/ext4) / SO custom rules / RAID controller /

Advertisement