We have one option in our application in QT to transfer the data to USB disk using system command as below
QProcess process; QStringList args; QDir dir("/media/sda1/"); dir.mkdir("ea1503"); args << "-c" << "tar czvf /media/sda1/ea1503/agd3100logfiles.tgz `find /home/root/log/*.agd -mtime -30`"; process.start("/bin/sh", args); process.waitForFinished(-1); // will wait forever until finished
The function comes out of waitforfinished but complete data is not copied to USB disk. How we can ensure that the data is first flushed in USB and then waitforfinished.
Is there any command(QT/Linux) to flush the data to USB.