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

懵懂的女人 提交于 2019-12-20 10:34:22

问题


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 external command, operable program or batch file. any hint to solve it ?


回答1:


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...




回答2:


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




回答3:


You can just use echo> in windows cmd i.epath/file.sqlite




回答4:


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

echo.>test.html

both are working 100% fine




回答5:


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.




回答6:


Fixed after running this command:

npm install touch-cli -g

After that I can run this:

touch .babelrc



回答7:


, used with copy to indicate missing parameters. This updates the files modified date. E.G. copy /b file1,,




回答8:


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




回答9:


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


来源:https://stackoverflow.com/questions/36126269/touch-is-not-recognized-as-an-internal-or-external-command-operable-program-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!