sync

Flushes all pending write operations to the appropriate disks. More information: https://www.gnu.org/software/coreutils/manual/html_node/sync-invocation.html.

sync

sync {{path/to/file}}

sync; echo 3 | sudo tee /proc/sys/vm/drop_caches

sync; sudo purge