3 ms·
The phrasing matters, but in general on a command line I take it as imperative commands or queries. Statements of what should happen (not what state should beco
by Jtsummers 5y ago
The phrasing matters, but in general on a command line I take it as imperative commands or queries. Statements of what should happen (not what state should become true) or queries about the state of the system. "resize" suggests that the size should be changed, the error would be if 500GB can't be allocated for the file. If it were already 500GB it amounts to a no-op (though you could signal that this is the case, it shouldn't be an error because the file is the appropriate size already).
A declarative form might be ensure-size 500G file. With that it's clearer that you expect a no-op in the case the file is already the desired size. It could be the exact same command under the hood, but the name suggests a different perspective. Specifically that no-ops are in the set of expected and desirable actions that might come from the command.