How to override the CMD command in the docker run line
The right way to do it is deleting cmd [“…”] docker run –name test test/test-backend /srv/www/bin/gunicorn.sh
The right way to do it is deleting cmd [“…”] docker run –name test test/test-backend /srv/www/bin/gunicorn.sh
Use the command start with switch /min to start cmd in minimized window: start /min cmd /c “full path to my batch file”
It tells taskkill that the next parameter something.exe is an image name, a.k.a executable name C:\>taskkill /? TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F] Description: This tool is used to terminate tasks by process id (PID) or image name. Parameter List: /S system Specifies … Read more
The following command1 && command2 should work on cmd as well. Quote from here: When using cmd.exe, you can put multiple commands on the same line by using ‘&’ or ‘&&’ between commands. Using a single ampersand (&) will cause the first command and then the second command to be run in sequence. Using double … Read more
You may want to invoke CD with the /d option, thus not only changing the current directory on drive c: but also going there (in case you are not already on that drive). cmd /c “cd /d c:\temp && dir”
2015-03-30: Edited – Missing information has been added To retrieve the current directory you can use the dynamic %cd% variable that holds the current active directory set “curpath=%cd%” This generates a value with a ending backslash for the root directory, and without a backslash for the rest of directories. You can force and ending backslash … Read more
To remove the path from the prompt use ‘prompt $g’ which will just show the chevron. You can then use the ‘cd’ command anytime to see the directory you are in. E.g. C:\Windows\System32\drivers\etc>prompt $g > >cd C:\Windows\System32\drivers\etc >
start “MY EXE” my.exe That kicks the exe off in the background (and avoids title issues, see below). The start command offers some options too, use start /? to list them: C:>start /? Starts a separate window to run a specified program or command. START [“title”] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] [/LOW … Read more
The runas command does not allow a password on its command line. This is by design (and also the reason you cannot pipe a password to it as input). Raymond Chen says it nicely: The RunAs program demands that you type the password manually. Why doesn’t it accept a password on the command line? This … Read more
Delete all files with extension .tmp in current folder: On Windows: del *.tmp On Mac: rm -rf ./*.tmp Delete all files with extension .tmp in current folder Recursively (including sub-folders): On Windows: del /s *.tmp On Mac: find . -name ‘*.tmp’ -delete