Command Line Shortcuts


Coming from a UNIX background, I’m a huge fan of keyboard and command line shortcuts.  Anyone that has had the chance to stare over my shoulder when I’m working may have noticed:

  • I live in multiple command line windows.  I didn’t grow up with Windows Explorer (a.k.a. Program Manager in days gone by) and just find it easier <g>.
  • I have Windows Services for Unix (SFU) installed just so that I have access to grep, awk, sed, ps and other tools on the Windows platform.
  • I like SlickRun and Dave’s Quick Search Bar.  Who can’t resist one line macros for searching on google or opening multiple windows without touching the mouse?
  • Junction (a UNIX mount style tool from SysInternals) is my friend

After reading Jason Wittington’s blog yesterday (through Scott’s blog), I have to add another one to the list.  Jason blogs about a simple, but great tool to cat the contents of a text file to the clipboard.  For example, using this from the command line:

c:\type myfile.xml | clipboard

This is especially useful (as before, I would have had to open this up in an editor, CTRL-A, CTRL-C, ALT-Tab to my other application and CTRL-V).

Go check out the one line of code behind this in his post.


Comments (3)

  1. Confused Guy says:

    double-click, CTRL-A, CTRL-C, ALT-Tab, CTRL-V = 6 clicks/keystrokes

    type myfile.xml | clipboard = 28 clicks/keystrokes. And you still have to alt-tab and ctrl-v.

    ‘Nuff said.

    Signed,

    Confused Guy

  2. josh says:

    imo UnxUtils is nicer than SFU for the stuff it provides, although it doesn’t have quite as many tools in it (no awk or ps). But there are scattered tools in "Debugging Tools for Windows" and a few other places that can replace many of those without needing to load the posix subsystem. (but then my computer is old and slow)

    And I have to plug LiteStep: command box (search google: "? term", lookup on msdn: "?msdn GetWindowTextLength", lookup rfc: "?rfc 1939", simple math: "=2+2"), virtual desktops (better than any I’ve seen in Unix), and I can press Win+E, browse to a folder, Win+D (open cmd window), type "cd ", drag and drop folder there, press enter. Sure, there’s "command prompt here", but it’s not as flexible.

  3. Simon says:

    re: confused guy

    Sure, but your hands have to leave the keyboard to go to the mouse, and then back to the keyboard. How many clicks/keystrokes does that account for? <g>

Skip to main content