I am attempting to gather a day's worth of thermal data from a thermal camera. This obviously will need more data than the sd card can handle so I have a 1 TB hard drive I have setup using ntfs-3g (with exec option).
When I run my script and either fprintf redirect (./script > file.txt) the output to a location on the HD the file is created, but it is always empty.
Running ./script sends the expected thermal data to the terminal. I have looked all over the internet for similar problems, but I'm not finding them. What have I messed up here?
My data gathering program does not end, I kill it with CTRL-C.
If I wait long enough (a minute or so) files with multiples of 4096 bytes (the block size of the disc, confirmed by "blockdev --getbsz /dev/sda1") will begin to appear.
Some of the initial tests only waited ~5 to 10 seconds with the purpose of making sure the process was working. From what I can tell, when I kill the process with control C, any pending writes are also killed.
The "disc queue" does not write out to disk until it hits a block. So when my script runs for a day, I will probably lose the last minute of data, but that is alright.
I could look into reformatting the disc to a smaller block size, but honestly losing one minute out of around 10 hours of data does not concern me.