From 3b9eac1edbf55ac2154c0a117c0120325497e42d Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Sun, 18 Feb 2024 06:07:16 -0800 Subject: [PATCH] :memo: Added notes on how best to fstrim --- fstrim_howto.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 fstrim_howto.md diff --git a/fstrim_howto.md b/fstrim_howto.md new file mode 100644 index 00000000..9199a0a8 --- /dev/null +++ b/fstrim_howto.md @@ -0,0 +1,17 @@ +## FSTRIM BASICS + +fstrim should be run regularly to clean up disk space. +You can think of it as a more modern form of disk defragmentation. +It potentially can extend the life of an ssd hard drive. + +fstrim should be run once a week, but should also not be more often. +The most basic essential command to run fstrim is: + +```bash +sudo fstrim -a -v -m 1MB +``` + +Be conscientious when running fstrim like this, as the -a flag indicates we wish +to run fstrim on all mounted file systems that accept this command. The -m 1MB +indicates we wish to only trim in minimum of 1 megabyte chunks. The -v flag +indicates we wish to see 'verbose' output (like many UNIX/UNIX-like commands).