The
trim
utility erases specified region of the device.
It is mostly relevant for storage that implement trim (like flash based,
or thinly provisioned storage).
All erased data is lost.
The following options are available:
| -N
|
| |
Do not actually erase anything but show what it would do (dry run).
Implies
-v.
This is the default.
Overrides
-f.
|
| -f
|
| |
Perform the operation.
Overrides
-N.
|
| -l
|
| |
offset[K|k|M|m|G|g|T|t] |
| -o
|
| |
offset[K|k|M|m|G|g|T|t]Specify the length
-l
of the region to trim or its offset
-o
from the beginning of the device.
The whole device is erased by default
unless one or both of these options are presented.
The argument may be suffixed with one of
K,
M,
G
or
T
(either upper or lower case) to indicate a multiple of
Kilobytes, Megabytes, Gigabytes or Terabytes
respectively.
|
| -q
|
| |
Do not output anything except of possible error messages (quiet mode).
Overrides
-v.
|
| -r rfile
|
| |
Uses the length of given
rfile
as length of the region to erase.
The whole device is erased by default.
|
| -v
|
| |
Show offset and length of actual region being erased, in bytes.
|
Later options override previous ones.
Note that actual success of the operation depends of underlying
device driver such as
ada(4),
da(4)
and others.
Refer to corresponding manual pages for detail on possible caveats
in low level support for ATA TRIM or SCSI UNMAP commands.