Start a scrub, but wait until the scrub finishes before exiting

btrfs scrub

  • Scrub btrfs filesystems to verify data integrity.
    It is recommended to run a scrub once a month.
    More information: <https://btrfs.readthedocs.io/en/latest/btrfs-scrub.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sudo btrfs scrub start -B {{path/to/btrfs_mount}}

click the source code to copy install btrfs scrub on any operating system with command-not-found.com