How to use trim command ?

Eugene Grosbein eugen at grosbein.net
Sat Dec 1 00:36:38 UTC 2018


01.12.2018 6:56, Ian Lepore wrote:

> And therein lies yet another reason why trim is such a horrible name
> for this tool: nothing about the word trim implies destroying live
> useful information. In idiomatic English, the word drips with overtones
> of removing only the unneeded excess from something.

That's because it defaults to dry run and its manual pages
emphasizes data imminent destruction several times, in bold.

newfs destroys data too, cat > /dev/da0 does this too,
add the name "dd" itself does not imply data destruction.

Can you invent better name?

> Truly, dd (with its 30+ years of association of being THE tool that
> operates on disk devices or specified sub-ranges of blocks within them)
> is the place for such functionality.

In fact, I like both. Sometimes it's handy to use dd while dealing with
zero blocks inside an image (or /dev/zero) written to single device file.
And sometimes it may be useful to be able to "trim /dev/da0 /dev/ada0" with one call.



More information about the freebsd-hackers mailing list