回答:
コマンドは:>それだけではありません:。bash(およびおそらく他のいくつかのシェル)では、組み込みのno-opコマンドです。>(最初に切り捨て)出力をファイルにリダイレクトします。に:は出力がないため、コマンドラインの最終結果は長さ: > file.logがfile.logゼロになります。
私のローカルbashmanページから:
: [arguments]
No effect; the command does nothing beyond expanding arguments
and performing any specified redirections. A zero exit code is
returned.