From c1e7809b631fafce7880fb812ea6619bc22c9336 Mon Sep 17 00:00:00 2001 From: Fazle Arefin Date: Thu, 12 Jun 2025 11:31:20 +1000 Subject: [PATCH] sync: add examples (#16822) --- pages/common/sync.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/sync.md b/pages/common/sync.md index c9fb0334eb..26d983ada1 100644 --- a/pages/common/sync.md +++ b/pages/common/sync.md @@ -10,3 +10,11 @@ - Flush all pending write operations on a single file to disk: `sync {{path/to/file}}` + +- Flush writes and drop file system caches (Linux only): + +`sync; echo 3 | sudo tee /proc/sys/vm/drop_caches` + +- Flush disk writes and attempts to clear inactive memory and filesystem caches (macOS only): + +`sync; sudo purge`