What is the purpose of the : (colon) GNU Bash builtin?

前端 未结 12 869
梦如初夏
梦如初夏 2020-11-22 14:01

What is the purpose of a command that does nothing, being little more than a comment leader, but is actually a shell builtin in and of itself?

It\'s slower than inse

12条回答
  •  日久生厌
    2020-11-22 14:18

    If you'd like to truncate a file to zero bytes, useful for clearing logs, try this:

    :> file.log
    

提交回复
热议问题