'touch' is not recognized as an internal or external command, operable program or batch file

后端 未结 9 1082
失恋的感觉
失恋的感觉 2020-12-13 17:56

I work with laravel 5 , when i type in windows cmd this command \"touch storage\\database.sqlite\" this error message rise \'touch\' is not recognized as an internal or ex

相关标签:
9条回答
  • 2020-12-13 18:22

    if you are using node.js just use npm to install it on Windows:

    C:\npm install touch-cli -g
    

    it will install the command line interface for touch, you can then use it the same as unix...

    0 讨论(0)
  • 2020-12-13 18:26

    If you are trying to use TypeScript in ReactNative first run:

    npm install touch-cli -g
    

    and then you can use touch, example:

    touch rn-cli.config.js
    
    0 讨论(0)
  • 2020-12-13 18:28

    enter image description here

    ex: type nul >test.html in windows CMD & another one ways is

    echo.>test.html

    both are working 100% fine

    0 讨论(0)
  • 2020-12-13 18:32

    The command you're trying to run is a unix/linux based command so it won't work in Windows.

    All it does is update the modified timestamps of a file.

    There's another question on here that gives you an alternative for Windows: https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716

    0 讨论(0)
  • 2020-12-13 18:36

    Just run it through the GitBash terminal on windows and it works fine

    0 讨论(0)
  • 2020-12-13 18:37

    If you are on windows device just install git bash and type the following command

    touch test.html.
    

    The above command will generate a zero kilobyte test.html file for you in your specified directory. It is applicable to any other type of file.

    0 讨论(0)
提交回复
热议问题