TRIM Force Script

JKingsnorth
Contributor

Has anyone wrote a script that enables TRIM Force for 3rd Party SSD's using sudo trimforce enable?

3 REPLIES 3

RiotMac
New Contributor

sudo yes | trimforce enable

russeller
Contributor III

TIL about the yes command

YES(1)                    BSD General Commands Manual                   YES(1)

NAME
     yes -- be repetitively affirmative

SYNOPSIS
     yes [expletive]

DESCRIPTION
     yes outputs expletive, or, by default, ``y'', forever.

HISTORY
     The yes command appeared in 4.0BSD.

4th Berkeley Distribution        June 6, 1993        4th Berkeley Distribution

guillaumegete
New Contributor III

That's a pretty awesome use of the yes command. Would have never thought about it (I would have gone the expect way…) :-D