Archive

Posts Tagged ‘command line’

Piping text to the clipboard in Vista and Windows 7

May 31st, 2010 niels No comments

Microsoft added a new command line tool to Vista and Windows 7: clip.exe. This nifty little utility allows user to copy program output to the clipboard on the windows command line. Its usage is pretty straightforward:

dir | clip – copies the output of the dir command to the clipboard
clip < example.txt – copy the contents of the file example.txt to the clipboard

View and Kill Processes using the Windows Command Line

April 13th, 2010 niels No comments

It’s pretty convenient to list and kill processes using ps and kill / pkill on *nix. Actually, you can do that on a Windows command line as well:

  • tasklist: shows a list of all running processes
  • taskkill: kills processes

Among other options, processes can be killed by their process ID (taskkill /PID 4711) and by the name of their executable (taskkill /IM firefox.exe).
So, if you have perl scripts running wild, just execute taskkill perl.exe to kill all of them down with a single command.

More lesser known Windows commands are described in this PDF.