By using Greg's answer, you can simply have sync run in background while displaying the state of the Dirty block in memory.
To achieve this, simply run this command:
sync & watch -n 1 grep -e Dirty: /proc/meminfo This will call sync in the background while executing watch in the front. When the sync command will have finished (around when the size of the Dirty block has reached 0), you will have an output that looks like this :
1] + 27260 done sync This means that the command has finished and you can kill the watch command with Ctrl+CCtrl+C.