587

Use a semicolon to chain commands in PowerShell: ipconfig /release; ipconfig /renew


315

This is a little late but I just ran across this question while searching for the answer myself and I found this: START /B program which, on Windows, is the closest to the Linux command: program & From the console HELP system: C:\>HELP START Starts a separate window to run a specified program or command. START ["title"] [/D path] [/I] [/MIN] [/...


259

Fixed it by removing it automatically on the settings page. Under Apps and Features, there are an application execution aliases. I am running the latest 1903 update.


238

I'm not sure why you need beep. If all you want is a stopwatch, you can do this: while true; do echo -ne "`date`\r"; done That will show you the seconds passing in realtime and you can stop it with Ctrl+C. If you need greater precision, you can use this to give you nanoseconds: while true; do echo -ne "`date +%H:%M:%S:%N`\r"; done Finally, if you really, ...


209

The second cmd.exe fails to locate and subsequently load the localized strings from the cmd.exe.mui satellite resource library. Here is what it really attempts to say, taken from a 10.0.18362.1 (160101.0800): 0x235F: "Volume in drive %1 is %2" 0x235B: "Volume Serial Number is %1" 0x2339: "Directory of %1" This is actually the first three lines of a plain ...


203

Note: You likely need to do the following commands in an administrative cmd/powershell prompt. If you have choco 0.9.9.6+, you can use the outdated command. choco outdated If you have 0.9.9+ installed: choco upgrade all --noop If you have version 0.9.8.33 or below installed: choco version all Following that, if you actually want to upgrade - you can ...


198

As mentioned by @edvinas.me, stat tells you various information about the file including the last modified date. At first, I was confused with Modify and Change, just to clarify, stat output lists: Access shows the time of last data access (e.g. read). Modify shows the time of last data modification. Change shows the time the file status last changed. ...


197

You can remove just the offending line from bash's history, instead of clearing the entire history. Simply remove the line with the -d flag, then save (write) the new history with the -w flag: $ history 351 ssh me@site.com 352 my_password $ history -d 352 $ history -w


195

NO, But you can use CLS command to clear the whole screen, Esc (Escape) key will clear the input line. In addition, pressing Ctrl + C will move the cursor to a new blank line.


194

find . -name "*.tif" -type 'f' -size -160k -delete Run the command without -delete first to verify that the correct files are found. Note the - before 160k. Just 160k means exactly 160 kilobytes. -160k means smaller than 160 kilobytes. +160k means larger than 160 kilobytes. The -type 'f' forces the command to only act on files and skip directories. this ...


182

To complement the previous answer, if you're using Powershell echo %PATH% would not work. You need to use the following command instead: echo $Env:PATH


179

You can use the user command : truncate truncate -s 0 test.txt ("-s 0" to specify the size) http://www.commandlinefu.com/commands/view/12/empty-a-file


166

Use truncate: truncate -s 14M filename From man truncate: DESCRIPTION Shrink or extend the size of each FILE to the specified size [...] -s, --size=SIZE set or adjust the file size by SIZE Note: truncate may not be available on your system, e.g. on Mac OS X it's not installed by default (but you can easily install it, using macports for ...


158

As other people mentioned, putting -ss before (much faster) or after (more accurate) the -i makes a big difference. The section "Fast And Accurate Seeking" on the ffmpeg seek page tells you how to get both, and I have used it, and it makes a big difference. Basically you put -ss before AND after the -i, just make sure to leave enough time before where you ...


156

I found that for me the best tool for the job is rsvg-convert. It can be found in brew with brew install librsvg and is used like this: rsvg-convert -h 32 icon.svg > icon-32.png (This example creates a 32px high png. The width is determined automatically.


156

Give mediainfo a try. On the command line type mediainfo input.mkv. For more detailed video information mediainfo --fullscan input.mkv. Output example: General Unique ID : 239093944660469735839645243666869007606 (0xB3DFD199E22F0E7CBAE1FE52206834F6) Complete name : input.mkv Format ...


153

The documentation wasn't very clear to me, but it had the answer, the challenge was not being able to see an example. Here's how to do it: openssl aes-256-cbc -in some_file.enc -out some_file.unenc -d -pass pass:somepassword Notice that the command line command syntax is always -pass followed by a space and then the type of passphrase you're providing, i....


149

Even though the Notepad++ directory is not in your path, you can use the command below to run the program from the command prompt: start notepad++ To open a file in Notepad++, run: start notepad++ <filename>


146

Run the following command (could require elevated privileges / open command prompt as administrator): del "\\?\F:\._." About the \\?\ prefix: For file I/O, the "\\?\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system. ... Because it turns off ...


138

You could use a DNS request instead of HTTP request to find out your public IP: C:\> nslookup myip.opendns.com. resolver1.opendns.com It uses resolver1.opendns.com dns server to resolve the magical myip.opendns.com. hostname to your ip address. (Note: the trailing . on the lookup prevents search domains from being appended, which can yield incorrect ...


130

You would write it as such: if [ -f "/usr/bin/wine" ]; then export WINEARCH=win32; fi Note that this could also be written (as suggested by @glennjackman): [ -f "/usr/bin/wine" ] && export WINEARCH=win32


124

Simply use brace expansion: mv /folder1/folder2/folder3/{file.txt,file-2013.txt} This is equivalent to writing: mv /folder1/folder2/folder3/file.txt /folder1/folder2/folder3/file-2013.txt Brace expansion lets you supply more arguments, of course. You can even pass ranges to it, e.g. to create a couple of test folders, you can run mkdir test_{a..z}, and ...


121

There are two parts to this: bash stores the history in a file ~/.bash_history which is, by default, written to at the end of the session the history that is kept in memory To be safe, you need to clear it from the session: history -c and truncate the history file as needed: > ~/.bash_history If your session in which you typed the password is still ...


115

My favorite way is: Start: time cat Stop: ctrl+c As @wjandrea commented below, another version is to run: time read and press Enter to stop


112

Taken from this website: The WSL has access to your PC’s file system through /mnt/<drive letter>/ directories (or mount points). For example, your C:\ and D:\ root directories in Windows would be available through /mnt/c/ and /mnt/d/ respectively in the WSL Just cd into the /mnt folder and you'll be fine


112

I have managed to duplicate the problem: (I agree that the messages are not very informative.) The problem is that starting from Vista all the text messages are compiled into a separate file, so Windows would search for a message file with your new CMD name and would not be able to find it. It is not enough to copy cmd.exe to cmd-2.exe. You also need to ...


109

There is no reason to 'unload' the sshd service, when instead you can just 'Stop' the sshd service. It will restart on it's own. sudo launchctl stop com.openssh.sshd


107

As some of the other answers/comments note, the idea that there must be a space after the command is not correct. A well-known example is that you can type a forward slash after a command, without needing a space first. However, there is another behavior which is a bit less understood, and allows the "cd.." that you are asking about. This behavior also ...


105

I would use the ATTRIB command, for example: attrib -r c:\folder\*.* /s attrib is the command -r is the flag for removing read-only attributes c:\folder\*.* is the folder you are running it on, plus wildcards for all files /s is the flag for doing all sub directories and files Here is some more documentation and examples for the attrib command: https://...


Only top voted, non community-wiki answers of a minimum length are eligible