Two Command Line Tricks


Watching a co-worker type can be a good tool for learning new tricks. I always ask "How did you just do that?" when I see something fly by a bit too quickly. I just learned two of them in the last half hour.

  1. If there is a command in your history but you don’t want to push the up arrow to find it, you can start typing the command and then press F8 to complete it.
  2. Type "dir | clip" and then open Notepad. Paste from the clipboard to reveal the output of the dir command you ran before. You can use this to pipe any command line output to the clipboard. Type "clip /?" for full details.

Comments (7)

  1. Anonymous says:

    Clip didn’t work for me.  Using PowerShell?

    Michael

  2. Garry Trinder says:

    clip.exe is only included in Server 2003 and up. Vista is the first client OS to include it.

    Previously, it was included in Resource Kits for the respective OSes. Clip 1.1 is available on MS FTP:

    ftp://ftp.microsoft.com/Services/TechNet/samples/PS/Win98/Reskit/FILE/CLIP.EXE

  3. Anonymous says:

    Per chi usa ancora la Command Line

  4. imRahulSoni says:

    Wow… specially that clip 🙂

    Keep ’em coming!!!

  5. Anonymous says:

    The last post I made with command line tricks was well-received so I thought I'd post another little

  6. Anonymous says:

    The last post I made with command line tricks was well-received so I thought I’d post another little

  7. Anonymous says:

    The last post I made with command line tricks was well-received so I thought I'd post another little

Skip to main content