zoukankan      html  css  js  c++  java
  • What does cmd /C mean? [closed] 关于nodejs的子进程部分

    之前一直很不明白为什么 

    child_process.spawn(command[, args][, options])

    • shell <Boolean> | <String> If true, runs command inside of a shell. Uses '/bin/sh' on UNIX, and 'cmd.exe' on Windows. A different shell can be specified as a string. The shell should understand the -c switch on UNIX, or /d /s /c on Windows. Defaults to false (no shell).

    对shell的解释!!!

    尤其是 /d /s /c 到底是什么鬼???

    后来我google终于明白了!!!

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    
    C:>cmd /?
    Starts a new instance of the Windows XP command interpreter
    
    CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
        [[/S] [/C | /K] string]
    
    /C      Carries out the command specified by string and then terminates
    /K      Carries out the command specified by string but remains
    /S      Modifies the treatment of string after /C or /K (see below)
    /Q      Turns echo off
    /D      Disable execution of AutoRun commands from registry (see below)
    /A      Causes the output of internal commands to a pipe or file to be ANSI
    /U      Causes the output of internal commands to a pipe or file to be
            Unicode
    /T:fg   Sets the foreground/background colors (see COLOR /? for more info)
    /E:ON   Enable command extensions (see below)
    /E:OFF  Disable command extensions (see below)
    /F:ON   Enable file and directory name completion characters (see below)
    /F:OFF  Disable file and directory name completion characters (see below)
    /V:ON   Enable delayed environment variable expansion using ! as the
            delimiter. For example, /V:ON would allow !var! to expand the
            variable var at execution time.  The var syntax expands variables
            at input time, which is quite a different thing when inside of a FOR
            loop.
    /V:OFF  Disable delayed environment expansion.
  • 相关阅读:
    读取列表下标
    字典dict详解
    使用mysql的长连接
    oauth授权协议的原理
    安装性能测试工具:sysbench和使用apache的ab
    发送邮件出现问题
    获取用户的真实ip
    清理代码的阅读笔记
    开发中三个经典的原则
    要干大事就不能把面子看得太重
  • 原文地址:https://www.cnblogs.com/huenchao/p/6215151.html
Copyright © 2011-2022 走看看