Forrest logo
back to the fstrim tool

fstrim:tldr:9caad

fstrim: Trim unused blocks on a specified partition.
$ sudo fstrim ${-}
try on your machine

The command sudo fstrim ${-} is used to run the fstrim command with root privileges.

fstrim is a command in Linux used to trim unused blocks on a mounted filesystem. It is used to discard blocks that are no longer needed, freeing up storage space and improving performance.

The ${-} syntax is used to reference the current command line options used by the shell. In this case, it is used to pass the current shell options to the fstrim command, ensuring that any necessary options or flags are passed correctly.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the fstrim tool