What is /bin/true?

后端 未结 6 935
谎友^
谎友^ 2020-12-24 00:29

On a Linux system, what is /bin/true? What is it used for?

6条回答
  •  攒了一身酷
    2020-12-24 00:58

    I've seen it used to fool a system operation into thinking a command has run when it hasn't. If a command is faulty eg looping, you can replace it with a symlink to 'true' to get the master job to run. Only a good idea if the job replaced isn't essential.

提交回复
热议问题