背景
在阅读k8s资源配置yaml中,看到command中有-c,如 command: ["/bin/sh","-c","touch /tmp/hello.txt;while true;do /bin/echo $(date +%T) >> /tmp/hello.txt; sleep 3; done;"]
作用
就是把-c 后面的字符串做为命令使用
背景在阅读k8s资源配置yaml中,看到command中有-c,如 command: ["/bin/sh","-c","touch /tmp/hello.txt;while true;do /bin/echo $(date +%T) >> /tmp/hello.txt; sleep 3; done;"]作用就是把-c 后面的字符串做为命令使用例如...
在阅读k8s资源配置yaml中,看到command中有-c,如 command: ["/bin/sh","-c","touch /tmp/hello.txt;while true;do /bin/echo $(date +%T) >> /tmp/hello.txt; sleep 3; done;"]
就是把-c 后面的字符串做为命令使用
更多推荐
所有评论(0)